6 Replies Latest reply on Dec 16, 2005 1:47 AM by greywind

    DeploymentException with -ds.xml inside ear inside rar

    Michael Kopp Newbie

      I added the following lines to my jboss-app.xml and since then I get exceptions during deployment.

      <loader-repository>
      goldensource.com:loader=goldensource.app.ear
      <loader-repository-config>
      java2ParentDelegation=false
      </loader-repository-config>
      </loader-repository>

      10:14:23,758 INFO [ServiceConfigurator] Problem configuring service jboss.jca:service=ManagedConnectionFactory,name=goldensource/adapters/filesystem/ftp
      org.jboss.deployment.DeploymentException: Exception setting attribute javax.management.Attribute@db38e1 on mbean jboss.jca:service=ManagedConnectionFactory,name=goldensource/adapters/filesystem/ftp; - nested throwable: (javax.management.InvalidAttributeValueException: Set attribute has class class org.apache.xerces.dom.DeferredElementImpl loaded from null that is not assignable to attribute class interface org.w3c.dom.Element loaded from org.jboss.mx.loading.UnifiedClassLoader3@16c6b08{ url=file:/local/mkopp/jboss-4.0.3RC1/server/default/tmp/deploy/tmp19879goldensource.app.ear ,addedOrder=41})
      at org.jboss.system.ServiceConfigurator.setAttribute(ServiceConfigurator.java:572)
      at org.jboss.system.ServiceConfigurator.configure(ServiceConfigurator.java:273)
      at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:162)
      at org.jboss.system.ServiceConfigurator.processDependency(ServiceConfigurator.java:535)
      at org.jboss.system.ServiceConfigurator.configure(ServiceConfigurator.java:298)
      at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:162)
      at org.jboss.system.ServiceConfigurator.processDependency(ServiceConfigurator.java:535)
      at org.jboss.system.ServiceConfigurator.configure(ServiceConfigurator.java:298)
      at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:162)
      at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:116)
      at org.jboss.system.ServiceController.install(ServiceController.java:202)


      It seems a class loader problem I debuged it and found that the org.jboss.resource.connectionmanager.RARDeployment is loaded by the UnifiedClassLoader3 (the EAR ClassLoader). The Property that is being set here is managedConnectionFactoryProperties.
      The problem, the ear file contains the xml-apis.jar. Thus the org.w3c.Element is also loaded by the UnifiedClassLoader. The Xerces object on the other hand is loaded by the null ClassLoader (I guess that means bootstrap). Therefor the classes are incompatible.

      I'm not sure if this is a bug or If I am missing some classloader configuration for jboss. Is the RARDeployment supposed to be loaded by the Application classloader? it is a server class and should be loaded by the server class loader right?