- This topic has 3 replies, 2 voices, and was last updated 21 years, 5 months ago by
spob.
-
AuthorPosts
-
spobMemberI have a MySql data source defined as followed:
<?xml version=”1.0″ encoding=”UTF-8″?>
<!– ===================================================================== –>
<!– –>
<!– JBoss Server Configuration –>
<!– –>
<!– ===================================================================== –><!– $Id: mysql-ds.xml,v 1.1 2002/07/22 22:57:24 d_jencks Exp $ –>
<!– ==================================================================== –>
<!– Datasource config for MySQL using 2.0.11 driver –>
<!– ==================================================================== –>
<datasources>
<local-tx-datasource>
<jndi-name>mysqltest</jndi-name>
<connection-url>jdbc:mysql://localhost/test</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>x</user-name>
<password>y</password>
</local-tx-datasource>
</datasources>I’ve moved the file, mysql-test-ds.xml, into the %JBOSS%/server/default/deploy directory.
If I launch JBoss from the command line, the datasource deploys fine. But if I launch JBoss (either in debug or run mode) from within MyEclipse, I get the following deployment error:
22:24:40,218 INFO [MainDeployer] Starting deployment of package: file:/C:/jboss-3.2.2RC4/server/default/deploy/mysql-test-ds.xml
22:24:40,296 WARN [NestedThrowable] Duplicate throwable nesting of same base type: class org.jboss.deployment.DeploymentException is assignable from: class org.jboss.deployment.DeploymentException
22:24:40,296 ERROR [URLDeploymentScanner] Failed to deploy: org.jboss.deployment.scanner.URLDeploymentScanner$DeployedURL@8af7f06d{ url=file:/C:/jboss-3.2.2RC4/server/default/deploy/mysql-test-ds.xml, deployedLastModified=0 }
org.jboss.deployment.DeploymentException: exception in init of file:/C:/jboss-3.2.2RC4/server/default/deploy/mysql-test-ds.xml; – nested throwable: (org.jboss.deployment.DeploymentException: Could not parse dd; – nested throwable: (org.xml.sax.SAXParseException: Document root element is missing.))
at org.jboss.deployment.MainDeployer.init(MainDeployer.java:712)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:629)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy6.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:476)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:274)
at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:394)
at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy4.start(Unknown Source)
at org.jboss.deployment.SARDeployer.start(SARDeployer.java:226)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:824)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:632)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:589)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy5.deploy(Unknown Source)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:384)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:291)
at org.jboss.Main.boot(Main.java:150)
at org.jboss.Main$1.run(Main.java:388)
at java.lang.Thread.run(Thread.java:534)
Caused by: org.jboss.deployment.DeploymentException: Could not parse dd; – nested throwable: (org.xml.sax.SAXParseException: Document root element is missing.)
at org.jboss.deployment.XSLSubDeployer.findDd(XSLSubDeployer.java:273)
at org.jboss.deployment.XSLSubDeployer.init(XSLSubDeployer.java:191)
at org.jboss.deployment.MainDeployer.init(MainDeployer.java:686)
… 48 more
Caused by: org.xml.sax.SAXParseException: Document root element is missing.
at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3339)
at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3327)
at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:635)
at org.apache.crimson.parser.Parser2.parse(Parser2.java:333)
at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)
at org.apache.crimson.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:185)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:124)
at org.jboss.deployment.XSLSubDeployer.findDd(XSLSubDeployer.java:268)
… 50 moreI am running on Win2K. I have Eclipse 2.1.1, and MyEclipseWorkbench 2.6.2.
Thansk.
Scott AndersonParticipantFrom the stack, it appears there is a configuration difference between the way you launch JBoss from the command line and the way you launch it from MyEclipse. All the JBoss configuration settings within MyEclipse are provided so that you can mirror your commandline launch environment including java library path, classpath, JDK, etc. To determine the difference, you’ll need to go through your JBoss startup script and look for any modifications that have been made there but not made to the MyEclipse configuration.
Another possibility is that you’re also loading up some XML parsing implementation (xerces.jar, jaxp.jar) and this is conflicting with crimson.jar which is added to the JBoss startup classpath so that it can read its configuration files. If that’s the case, you might be able to work around the issue by specifying these XML jars in the ‘Prepend to classpath’ option when launching JBoss.
–Scott
MyEclipse Support
spobMemberI’ll compare the scripts and see if I can figure it out…thanks.
One piece of information that you may want to consider — this was a clean JBoss 3.2.2RC4 install of JBoss. I did not special configuration. This was a fresh install of Eclipse and of MyEclipse, and I did not modify any of the parameters when I defined the App Server in my eclipse.
spobMemberOne more follow up…I found the solution. I blanked out the default values in the definition of the JBoss3 Server instance in MyEclipse preferences for XML Document Builder Factory Class and SAX Parser Factory class, and now it works.
-
AuthorPosts