2 Replies Latest reply on Aug 12, 2002 8:38 PM by joelvogt

    Struts can't find Class using JBoss

    alloyd

      I am new to Struts and JBossand have run into issues cutting over from Tomcat 4.0.4 to JBoss/Tomcat 3.0/4.0.

      I had a sample Struts app that was working in standalone Tomcat, but when I deploy it to JBoss (through a WAR file) Struts is unable to load my classes. If I reference my classes from a JSP file everything loads/runs correctly, but if I try to use Struts I get the ClassNotFound error shown below.

      I suspect it may have something to do with the way I am preparing my WAR file, but I have not been able to track down the issue.

      I am happy to provide any other information that is relevant. Any help would be greatly appreciated.


      13:24:41,938 ERROR [Engine] action: Error creating Action instance for path '/list', class name 'com.arteric.actions.ListDVDAction'
      java.lang.ClassNotFoundException: com.arteric.actions.ListDVDAction
      at org.jboss.mx.loading.UnifiedLoaderRepository.loadClass(UnifiedLoaderRepository.java:152)
      at org.jboss.mx.loading.UnifiedClassLoader.loadClass(UnifiedClassLoader.java:285)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:262)
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:322)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:130)
      at org.apache.struts.action.ActionServlet.processActionCreate(ActionServlet.java:1630)

      ......snip.......

        • 1. Re: Struts can't find Class using JBoss
          alloyd

          OK, I am making progress--if I add the Class-Path attribute to my manifest.mf file with the absolute FS path to the location where my .jar file gets deployed I can get this to work. But this can't be right. Can it?

          What is the right way to do this?

          • 2. Re: Struts can't find Class using JBoss
            joelvogt

            struts.jar should be in WEB-INF/lib and it should work from here. From my experience you shouldn't need it on your manifest class path.
            You might want to check your classes are not on the classpath from some other method, as this will cause the class loader issues you are seeing