1 Reply Latest reply on Nov 26, 2002 8:44 PM by Liam Magee

    Struts and Tomcat 4.1.12 - can loader-repository help?

    John Dickson Newbie


      Like a lot of others (see list below), we're having problems getting our Struts 1.1-beta web-app running with JBoss 3.0.x_Tomcat-4.1.12 (see below for ClassNotFoundException on deploy).

      I presume this is caused by the fact that Tomcat 4.1.12 ships some of the Jakarta Commons libraries, as does Struts, and the library versions are different. I tried to get around this by defining a <loader-repository> in jboss-app.xml for the .ear file, hoping that our application would find its own versions of the Commons file, but this didn't solve the problem.

      So my question is, shouldn't defining a classloader repository for the application cause loading of all classes from that repository if found there, and only otherwise should they be loaded from the UCL repository? Have I misunderstood this? Or do I have that right but it won't solve my library versioning problem?

      The exception we get (on deployment of the .ear) is:

      12:04:53,791 ERROR [Digester] Begin event threw exception
      java.lang.ClassNotFoundException: No ClassLoaders found for: org.apache.commons.validator.ValidatorAction
      at org.jboss.mx.loading.LoadMgr.beginLoadTask(LoadMgr.java:138)
      at org.jboss.mx.loading.UnifiedClassLoader3.loadClass(UnifiedClassLoader3.java:140)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
      at org.apache.commons.digester.ObjectCreateRule.begin(ObjectCreateRule.java:252)
      at org.apache.commons.digester.Digester.startElement(Digester.java:1237)
      at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1488)
      at org.apache.crimson.parser.Parser2.content(Parser2.java:1779)

      Other threads with the same problem:
      http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t=forums/ ..................... JD