T
Thufir Hawat
Followups to ?
Previously, the context.xml file was:
<?xml version="1.0" encoding="UTF-8"?>
<Context path="/Assignment"/>
However, a tutorial suggests modifying it, along the lines of:
http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-
howto.html
Which gives run-time errors.
Apparently there's a problem with:
<?xml version="1.0" encoding="UTF-8"?>
<Context path="/Assignment">
<Resource name="jdbc/BEATLES" auth="Container"
type="javax.sql.DataSource"
maxActive="20" maxIdle="30" maxWait="10000"
username="username" password="password"
driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
url="jdbc:sqlserver://
j2ee.ca:1433;databaseName=jspweb;selectMethod=cursor;"/>
</Context>
Netbeans says:
XML validation started.
Checking file:/home/thufir/NetBeansProjects/Assignment/web/META-INF/
context.xml...
The processing instruction target matching "[xX][mM][lL]" is not allowed.
[2]
XML validation finished.
However, apparently it's not possible to create a DTD (or schema, I
imagine) for context.xml:
http://wiki.apache.org/tomcat/FAQ/Miscellaneous#Q10
The runtime error:
init:
deps-module-jar:
deps-ear-jar:
deps-jar:
library-inclusion-in-archive:
library-inclusion-in-manifest:
compile:
compile-jsps:
[Fatal Error] :2:6: The processing instruction target matching "[xX][mM]
[lL]" is not allowed.
Deployment error:
Tomcat configuration file /home/thufir/NetBeansProjects/Assignment/web/
META-INF/context.xml seems to be broken. Please make sure it is parseable
and valid.
See the server log for details.
at
org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy
(Deployment.java:166)
at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:104)
at org.apache.tools.ant.UnknownElement.execute
(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor131.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute
(DispatchUtils.java:105)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets
(Project.java:1329)
at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets
(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run
(BridgeImpl.java:277)
at org.apache.tools.ant.module.run.TargetExecutor.run
(TargetExecutor.java:460)
at org.netbeans.core.execution.RunClassThread.run(Unknown Source)
Caused by:
org.netbeans.modules.j2ee.deployment.common.api.ConfigurationException:
Tomcat configuration file /home/thufir/NetBeansProjects/Assignment/web/
META-INF/context.xml seems to be broken. Please make sure it is parseable
and valid.
at
org.netbeans.modules.tomcat5.config.TomcatModuleConfiguration.getContext
(TomcatModuleConfiguration.java:173)
at
org.netbeans.modules.tomcat5.config.TomcatModuleConfiguration.getDatasources
(TomcatModuleConfiguration.java:198)
at
org.netbeans.modules.j2ee.deployment.config.ConfigSupportImpl.getDatasources
(ConfigSupportImpl.java:332)
at
org.netbeans.modules.j2ee.deployment.devmodules.spi.J2eeModuleProvider.getModuleDatasources
(J2eeModuleProvider.java:183)
at
org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy
(Deployment.java:122)
... 16 more
Caused by: java.lang.RuntimeException: DOM graph creation failed:
org.netbeans.modules.schema2beans.Schema2BeansRuntimeException: Failed to
create the XML-DOM Document. Check your XML to make sure it is correct.
The processing instruction target matching "[xX][mM][lL]" is not allowed.
at org.netbeans.modules.tomcat5.config.gen.Context.createGraph
(Context.java:3162)
at org.netbeans.modules.tomcat5.config.gen.Context.createGraph
(Context.java:3146)
at
org.netbeans.modules.tomcat5.config.TomcatModuleConfiguration.getContext
(TomcatModuleConfiguration.java:166)
... 20 more
BUILD FAILED (total time: 2 seconds)
thanks,
Thufir
Previously, the context.xml file was:
<?xml version="1.0" encoding="UTF-8"?>
<Context path="/Assignment"/>
However, a tutorial suggests modifying it, along the lines of:
http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-
howto.html
Which gives run-time errors.
Apparently there's a problem with:
<?xml version="1.0" encoding="UTF-8"?>
<Context path="/Assignment">
<Resource name="jdbc/BEATLES" auth="Container"
type="javax.sql.DataSource"
maxActive="20" maxIdle="30" maxWait="10000"
username="username" password="password"
driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
url="jdbc:sqlserver://
j2ee.ca:1433;databaseName=jspweb;selectMethod=cursor;"/>
</Context>
Netbeans says:
XML validation started.
Checking file:/home/thufir/NetBeansProjects/Assignment/web/META-INF/
context.xml...
The processing instruction target matching "[xX][mM][lL]" is not allowed.
[2]
XML validation finished.
However, apparently it's not possible to create a DTD (or schema, I
imagine) for context.xml:
http://wiki.apache.org/tomcat/FAQ/Miscellaneous#Q10
The runtime error:
init:
deps-module-jar:
deps-ear-jar:
deps-jar:
library-inclusion-in-archive:
library-inclusion-in-manifest:
compile:
compile-jsps:
[Fatal Error] :2:6: The processing instruction target matching "[xX][mM]
[lL]" is not allowed.
Deployment error:
Tomcat configuration file /home/thufir/NetBeansProjects/Assignment/web/
META-INF/context.xml seems to be broken. Please make sure it is parseable
and valid.
See the server log for details.
at
org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy
(Deployment.java:166)
at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:104)
at org.apache.tools.ant.UnknownElement.execute
(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor131.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute
(DispatchUtils.java:105)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets
(Project.java:1329)
at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets
(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run
(BridgeImpl.java:277)
at org.apache.tools.ant.module.run.TargetExecutor.run
(TargetExecutor.java:460)
at org.netbeans.core.execution.RunClassThread.run(Unknown Source)
Caused by:
org.netbeans.modules.j2ee.deployment.common.api.ConfigurationException:
Tomcat configuration file /home/thufir/NetBeansProjects/Assignment/web/
META-INF/context.xml seems to be broken. Please make sure it is parseable
and valid.
at
org.netbeans.modules.tomcat5.config.TomcatModuleConfiguration.getContext
(TomcatModuleConfiguration.java:173)
at
org.netbeans.modules.tomcat5.config.TomcatModuleConfiguration.getDatasources
(TomcatModuleConfiguration.java:198)
at
org.netbeans.modules.j2ee.deployment.config.ConfigSupportImpl.getDatasources
(ConfigSupportImpl.java:332)
at
org.netbeans.modules.j2ee.deployment.devmodules.spi.J2eeModuleProvider.getModuleDatasources
(J2eeModuleProvider.java:183)
at
org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy
(Deployment.java:122)
... 16 more
Caused by: java.lang.RuntimeException: DOM graph creation failed:
org.netbeans.modules.schema2beans.Schema2BeansRuntimeException: Failed to
create the XML-DOM Document. Check your XML to make sure it is correct.
The processing instruction target matching "[xX][mM][lL]" is not allowed.
at org.netbeans.modules.tomcat5.config.gen.Context.createGraph
(Context.java:3162)
at org.netbeans.modules.tomcat5.config.gen.Context.createGraph
(Context.java:3146)
at
org.netbeans.modules.tomcat5.config.TomcatModuleConfiguration.getContext
(TomcatModuleConfiguration.java:166)
... 20 more
BUILD FAILED (total time: 2 seconds)
thanks,
Thufir