Announcement Announcement Module
Collapse
No announcement yet.
JBoss: ClassNotFoundException Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • JBoss: ClassNotFoundException

    Hi,

    I have a small ejb jar (ejb3) deployed on JBoss 4.0.4, and I get the below exception. I've added the spring jars to the Class-Path entry of the manifest file of the ejb jar. It happens when I put the spring jars in the lib files of the server, or when I create an ear file. I'd appreciate any help.

    David

    The Error log is:
    Code:
    2006-11-15 17:08:16,683 DEBUG [org.jboss.deployment.MainDeployer] Starting deployment of package: file:/C:/Dev/servers/jboss4/server/ejb3/deploy/helloweb.ear
    2006-11-15 17:08:16,683 DEBUG [org.jboss.deployment.MainDeployer] Starting deployment (init step) of package at: file:/C:/Dev/servers/jboss4/server/ejb3/deploy/helloweb.ear
    2006-11-15 17:08:16,683 DEBUG [org.jboss.deployment.MainDeployer] Copying file:/C:/Dev/servers/jboss4/server/ejb3/deploy/helloweb.ear -> C:\Dev\servers\jboss4\server\ejb3\tmp\deploy\tmp31437helloweb.ear
    2006-11-15 17:08:16,714 DEBUG [org.jboss.deployment.MainDeployer] using deployer org.jboss.deployment.EARDeployer@a4488
    2006-11-15 17:08:16,714 INFO  [org.jboss.deployment.EARDeployer] Init J2EE application: file:/C:/Dev/servers/jboss4/server/ejb3/deploy/helloweb.ear
    2006-11-15 17:08:16,745 DEBUG [org.jboss.deployment.EARDeployer] Extracted non-deployable content: META-INF/MANIFEST.MF
    2006-11-15 17:08:16,761 DEBUG [org.jboss.deployment.EARDeployer] Extracted non-deployable content: aopalliance-1.0.jar
    2006-11-15 17:08:16,808 DEBUG [org.jboss.deployment.EARDeployer] Extracted non-deployable content: commons-collections-3.1.jar
    2006-11-15 17:08:16,839 DEBUG [org.jboss.deployment.EARDeployer] Extracted non-deployable content: commons-lang-2.1.jar
    2006-11-15 17:08:16,854 DEBUG [org.jboss.deployment.EARDeployer] Extracted non-deployable content: commons-logging-1.0.4.jar
    2006-11-15 17:08:16,870 DEBUG [org.jboss.deployment.EARDeployer] Extracted non-deployable content: helloweb-user-1.0-SNAPSHOT-client.jar
    2006-11-15 17:08:16,886 DEBUG [org.jboss.deployment.EARDeployer] Extracted deployable content: helloweb-user-1.0-SNAPSHOT.jar
    2006-11-15 17:08:16,901 DEBUG [org.jboss.deployment.EARDeployer] Extracted non-deployable content: log4j-1.2.13.jar
    2006-11-15 17:08:16,901 DEBUG [org.jboss.deployment.EARDeployer] Extracted non-deployable content: META-INF/application.xml
    2006-11-15 17:08:16,933 DEBUG [org.jboss.deployment.EARDeployer] Extracted non-deployable content: spring-aop-2.0.jar
    2006-11-15 17:08:16,948 DEBUG [org.jboss.deployment.EARDeployer] Extracted non-deployable content: spring-beans-2.0.jar
    2006-11-15 17:08:16,964 DEBUG [org.jboss.deployment.EARDeployer] Extracted non-deployable content: spring-context-2.0.jar
    2006-11-15 17:08:16,979 DEBUG [org.jboss.deployment.EARDeployer] Extracted non-deployable content: spring-core-2.0.jar
    2006-11-15 17:08:16,979 DEBUG [org.jboss.deployment.EARDeployer] Extracted non-deployable content: spring-dao-2.0.jar
    2006-11-15 17:08:16,995 DEBUG [org.jboss.deployment.EARDeployer] Extracted non-deployable content: spring-ldap-1.1.jar
    2006-11-15 17:08:17,011 DEBUG [org.jboss.deployment.EARDeployer] Extracted non-deployable content: META-INF/maven/com.mobimate.helloweb/helloweb-ear/pom.xml
    2006-11-15 17:08:17,026 DEBUG [org.jboss.deployment.EARDeployer] Extracted non-deployable content: META-INF/maven/com.mobimate.helloweb/helloweb-ear/pom.properties
    2006-11-15 17:08:17,026 DEBUG [org.jboss.deployment.EARDeployer] Deployment Info: org.jboss.deployment.DeploymentInfo@13a5a725 { url=file:/C:/Dev/servers/jboss4/server/ejb3/tmp/deploy/tmp31437helloweb.ear-contents/helloweb-user-1.0-SNAPSHOT.jar }
      deployer: null
      status: null
      state: CONSTRUCTED
      watch: file:/C:/Dev/servers/jboss4/server/ejb3/tmp/deploy/tmp31437helloweb.ear-contents/helloweb-user-1.0-SNAPSHOT.jar
      altDD: null
      lastDeployed: 0
      lastModified: 0
      mbeans:
    , isDirectory: false
    2006-11-15 17:08:17,026 DEBUG [org.jboss.deployment.DeploymentInfo] createLoaderRepository from config: LoaderRepositoryConfig(repositoryName: JMImplementation:service=LoaderRepository,name=Default, repositoryClassName: null, configParserClassName: null, repositoryConfig: null)
    2006-11-15 17:08:17,026 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.UnifiedLoaderRepository3@1729854, cl=org.jboss.mx.loading.UnifiedClassLoader3@14f79cb{ url=file:/C:/Dev/servers/jboss4/server/ejb3/tmp/deploy/tmp31437helloweb.ear ,addedOrder=0}
    2006-11-15 17:08:17,026 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.UnifiedLoaderRepository3@1729854, cl=org.jboss.mx.loading.UnifiedClassLoader3@14f79cb{ url=file:/C:/Dev/servers/jboss4/server/ejb3/tmp/deploy/tmp31437helloweb.ear ,addedOrder=0}
    2006-11-15 17:08:17,026 DEBUG [org.jboss.mx.loading.UnifiedLoaderRepository3] Adding org.jboss.mx.loading.UnifiedClassLoader3@14f79cb{ url=file:/C:/Dev/servers/jboss4/server/ejb3/tmp/deploy/tmp31437helloweb.ear ,addedOrder=0}
    2006-11-15 17:08:17,026 DEBUG [org.jboss.mx.loading.ClassLoaderUtils] Multiple class loaders found for pkg: 
    2006-11-15 17:08:17,136 DEBUG [org.jboss.deployment.MainDeployer] found 1 subpackages of file:/C:/Dev/servers/jboss4/server/ejb3/deploy/helloweb.ear
    2006-11-15 17:08:17,136 DEBUG [org.jboss.deployment.MainDeployer] Starting deployment (init step) of package at: file:/C:/Dev/servers/jboss4/server/ejb3/tmp/deploy/tmp31437helloweb.ear-contents/helloweb-user-1.0-SNAPSHOT.jar
    2006-11-15 17:08:17,198 DEBUG [org.jboss.deployment.MainDeployer] using deployer MBeanProxyExt[jboss.ejb3:service=EJB3Deployer]
    2006-11-15 17:08:17,198 DEBUG [org.jboss.ejb3.EJB3Deployer] looking for nested deployments in : file:/C:/Dev/servers/jboss4/server/ejb3/tmp/deploy/tmp31437helloweb.ear-contents/helloweb-user-1.0-SNAPSHOT.jar
    2006-11-15 17:08:17,214 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] Added url: file:/C:/Dev/servers/jboss4/server/ejb3/tmp/deploy/tmp31437helloweb.ear-contents/helloweb-user-1.0-SNAPSHOT.jar, to ucl: org.jboss.mx.loading.UnifiedClassLoader3@14f79cb{ url=file:/C:/Dev/servers/jboss4/server/ejb3/tmp/deploy/tmp31437helloweb.ear ,addedOrder=47}
    2006-11-15 17:08:17,214 DEBUG [org.jboss.deployment.MainDeployer] found 0 subpackages of file:/C:/Dev/servers/jboss4/server/ejb3/tmp/deploy/tmp31437helloweb.ear-contents/helloweb-user-1.0-SNAPSHOT.jar
    2006-11-15 17:08:17,214 DEBUG [org.jboss.deployment.MainDeployer] Watching new file: file:/C:/Dev/servers/jboss4/server/ejb3/deploy/helloweb.ear
    2006-11-15 17:08:17,214 DEBUG [org.jboss.deployment.MainDeployer] create step for deployment file:/C:/Dev/servers/jboss4/server/ejb3/deploy/helloweb.ear
    2006-11-15 17:08:17,214 DEBUG [org.jboss.deployment.MainDeployer] create step for deployment file:/C:/Dev/servers/jboss4/server/ejb3/tmp/deploy/tmp31437helloweb.ear-contents/helloweb-user-1.0-SNAPSHOT.jar
    2006-11-15 17:08:17,214 DEBUG [org.jboss.ws.server.WebServiceDeployerEJB3] create: file:/C:/Dev/servers/jboss4/server/ejb3/tmp/deploy/tmp31437helloweb.ear-contents/helloweb-user-1.0-SNAPSHOT.jar
    2006-11-15 17:08:17,214 DEBUG [org.jboss.ejb3.EJB3Deployer] create, helloweb-user-1.0-SNAPSHOT.jar
    2006-11-15 17:08:17,370 DEBUG [org.jboss.ejb3.EJB3Deployer] Deploying: file:/C:/Dev/servers/jboss4/server/ejb3/tmp/deploy/tmp31437helloweb.ear-contents/helloweb-user-1.0-SNAPSHOT.jar
    2006-11-15 17:08:17,370 DEBUG [org.jboss.system.ServiceController] Creating service jboss.j2ee:service=EJB3,module=helloweb-user-1.0-SNAPSHOT.jar
    2006-11-15 17:08:17,370 DEBUG [org.jboss.ejb3.Ejb3Module] Creating jboss.j2ee:service=EJB3,module=helloweb-user-1.0-SNAPSHOT.jar
    2006-11-15 17:08:17,370 DEBUG [org.jboss.ejb3.security.JaccHelper] Initialising JACC Context for deployment: helloweb-user-1.0-SNAPSHOT.jar
    2006-11-15 17:08:17,464 DEBUG [org.jboss.ejb3.Ejb3Module] Initialization failed jboss.j2ee:service=EJB3,module=helloweb-user-1.0-SNAPSHOT.jar
    java.lang.ClassNotFoundException: No ClassLoaders found for: com.mobimate.user.dao.ldap.PersonDaoBean
    	at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:306)
    	at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:511)
    	at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:405)
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    	at ...
    2006-11-15 17:08:17,464 WARN  [org.jboss.system.ServiceController] Problem creating service jboss.j2ee:service=EJB3,module=helloweb-user-1.0-SNAPSHOT.jar
    java.lang.ClassNotFoundException: No ClassLoaders found for: com.mobimate.user.dao.ldap.PersonDaoBean
    	at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:306)
    	at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:511)
    	at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:405)
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    	at ...
    2006-11-15 17:08:17,479 DEBUG [org.jboss.deployment.MainDeployer] Done with create step of deploying helloweb-user-1.0-SNAPSHOT.jar
    2006-11-15 17:08:17,479 DEBUG [org.jboss.system.ServiceController] Creating service jboss.j2ee:service=EARDeployment,url='helloweb.ear'
    2006-11-15 17:08:17,479 DEBUG [org.jboss.deployment.EARDeployment] Creating jboss.j2ee:service=EARDeployment,url='helloweb.ear'
    2006-11-15 17:08:17,479 DEBUG [org.jboss.deployment.EARDeployment] Created jboss.j2ee:service=EARDeployment,url='helloweb.ear'
    2006-11-15 17:08:17,479 DEBUG [org.jboss.system.ServiceController] Creating dependent components for: jboss.j2ee:service=EARDeployment,url='helloweb.ear' dependents are: []
    2006-11-15 17:08:17,479 DEBUG [org.jboss.deployment.MainDeployer] Done with create step of deploying helloweb.ear

  • #2
    try adding the spring jars as <java> modules in your application.xml file.

    Code:
    \blah.ear
      \lib
        \spring
           spring.jar
    and then in application.xml

    <module>
    <java>lib\spring\spring.jar</java>
    </module>

    Comment


    • #3
      Doesn't work

      I've tried it, it doesn't work. The error appears with the java modules or without them.

      Comment


      • #4
        Found an answer. Since my app is an ejb3 one, so I had to have the file jboss-app.xml in the META-INF of the ear. It content has to be
        Code:
        <jboss-app>
              <loader-repository> 
              myapp:app=ejb3
              </loader-repository> 
        </jboss-app>
        "myapp" should be a unique name.

        Hope it will help someone.

        Comment

        Working...
        X