Summary: | JBoss 4.0.4 fails to start due exception in DomDocumentBuilderFactory | ||
---|---|---|---|
Product: | classpath | Reporter: | Audrius Meškauskas <audriusa> |
Component: | xml | Assignee: | chris burdess <dog> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | bug-classpath, psj, tromey |
Priority: | P3 | ||
Version: | 0.91 | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | 2007-02-05 22:27:21 |
Description
Audrius Meškauskas
2006-05-21 19:29:11 UTC
What happens without xercesImpl being available? This exception seems to be caused by Xerces not providing some functionality that the Classpath implementation is looking for (specifically, its a DOM level 3 Load and Save implementation, which Classpath does provide). Without that library, after the rather long pause, the following exception appears: log4j:ERROR Parsing error on line 2 and column 48 log4j:ERROR null log4j:ERROR Could not parse input source [org.xml.sax.InputSource@b143ecd8]. gnu.xml.dom.ls.DomLSException at gnu.xml.dom.ls.DomLSParser.doParse(DomLSParser.java:311) at gnu.xml.dom.ls.DomLSParser.parse(DomLSParser.java:159) at gnu.xml.dom.DomDocumentBuilder.parse(DomDocumentBuilder.java:179) at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:665) at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:616) at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:602) at org.apache.log4j.xml.DOMConfigurator.configure(DOMConfigurator.java:697) at org.jboss.logging.Log4jService$URLWatchTimerTask.reconfigure(Log4jService.java:643) at org.jboss.logging.Log4jService$URLWatchTimerTask.run(Log4jService.java:582) at org.jboss.logging.Log4jService.setup(Log4jService.java:460) at org.jboss.logging.Log4jService.createService(Log4jService.java:476) at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:260) at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:243) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:355) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94) at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133) at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142) at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978) at $Proxy0.create(Unknown Source) at org.jboss.system.ServiceController.create(ServiceController.java:330) at org.jboss.system.ServiceController.create(ServiceController.java:273) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:355) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94) at org.jboss.mx.server.Invocation.invoke(Invocation.java:86) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210) at $Proxy4.create(Unknown Source) at org.jboss.deployment.SARDeployer.create(SARDeployer.java:258) at org.jboss.deployment.MainDeployer.create(MainDeployer.java:953) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:807) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:755) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:355) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94) at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133) at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142) at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210) at $Proxy5.deploy(Unknown Source) at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482) at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362) at org.jboss.Main.boot(Main.java:200) at org.jboss.Main$1.run(Main.java:464) at java.lang.Thread.run(Thread.java:733) Caused by: org.xml.sax.SAXParseException at gnu.xml.stream.SAXParser.parse(SAXParser.java:660) at gnu.xml.dom.ls.DomLSParser.doParse(DomLSParser.java:299) ...57 more Caused by: javax.xml.stream.XMLStreamException at gnu.xml.stream.XMLParser.next(XMLParser.java:1184) at gnu.xml.stream.XMLParser.hasNext(XMLParser.java:984) at gnu.xml.stream.SAXParser.parse(SAXParser.java:377) ...58 more Caused by: java.net.MalformedURLException: Protocol handler not found: dummy at java.net.URL.<init>(URL.java:470) at java.net.URL.<init>(URL.java:325) at gnu.xml.stream.XMLParser.absolutize(XMLParser.java:1583) at gnu.xml.stream.XMLParser.readExternalIds(XMLParser.java:2538) at gnu.xml.stream.XMLParser.readDoctypeDecl(XMLParser.java:1732) at gnu.xml.stream.XMLParser.next(XMLParser.java:1130) ...60 more Sun's implementation without the library shows the stactk trace of the java.lang.NoClassDefFoundError: org/apache/xerces/xs/XSTypeDefinition, but, despite of this message, JBoss still starts - at least is reported so, and the server at localhost:8080 is delivering pages. The several lines immediately before exception may be important: 23:40:51,519 INFO [Server] Core system initialized 23:41:57,348 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resource:log4j.xml log4j:ERROR Parsing error on line 2 and column 48 log4j:ERROR null log4j:ERROR Could not parse input source [org.xml.sax.InputSource@b143ecd8]. I found the log4j.xml in the server/default/conf/. It starts as: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> <!-- ===================================================================== --> <!-- --> <!-- Log4j Configuration --> (and so on) It is probably the file, parsing that causes the error, as if I edit it (deliberately introducing errors), the error messages change accordingly. Occurs with JamVM 1.4.3 and Classpath 0.92. Does not occur with Cacao 0.96 and the same Classpath 0.92. Presumably because Cacao does not load xercesImpl.jar from lib/endorsed as JamVM does? In re comment #4: yes, this appears to happen reliably when you put xerces into the endorsed directory. We ran into this when experimenting with eclipse... This ought to be a supported mode of operation. FWIW xerces seems to explicitly reject MODE_ASYNCHRONOUS, which afaict is the only mode we create. ATM I have no idea at all what to do about this :} Subject: Bug 27710 CVSROOT: /cvsroot/classpath Module name: classpath Changes by: Chris Burdess <dog> 07/02/06 10:10:44 Modified files: . : ChangeLog gnu/xml/dom : DomDocumentBuilderFactory.java gnu/xml/stream : XIncludeFilter.java XMLParser.java Log message: 2007-02-06 Chris Burdess <dog@gnu.org> Fixes PR 27710. * gnu/xml/dom/DomDocumentBuilderFactory.java: Fall back to synchronous LSParser if implementation does not support asynchronous. * gnu/xml/stream/XMLParser.java, gnu/xml/stream/XIncludeFilter.java: Use custom code instead of java.net.URL to resolve to an an absolute URI, to avoid nonexistent protocol handler problems. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpath&r1=1.9088&r2=1.9089 http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/xml/dom/DomDocumentBuilderFactory.java?cvsroot=classpath&r1=1.3&r2=1.4 http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/xml/stream/XIncludeFilter.java?cvsroot=classpath&r1=1.7&r2=1.8 http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/xml/stream/XMLParser.java?cvsroot=classpath&r1=1.30&r2=1.31 Committed a partial fix. We will now fall back to synchronous mode and avoid using java.net.URL to parse URLs (this was causing the protocol handler problem). Please test and report any further issues to this ticket. Subject: Bug 27710 Author: tromey Date: Wed Feb 7 18:22:26 2007 New Revision: 121694 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=121694 Log: 2007-02-07 Chris Burdess <dog@gnu.org> Fixes PR 30718. * gnu/xml/dom/ls/SAXEventSink.java: Add public accessor/mutators. * gnu/xml/transform/XSLURIResolver.java: Add support for custom SAXSources without a backing URL or stream. Fixes PR 27710. * gnu/xml/dom/DomDocumentBuilderFactory.java: Fall back to synchronous LSParser if implementation does not support asynchronous. * gnu/xml/stream/XMLParser.java, gnu/xml/stream/XIncludeFilter.java: Use custom code instead of java.net.URL to resolve to an an absolute URI, to avoid nonexistent protocol handler problems. Modified: trunk/libjava/classpath/ChangeLog trunk/libjava/classpath/gnu/xml/dom/DomDocumentBuilderFactory.java trunk/libjava/classpath/gnu/xml/dom/ls/SAXEventSink.java trunk/libjava/classpath/gnu/xml/stream/XIncludeFilter.java trunk/libjava/classpath/gnu/xml/stream/XMLParser.java trunk/libjava/classpath/gnu/xml/transform/XSLURIResolver.java trunk/libjava/classpath/lib/gnu/xml/dom/DomDocumentBuilderFactory.class trunk/libjava/classpath/lib/gnu/xml/dom/ls/SAXEventSink.class trunk/libjava/classpath/lib/gnu/xml/stream/XIncludeFilter.class trunk/libjava/classpath/lib/gnu/xml/stream/XMLParser$AnyContentModel.class trunk/libjava/classpath/lib/gnu/xml/stream/XMLParser$Attribute.class trunk/libjava/classpath/lib/gnu/xml/stream/XMLParser$AttributeDecl.class trunk/libjava/classpath/lib/gnu/xml/stream/XMLParser$ContentModel.class trunk/libjava/classpath/lib/gnu/xml/stream/XMLParser$ContentParticle.class trunk/libjava/classpath/lib/gnu/xml/stream/XMLParser$Doctype.class trunk/libjava/classpath/lib/gnu/xml/stream/XMLParser$ElementContentModel.class trunk/libjava/classpath/lib/gnu/xml/stream/XMLParser$EmptyContentModel.class trunk/libjava/classpath/lib/gnu/xml/stream/XMLParser$ExternalIds.class trunk/libjava/classpath/lib/gnu/xml/stream/XMLParser$Input.class trunk/libjava/classpath/lib/gnu/xml/stream/XMLParser$MixedContentModel.class trunk/libjava/classpath/lib/gnu/xml/stream/XMLParser.class trunk/libjava/classpath/lib/gnu/xml/transform/XSLURIResolver.class trunk/libjava/gnu/xml/dom/ls/SAXEventSink.h trunk/libjava/gnu/xml/transform/XSLURIResolver.h Subject: Bug 27710 Author: tromey Date: Wed Feb 7 18:29:30 2007 New Revision: 121696 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=121696 Log: 2007-02-07 Chris Burdess <dog@gnu.org> Fixes PR 30718. * gnu/xml/dom/ls/SAXEventSink.java: Add public accessor/mutators. * gnu/xml/transform/XSLURIResolver.java: Add support for custom SAXSources without a backing URL or stream. Fixes PR 27710. * gnu/xml/dom/DomDocumentBuilderFactory.java: Fall back to synchronous LSParser if implementation does not support asynchronous. * gnu/xml/stream/XMLParser.java, gnu/xml/stream/XIncludeFilter.java: Use custom code instead of java.net.URL to resolve to an an absolute URI, to avoid nonexistent protocol handler problems. Modified: branches/redhat/gcc-4_1-branch-java-merge-20070117/libjava/classpath/ChangeLog branches/redhat/gcc-4_1-branch-java-merge-20070117/libjava/classpath/gnu/xml/dom/DomDocumentBuilderFactory.java branches/redhat/gcc-4_1-branch-java-merge-20070117/libjava/classpath/gnu/xml/dom/ls/SAXEventSink.java branches/redhat/gcc-4_1-branch-java-merge-20070117/libjava/classpath/gnu/xml/stream/XIncludeFilter.java branches/redhat/gcc-4_1-branch-java-merge-20070117/libjava/classpath/gnu/xml/stream/XMLParser.java branches/redhat/gcc-4_1-branch-java-merge-20070117/libjava/classpath/gnu/xml/transform/XSLURIResolver.java Fixed(?). |