5 Replies Latest reply on Mar 14, 2006 5:39 AM by prashanth nagaraj

    JDom + JBoss3.2.6

    Fernando Rodrigues Newbie

      Hello,
      I´ve an application wich uses jdom but when i deploy it into JBoss 3.2.6 or 3.2.7RC1 i get an exception at run-time when i use something from jdom, like:

      java.lang.NoClassDefFoundError: org/jdom/Text.

      What i don´t understand is that i can i copy the jar in JBoss in any place and nothing happens. I can´t find jdom.jar from the original package, so i couldn´t do something bad like replacing (in this time, i just trying to get things working). My application have that jar.. so why it can´t found the lib?
      In JBoss 3.2.3 works well, maybe because there is a jdom.jar inside jboss/lib.. but in the others version, i put it there and nothing....

      Tks

        • 1. Re: JDom + JBoss3.2.6
          Fernando Rodrigues Newbie

          I solved it with a very bad action: i removed jaxen.jar from server/lib.

          This is very weird... i know that my app can invoke the jdom methods but when it invoke the jaxen method it gave me the exception. I think this is because my app is using jaxen.jar from server/lib. The weird thing is that i can put jdom.jar in the server/lib and javaclassloadingcompliante true and false and the same problem occur. I also pus the jaxen and jdom in the server/default/lib (i´ve heard that server/lib is just for startup, don´t know if this is true) and removed in server/lib and the same problem persist. I also removed all these lib from my app to just use the jaxen and jdom from server/lib and/or server/default/lib and the problem persist. The only way i found is remove the jaxen.jar and force to use those in my app.

          I´ve resolved my problem but i don´t like this way, it must be a solution more correct.
          Tks

          • 2. Re: JDom + JBoss3.2.6
            Fernando Rodrigues Newbie

            Sorry.. its not server/lib, is jbossXXX/lib.

            • 3. Re: JDom + JBoss3.2.6
              Scott Stark Master

              If you have a sample application that demonstrates the problem create a bug report on http://jira.jboss.com/jira/browse/JBAS so I can look at it.

              You will have to use scoped class loading and include both the jdom and jaxen jars in the application scope to override the jboss jars.

              • 4. Re: JDom + JBoss3.2.6
                prashanth nagaraj Newbie

                Hi,

                I was getting the above error.

                I had jdom.jar in my jboss/server/all/lib directory and jaxen in jboss/lib directory. If I move the jaxen.jar from jboss/lib to jboss/server/all/lib directory, the problem gets fixed.

                Thanks for the above info.

                -prashanth

                • 5. Re: JDom + JBoss3.2.6
                  prashanth nagaraj Newbie

                  Continuation with my above response.....

                  The problem is in jboss4.0, it does not works other way round like moving jdom.jar to jboss/lib directory where jaxen.jar is available. The deployment of ejbs fails in my application which internally loads jdom classes

                  Now that I ahve moved jaxen.jar to server specific lib directory, it wont eb available for other servers. If anybody finds a better soln let me know

                  thanks
                  prashanth