[mule-user] mule 1.4.0 ear: DOM builder exception

11 views
Skip to first unread message

AlexeySem

unread,
May 7, 2007, 12:25:56 PM5/7/07
to us...@mule.codehaus.org

Hi,

I have packed Mule 1.4.0 RAR into EAR myself as I did not manage to find any
at the download site (see also my previous post).

The EAR contains mule-jca-1.4.0-jboss.rar, mule-jboss-ds.xml from
mule-module-jca-1.4.0.jar, and the appropriate application.xml and
jboss-app.xml files in /META-INF.

Here is how the config files look:

mule-jboss-ds.xml:
<connection-factories>
<tx-connection-factory>
<jndi-name>mule/ConnectionFactory</jndi-name>
<rar-name>mule-ear-1.4.0.ear#mule-jca-1.4.0-jboss.rar</rar-name>

<connection-definition>org.mule.ra.MuleConnectionFactory</connection-definition>
<track-connection-by-tx/>
</tx-connection-factory>
</connection-factories>

application.xml:
<application>
<display-name>mule-ear</display-name>
<description>Ear packaging for Mule Resource Adapter</description>
<module>
<connector>mule-jca-1.4.0-jboss.rar</connector>
</module>
</application>

jboss-app.xml:
<jboss-app>
<loader-repository>org.mule:loader=mule-ear-1.4.0.ear
<loader-repository-config>
java2ParentDelegaton=false
</loader-repository-config>
</loader-repository>

<module>
<service>mule-jboss-ds.xml</service>
</module>

</jboss-app>


However, on deploy I get the following error:

19:55:25,546 INFO [EjbModule] Deploying /local/CreditAgency
19:55:25,718 INFO [ServiceConfigurator] Problem configuring service
jboss.jca:service=ManagedConnectionFactory,name=mule/ConnectionFactory
java.lang.ClassCastException:
org.apache.xerces.jaxp.DocumentBuilderFactoryImpl cannot be cast to
javax.xml.parsers.DocumentBuilderFactory
at javax.xml.parsers.DocumentBuilderFactory.newInstance(Unknown Source)
at
org.jboss.util.propertyeditor.DocumentEditor.getAsDocument(DocumentEditor.java:75)
...

There seems to be a misconfiguration of what DOM document builder to use...
Any idea, how to resolve that?

Thanks,
Alexey
--
View this message in context: http://www.nabble.com/mule-1.4.0-ear%3A-DOM-builder-exception-tf3704827.html#a10360568
Sent from the Mule - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

Andrew Perepelytsya

unread,
May 7, 2007, 8:56:35 PM5/7/07
to us...@mule.codehaus.org
Alexey,

Did you configure classloader isolation for your EAR? Most probably xerces conflict.

Andrew

Wayne Fay

unread,
May 7, 2007, 10:55:28 PM5/7/07
to us...@mule.codehaus.org
Pretty sure you've misspelled this one:

<loader-repository-config>
java2ParentDelegaton=false
</loader-repository-config>

Try java2ParentDelegation... that might resolve your classloader issue, too.

Wayne

Marie Claire Rizzo

unread,
May 8, 2007, 5:30:16 AM5/8/07
to us...@mule.codehaus.org
Hi

I just managed to replicate your scenario. I'll see what I can come up
with, thanks.

Regards
Marie Rizzo

Andrew Perepelytsya wrote:
> Alexey,
>
> Did you configure classloader isolation for your EAR? Most probably
> xerces conflict.
>
> Andrew
>

> On 5/7/07, *AlexeySem* < alex...@gmail.com

> <http://Nabble.com>.


>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
> http://xircles.codehaus.org/manage_email
>
>

--

Marie Rizzo
Ricston Consulting
Tel: +356 21 334457
Fax: +356 21 334457
Skype: marie.rizzo

Marie Claire Rizzo

unread,
May 8, 2007, 6:40:37 AM5/8/07
to us...@mule.codehaus.org
Hi

The problem is caused by a conflict between the org.w3c.dom.* classes in
the xml-apis-1.3.03.jar and those in xercesImpl-2.8.1.jar. As a
temporary solution you could remove the xml-apis.jar from the
mule-jca-1.4.0-jboss.rar.

