User account creation filtered due to spam.

Bug 27710 - JBoss 4.0.4 fails to start due exception in DomDocumentBuilderFactory
Summary: JBoss 4.0.4 fails to start due exception in DomDocumentBuilderFactory
Status: RESOLVED FIXED
Alias: None
Product: classpath
Classification: Unclassified
Component: xml (show other bugs)
Version: 0.91
: P3 normal
Target Milestone: ---
Assignee: chris burdess
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-21 19:29 UTC by Audrius Meškauskas
Modified: 2012-01-10 15:59 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2007-02-05 22:27:21


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Audrius Meškauskas 2006-05-21 19:29:11 UTC
JBoss 4.0.4 fails to start with the following exception:


Failed to boot JBoss:
org.jboss.deployment.DeploymentException: NOT_SUPPORTED_ERR: The implementation does not support the requested type of object or operation. ; - nested throwable: (org.w3c.dom.DOMException: NOT_SUPPORTED_ERR: The implementation does not support the requested type of object or operation. )
   at org.jboss.deployment.SARDeployer.init(SARDeployer.java:217)
   at org.jboss.deployment.MainDeployer.init(MainDeployer.java:861)
   at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:798)
   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.w3c.dom.DOMException: NOT_SUPPORTED_ERR: The implementation does not support the requested type of object or operation.
   at org.apache.xerces.dom.CoreDOMImplementationImpl.createLSParser(Unknown Source)
   at gnu.xml.dom.DomDocumentBuilderFactory.newDocumentBuilder(DomDocumentBuilderFactory.java:87)
   at org.jboss.deployment.SARDeployer.parseDocument(SARDeployer.java:587)
   at org.jboss.deployment.SARDeployer.init(SARDeployer.java:181)
   ...21 more

The provider library, xercesImpl.jar, seems found and is called, as deletion of this file causes the different exception.
Comment 1 Andrew John Hughes 2006-05-21 19:39:57 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).
Comment 2 Audrius Meškauskas 2006-05-21 21:49:17 UTC
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.
Comment 3 Audrius Meškauskas 2006-05-21 21:58:37 UTC
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.

Comment 4 Paul Jenner 2006-08-13 17:24:09 UTC
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?
Comment 5 Tom Tromey 2007-02-05 22:27:20 UTC
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.
Comment 6 Tom Tromey 2007-02-05 22:47:39 UTC
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 :}
Comment 7 cvs-commit@developer.classpath.org 2007-02-06 10:11:35 UTC
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



Comment 8 chris burdess 2007-02-06 10:16:21 UTC
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.
Comment 9 Tom Tromey 2007-02-07 18:22:50 UTC
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

Comment 10 Tom Tromey 2007-02-07 18:29:48 UTC
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

Comment 11 Richard Biener 2012-01-10 15:59:50 UTC
Fixed(?).