1 Reply Latest reply on Mar 12, 2003 9:56 PM by adrian.brock

    ClassLoader issue

    muruga

      We are using JBoss 3.2 RC1.0 on Windows 2000. We are facing two class loading problems.. Here they are:

      Problem#1 ClassLoading problem with the .WAR (jsp files)
      --------------------------------------------------------
      Here is my conf/jboss-service.xml:



      Problem Description:
      The dynamically generated classes under C:/mycom/classes/ directory is not visible to the war file which is deployed under server/default/deploy/ directory.

      Steps to reproduce:
      Start the jboss server, then i generate MyClass.class and put it under C:/mycom/classes/ directory. After that deploy the myapp.war (has index.jsp) file which uses the MyClass.class. Try to invoke index.jsp file which intern invokes MyClass.class, then you will see ClassNotFoundException. Saying..MyClass is not found!

      Is there any way i can force the myapp.war to look at the classes which are in .


      Problem#2 ClassLoading problem with the myengine.jar (i.e. MyEngine.class)
      ---------------------------------------------------------------------
      Here is my conf/jboss-service.xml:




      Problem Description:
      The dynamically generated classes under C:/mycom/classes/ directory is not visible to the class which is in C:/mycom/lib/myengine.jar (which has MyEngine.java) file.

      Steps to reproduce:
      Start the jboss server, then generate MyClass.class and put it under C:/mycom/classes/ directory.
      After that, try to invoke MyEngine.class which intern invokes MyClass.class, then you will get ClassNotFoundException. Saying..MyClass is not found! Both the myengine.jar and MyClass.class is defined in

      Is there any way i can force the myengine.jar to look at the classes which are in .


      We also tried JBoss 3.2 RC2.0..which has the same issues. Thanks for your help.
      -muruga

        • 1. Re: ClassLoader issue

          For performance reasons jboss analyses each
          "codebase" to work out what packages are within
          the deployment. If your directory is empty when
          it is deployed (in this case at startup) it will
          ignore the deployment altogether.

          You could try putting a dummy class in the same
          package that will later be used for the
          generated classes, but I suspect what you really
          want to do is dynamically generate deployments
          as new packages are added.

          Regards,
          Adrian