Regards
Marie Rizzo

Holger Hoffstätte

unread,
May 8, 2007, 7:17:20 AM5/8/07
to us...@mule.codehaus.org
Marie Claire Rizzo wrote:
> The problem is caused by a conflict between the org.w3c.dom.* classes in
> the xml-apis-1.3.03.jar and those in xercesImpl-2.8.1.jar. As a
> temporary solution you could remove the xml-apis.jar from the
> mule-jca-1.4.0-jboss.rar.

Please see my comments on MULE-1072 (just posted ;) - always remove either
both jars or none of them as they need to go hand in hand. Removing only
one is almost guaranteed to cause more (different) problems, regardless of
JDK. The JBoss deployer seems to ignore and not use our jar on the archive
classpath; that seems wrong to me.

-h

Alexey Semenov

unread,
May 8, 2007, 7:41:39 AM5/8/07
to us...@mule.codehaus.org
Thanks to all for your help!

I have fixed the mistake in jboss-app.xml and removed both xml-apis-1.3.03.jar and xercesImpl-2.8.1.jar from the RAR, along with log4j-1.2.14.jar, as it also caused problems.

Now I get the folowing strange exceptions:

15:27:30,703 INFO  [ServiceConfigurator] Problem configuring service jboss.jca:service=ManagedConnectionFactory,name=mule/ConnectionFactory
org.jboss.deployment.DeploymentException: Exception setting attribute OldRarDeployment = jboss.jca:service=RARDeployment,name='mule-ear-1.4.0.ear#mule-jca-1.4.0-jboss.rar' on mbean jboss.jca:service=ManagedConnectionFactory,name=mule/ConnectionFactory; - nested throwable: (javax.management.InvalidAttributeValueException : Set attribute  has class class javax.management.ObjectName loaded from null that is not assignable to attribute class class javax.management.ObjectName loaded from org.jboss.mx.loading.UnifiedClassLoader3@11fc13d{ url=file:/C:/jboss- 4.0.5.GA/server/default/tmp/deploy/tmp52952mule-ear-1.4.0.ear ,addedOrder=56})
    at org.jboss.system.ServiceConfigurator.setAttribute (ServiceConfigurator.java:698)
...
15:28:08,218 WARN  [ServiceController] Problem starting service jboss.jca:service=RARDeployment,name='mule-ear-1.4.0.ear#mule-jca-1.4.0-jboss.rar'
javax.resource.spi.ResourceAdapterInternalException : Failed to load configurations: mule-config.xml
    at org.mule.ra.MuleResourceAdapter.start(MuleResourceAdapter.java:117)
...
Caused by: javax.management.JMRuntimeException: Specified MBeanServerBuilder must be a subclass of MBeanServerBuilder: class org.jboss.mx.server.MBeanServerBuilderImpl
    at javax.management.MBeanServerFactory.createMBeanServerBuilder(MBeanServerFactory.java:236)
    at javax.management.MBeanServerFactory.createMBeanServerImpl(MBeanServerFactory.java :195)
    at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:44)
    at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:39)
    at org.mule.management.agents.JmxAgent.initialise (JmxAgent.java:185)
    at org.mule.MuleManager.initialiseAgents(MuleManager.java:1318)
    at org.mule.MuleManager.initialise(MuleManager.java:777)
    at org.mule.MuleManager.start(MuleManager.java:883)
    at org.mule.config.builders.MuleXmlConfigurationBuilder.configure(MuleXmlConfigurationBuilder.java:250)

Currently I use the default dummy mule-config.xml.

Now I feel completely helpless... Any ideas?

Marie, haven't you reproduced this behaviour also?

Regards,
Alexey

Marie Claire Rizzo

unread,
May 8, 2007, 11:00:10 AM5/8/07
to us...@mule.codehaus.org
Hi

Actually, no. I haven't run across that particular error. Can you please
give us more info about your environment and which version of JBoss you
are using?

Regards
Marie Rizzo

