5 Replies Latest reply on May 9, 2008 12:19 PM by Alexey Loubyansky

    ejb-client-jar and manifest Class-Path

    Alexey Loubyansky Master

      Issue http://jira.jboss.com/jira/browse/EJBTHREE-862 and ejb3 core spec chapter 20.6 example.

      I wrote a testcase based on the example in the spec. It fails to deploy. E.g. there is externalrefscoped-second.ear. It contains the ejb jar (called externalrefscoped-second-ejb.jar) and the jar with the client view interfaces of the ejb (called externalrefscoped-second-client-view.jar). The ejb jar doesn't include the client view interfaces but references the jar with them by the ejb-client-view element in the ejb-jar.xml and manifest.mf/Class-Path entry.

      Here is the stack trace of the failed deployment

      Caused by: java.lang.NoClassDefFoundError: org/jboss/ejb3/test/externalrefscoped/Second
       at java.lang.ClassLoader.defineClass1(Native Method)
       at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
       at org.jboss.classloader.spi.base.BaseClassLoader.access$200(BaseClassLoader.java:63)
       at org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:502)
       at org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:462)
       at java.security.AccessController.doPrivileged(Native Method)
       at org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseClassLoader.java:460)
       at org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseClassLoader.java:437)
       at org.jboss.classloader.spi.base.BaseDelegateLoader.loadClass(BaseDelegateLoader.java:134)
       at org.jboss.classloader.spi.filter.FilteredDelegateLoader.loadClass(FilteredDelegateLoader.java:131)
       at org.jboss.classloader.spi.base.ClassLoadingTask$ThreadTask.run(ClassLoadingTask.java:452)
       at org.jboss.classloader.spi.base.ClassLoaderManager.nextTask(ClassLoaderManager.java:254)
       at org.jboss.classloader.spi.base.ClassLoaderManager.process(ClassLoaderManager.java:148)
       at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:196)
       at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:1009)
       at org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(BaseClassLoader.java:728)
       at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:372)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
       at org.jboss.ejb3.Ejb3AnnotationHandler.populateBaseInfo(Ejb3AnnotationHandler.java:345)
       at org.jboss.ejb3.Ejb3DescriptorHandler.populateBaseInfo(Ejb3DescriptorHandler.java:325)
       at org.jboss.ejb3.Ejb3AnnotationHandler.getContainers(Ejb3AnnotationHandler.java:193)
       at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:638)
       at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:598)
       at org.jboss.ejb3.Ejb3Deployment.deployUrl(Ejb3Deployment.java:580)
       at org.jboss.ejb3.Ejb3Deployment.deploy(Ejb3Deployment.java:546)
       at org.jboss.ejb3.Ejb3Deployment.create(Ejb3Deployment.java:458)
       at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:176)


      It seems like the manifest.mf/Class-Path is ignored here.