2 Replies Latest reply on Jul 5, 2004 4:14 AM by Sascha Kulawk

    3.2.4: ClassCastException if using loader-repository

    Sascha Kulawk Newbie

      Hai,

      with the new JBoss 3.2.4 I've still problems to get it working because of the overwritten JDom API.
      I've recently tried to add a loader repository around my ear, which contains libs as well.
      My jboss-app.xml looks like this:
      <jboss-app>
      <loader-repository>
      de.juwimm:loader=custom
      </loader-repository>
      </jboss-app>
      The application.xml like this:
      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd">

      <display-name>ConQuest</display-name>
      Juwi|MacMillan Group GmbH - ConQuest

      juwimm-ejb.jar

      <web-uri>juwimm-cms-axis.war</web-uri><context-root>/axis</context-root><web-uri>juwimm-admin.war</web-uri><context-root>/admin</context-root><web-uri>config.war</web-uri><context-root>/config</context-root>


      <web-uri>cocoon.war</web-uri>
      <context-root>/</context-root>




      <web-uri>xindice.war</web-uri>
      <context-root>/xindice</context-root>



      lib/commons-httpclient-2.0.jar


      lib/log4j-1.2.8.jar


      lib/axis.jar


      lib/commons-discovery.jar


      lib/commons-logging.jar


      lib/jaxen-full.jar


      lib/jaxrpc.jar


      lib/lucene-1.3-rc3.jar


      lib/saaj.jar


      lib/wsdl4j.jar


      lib/xalan-2.5.2.jar


      lib/xercesImpl.jar


      lib/xmlParserAPIs.jar


      lib/xmldb-api-20030701.jar


      lib/xmldb-api-sdk-20030701.jar


      lib/xmldb-common-20030701.jar


      lib/xmldb-xupdate-20040205.jar


      lib/xmlrpc-1.1.jar


      lib/xindice-1.1b4-dev.jar



      At first I'm getting 5 times:
      WARN [org.jboss.deployment.DeploymentInfo] Only the root deployment can set the loader repository, ingoring config=null

      After that, JBoss throws this Exception:
      2004-07-05 09:30:35,588 ERROR [org.jboss.ejb.EntityContainer] Starting failed jboss.j2ee:jndiName=de.juwimm.ContentLocalHome,service=EJB
      org.jboss.deployment.DeploymentException: - nested throwable: (java.lang.ClassCastException)
      at org.jboss.metadata.XmlFileLoader.getDocument(XmlFileLoader.java:316)
      at org.jboss.metadata.XmlFileLoader.getDocument(XmlFileLoader.java:247)
      at org.jboss.metadata.XmlFileLoader.getDocumentFromURL(XmlFileLoader.java:219)
      at org.jboss.metadata.XmlFileLoader.getDocument(XmlFileLoader.java:203)
      at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCXmlFileLoader.load(JDBCXmlFileLoader.java:64)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadJDBCEntityMetaData(JDBCStoreManager.java:705)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.initStoreManager(JDBCStoreManager.java:417)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:365)
      at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManager.java:147)
      at org.jboss.ejb.EntityContainer.startService(EntityContainer.java:337)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
      at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:837)
      at $Proxy18.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:367)
      at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy37.start(Unknown Source)
      at org.jboss.ejb.EjbModule.startService(EjbModule.java:367)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
      at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:837)
      at $Proxy18.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:367)
      at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy14.start(Unknown Source)
      at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:570)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:836)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:828)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:645)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:608)
      at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy7.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:304)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:478)
      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.jbossInternalStart(ServiceMBeanSupport.java:271)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
      at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:837)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:367)
      at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy4.start(Unknown Source)
      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:251)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:836)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:645)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:608)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:592)
      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.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy5.deploy(Unknown Source)
      at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:407)
      at org.jboss.system.server.ServerImpl.start(ServerImpl.java:311)
      at org.jboss.Main.boot(Main.java:144)
      at org.jboss.Main$1.run(Main.java:389)
      at java.lang.Thread.run(Thread.java:534)
      Caused by: java.lang.ClassCastException
      at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:93)
      at org.jboss.metadata.XmlFileLoader.getDocument(XmlFileLoader.java:283)
      ... 127 more


      I have really no idea how to get this working.
      Does anybody has a solution?

        • 1. Re: 3.2.4: ClassCastException if using loader-repository
          Sascha Kulawk Newbie

          Sorry, the applcation.xml looks like this:

          <?xml version="1.0" encoding="UTF-8"?>
          <!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd">
          <application>
           <display-name>ConQuest</display-name>
           <description>Juwi|MacMillan Group GmbH - ConQuest</description>
           <module>
           <ejb>juwimm-cms-ejb.jar</ejb>
           </module>
           <module><web><web-uri>juwimm-axis.war</web-uri><context-root>/axis</context-root></web></module><module><web><web-uri>juwimm-admin.war</web-uri><context-root>/admin</context-root></web></module><module><web><web-uri>config.war</web-uri><context-root>/config</context-root></web></module>
           <module>
           <web>
           <web-uri>cocoon.war</web-uri>
           <context-root>/</context-root>
           </web>
           </module>
           <module>
           <web>
           <web-uri>xindice.war</web-uri>
           <context-root>/xindice</context-root>
           </web>
           </module>
           <module>
           <java>lib/commons-httpclient-2.0.jar</java>
           </module>
           <module>
           <java>lib/log4j-1.2.8.jar</java>
           </module>
           <module>
           <java>lib/axis.jar</java>
           </module>
           <module>
           <java>lib/commons-discovery.jar</java>
           </module>
           <module>
           <java>lib/commons-logging.jar</java>
           </module>
           <module>
           <java>lib/jaxen-full.jar</java>
           </module>
           <module>
           <java>lib/jaxrpc.jar</java>
           </module>
           <module>
           <java>lib/lucene-1.3-rc3.jar</java>
           </module>
           <module>
           <java>lib/saaj.jar</java>
           </module>
           <module>
           <java>lib/wsdl4j.jar</java>
           </module>
           <module>
           <java>lib/xalan-2.5.2.jar</java>
           </module>
           <module>
           <java>lib/xercesImpl.jar</java>
           </module>
           <module>
           <java>lib/xmlParserAPIs.jar</java>
           </module>
           <module>
           <java>lib/xmldb-api-20030701.jar</java>
           </module>
           <module>
           <java>lib/xmldb-api-sdk-20030701.jar</java>
           </module>
           <module>
           <java>lib/xmldb-common-20030701.jar</java>
           </module>
           <module>
           <java>lib/xmldb-xupdate-20040205.jar</java>
           </module>
           <module>
           <java>lib/xmlrpc-1.1.jar</java>
           </module>
           <module>
           <java>lib/xindice-1.1b4-dev.jar</java>
           </module>
          </application>
          


          • 2. Re: 3.2.4: ClassCastException if using loader-repository
            Sascha Kulawk Newbie

            Tried with a new JBoss 3.2.5, same procedure, same Exception...