Alexey Semenov wrote:
> Thanks to all for your help!
>
> I have fixed the mistake in jboss-app.xml and removed both
> xml-apis-1.3.03.jar and xercesImpl-2.8.1.jar from the RAR, along with
> log4j-1.2.14.jar, as it also caused problems.
>
> Now I get the folowing strange exceptions:
>
> 15:27:30,703 INFO [ServiceConfigurator] Problem configuring service
> jboss.jca:service=ManagedConnectionFactory,name=mule/ConnectionFactory
> org.jboss.deployment.DeploymentException: Exception setting attribute
> OldRarDeployment =
> jboss.jca:service=RARDeployment,name='mule-ear-1.4.0.ear#mule-jca-1.4.0-jboss.rar'
> on mbean
> jboss.jca:service=ManagedConnectionFactory,name=mule/ConnectionFactory;
> - nested throwable: (javax.management.InvalidAttributeValueException :
> Set attribute has class class javax.management.ObjectName loaded from
> null that is not assignable to attribute class class
> javax.management.ObjectName loaded from
> org.jboss.mx.loading.UnifiedClassLoader3@11fc13d{ url=file:/C:/jboss-
> 4.0.5.GA/server/default/tmp/deploy/tmp52952mule-ear-1.4.0.ear

> <http://4.0.5.GA/server/default/tmp/deploy/tmp52952mule-ear-1.4.0.ear>

> On 5/8/07, *Holger Hoffstätte* <hol...@wizards.de

> <mailto:hol...@wizards.de>> wrote:
>
> Marie Claire Rizzo wrote:
> > The problem is caused by a conflict between the org.w3c.dom.*
> classes in
> > the xml-apis-1.3.03.jar and those in xercesImpl-2.8.1.jar. As a
> > temporary solution you could remove the xml-apis.jar from the
> > mule-jca-1.4.0-jboss.rar.
>
> Please see my comments on MULE-1072 (just posted ;) - always
> remove either
> both jars or none of them as they need to go hand in hand.
> Removing only
> one is almost guaranteed to cause more (different) problems,
> regardless of
> JDK. The JBoss deployer seems to ignore and not use our jar on the
> archive
> classpath; that seems wrong to me.
>
> -h
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
> http://xircles.codehaus.org/manage_email
>
>

--

Marie Rizzo
Ricston Consulting
Tel: +356 21 334457
Fax: +356 21 334457
Skype: marie.rizzo

Alexey Semenov

unread,
May 8, 2007, 12:14:58 PM5/8/07
to us...@mule.codehaus.org
Hi, Marie!

I use JBoss 4.0.5, I've given the ear config files content and the way I've build the ear in my first email. Which else files could be useful here? I'm not a big guru in JBoss...

Regards,
Alexey

> javax.management.MBeanServerFactory.createMBeanServer( MBeanServerFactory.java:39)

>     at org.mule.management.agents.JmxAgent.initialise (JmxAgent.java:185)
>     at org.mule.MuleManager.initialiseAgents(MuleManager.java:1318)
>     at org.mule.MuleManager.initialise (MuleManager.java:777)

Marie Claire Rizzo

unread,
May 9, 2007, 6:52:44 AM5/9/07
to us...@mule.codehaus.org
Hi

Finally I managed to replicate your scenario. You need to remove the
following jar from your .rar:

mx4j-jmx-2.1.1.jar

Regards
Marie Rizzo

Alexey Semenov wrote:
> Hi, Marie!
>
> I use JBoss 4.0.5, I've given the ear config files content and the way
> I've build the ear in my first email. Which else files could be useful
> here? I'm not a big guru in JBoss...
>
> Regards,
> Alexey
>

> On 5/8/07, *Marie Claire Rizzo* <marie...@ricston.com

> <http://4.0.5.GA/server/default/tmp/deploy/tmp52952mule-ear-1.4.0.ear

Alexey Semenov

unread,
May 9, 2007, 1:34:12 PM5/9/07
to us...@mule.codehaus.org
Hi, Marie!

I've removed all mx4j* jars - and now it starts correctly! (though, I haven't tried whether it actually works, but I think it does)

Thanks a lot!
Alexey

>     javax.management.MBeanServerFactory.createMBeanServer (MBeanServerFactory.java:44)
Reply all
Reply to author
Forward
0 new messages