3 Replies Latest reply on Aug 18, 2005 2:41 PM by Warg Krumpf

    ClassNotFound in .par when using <loader-repository>

    Warg Krumpf Newbie

      When i try to enable "scoped classloading" by adding the famous "<loader-repository>" to jboss-app.xml in the META-INF of my .ear,
      JBoss fails to deploy the .par which is contained in the .ear, because it can't find the entitybean classes.
      But all needed classes are in this .par and without the jboss-app.xml it works fine.


      java.lang.IllegalArgumentException: class not found
      at org.hibernate.ejb.HibernatePersistence.addNamedAnnotatedClasses(HibernatePersistence.java:556)
      at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:389)
      at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:272)
      at org.jboss.ejb3.Ejb3Deployment.initializeManagedEntityManagerFactory(Ejb3Deployment.java:476)
      at org.jboss.ejb3.Ejb3Deployment.create(Ejb3Deployment.java:219)
      at org.jboss.ejb3.Ejb3Module.createService(Ejb3Module.java:34)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:252)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:234)
      at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:974)
      at $Proxy0.create(Unknown Source)
      at org.jboss.system.ServiceController.create(ServiceController.java:356)
      at org.jboss.system.ServiceController.create(ServiceController.java:295)
      at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy10.create(Unknown Source)
      at org.jboss.ejb3.EJB3Deployer.create(EJB3Deployer.java:178)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:919)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:909)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:773)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:737)
      at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy6.deploy(Unknown Source)


        • 1. Re: ClassNotFound in .par when using <loader-repository>
          Bill Burke Master

          Can you be really nice and post a simple test case that we can reproduce easily on JIRA?

          Thanks

          • 2. Re: ClassNotFound in .par when using <loader-repository>
            Warg Krumpf Newbie

            yep, i stripped it down to just two classes...

            I didn't find a way to attach stuff in this forum, so i just mialed it to " bill at jboss dot org "

            fyi, the exception trace is:

            18:23:52,600 INFO [EARDeployer] Init J2EE application: file:/D:/jboss/jboss-4.0.3RC2/server/default/deploy/smartea.ear/
            18:23:52,640 INFO [JaccHelper] Initialising JACC Context for deployment: smartea.par
            18:23:52,640 INFO [Ejb3Deployment] Found persistence.xml file in EJB3 jar
            18:23:52,650 INFO [HibernatePersistence] found EJB3 Entity bean: de.eyetea.smartea.entity.admin.RoleDefinition
            18:23:52,650 INFO [HibernatePersistence] found EJB3 @EmbeddableSuperclass: de.eyetea.smartea.entity.BaseEntity
            18:23:52,650 WARN [ServiceController] Problem creating service jboss.j2ee:service=EJB3,module=smartea.par
            java.lang.IllegalArgumentException: class not found
             at org.hibernate.ejb.HibernatePersistence.addNamedAnnotatedClasses(HibernatePersistence.java:556)
             at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:389)
             at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:272)
             at org.jboss.ejb3.Ejb3Deployment.initializeManagedEntityManagerFactory(Ejb3Deployment.java:476)
             at org.jboss.ejb3.Ejb3Deployment.create(Ejb3Deployment.java:219)
             at org.jboss.ejb3.Ejb3Module.createService(Ejb3Module.java:34)
             at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:252)
             at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:234)
             at sun.reflect.GeneratedMethodAccessor72.invoke(Unknown Source)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
             at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:974)
             at $Proxy0.create(Unknown Source)
             at org.jboss.system.ServiceController.create(ServiceController.java:356)
             at org.jboss.system.ServiceController.create(ServiceController.java:295)
             at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
             at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
             at $Proxy10.create(Unknown Source)
             at org.jboss.ejb3.EJB3Deployer.create(EJB3Deployer.java:178)
             at org.jboss.deployment.MainDeployer.create(MainDeployer.java:919)
             at org.jboss.deployment.MainDeployer.create(MainDeployer.java:909)
             at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:773)
             at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:737)
             at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
             at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
             at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
             at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
             at $Proxy6.deploy(Unknown Source)
             at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:319)
             at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:489)
             at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:192)
             at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:203)
             at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:182)
            Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: de.eyetea.smartea.entity.admin.RoleDefinition
             at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:292)
             at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:475)
             at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:377)
             at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
             at org.hibernate.ejb.HibernatePersistence.addNamedAnnotatedClasses(HibernatePersistence.java:549)
             ... 52 more
            18:23:52,660 INFO [EJB3Deployer] Deployed: file:/D:/jboss/jboss-4.0.3RC2/server/default/deploy/smartea.ear/smartea.par/
            18:23:52,670 INFO [EARDeployer] Started J2EE application: file:/D:/jboss/jboss-4.0.3RC2/server/default/deploy/smartea.ear/