0 Replies Latest reply on Jul 21, 2005 3:44 AM by Justin

    ClassNotFoundException when service depends on jar

    Justin Newbie

      JBoss 3.2.7

      I have a service, configured by the following xml file, that depends on the classes in a jar file. The jar file (simple.jar) is present in the deploy directory of the server.

      <?xml version="1.0" encoding="UTF-8"?>
       <mbean code="com.test.Simple"
       <classpath codebase="deploy" archives="simple.jar"/>

      I get the following error on startup:
      18:34:09,956 ERROR [MainDeployer] could not create deployment: file:/C:/dev/se
      org.jboss.deployment.DeploymentException: create operation failed for package
       nested throwable: (org.jboss.deployment.DeploymentException: No ClassLoaders
      und for: com.test.Simple; - nested throwable: (java.lang.ClassNotFoundException
       No ClassLoaders found for: com.test.Simple))
       at org.jboss.deployment.SARDeployer.create(SARDeployer.java:227)
       at org.jboss.deployment.MainDeployer.create(MainDeployer.java:783)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:640)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:604)
       at sun.reflect.GeneratedMethodAccessor39.invoke(Unknown Source)

      Is there any way to specify that a service depends on a jar file? The only workaround I see is by putting the jar file in the lib directory of the default server.