0

I'm deploying my web application to Weblogic 10.3.6 on localhost and everything works as it should. But when i deploy it to the same version of weblogic which is runnig on a remote server, it throws this:

JDOMException: java.lang.NoClassDefFoundError: org/jdom/Parent: org/jdom/Parent

The application is packed in a war file, and i upload the same file to both of the servers, but it works only on my local weblogic. Jdom.jar is located in WEB-ING/lib. I searched for jdom.jar in the directory where the remote weblogic is installed, and there is no other instance of it.

Joachim Sauer
  • 302,674
  • 57
  • 556
  • 614
  • 1
    I hope you mean WEB-INF/lib. One of these two statements is incorrect: all is not well when you run locally, because you do something different from the server that masks the problem, or there is a JDOM on the server that you missed. – duffymo Sep 10 '12 at 11:51

2 Answers2

2

NoClassDefFoundError means that the class which is required by org.jdom.Parent is not found, not org.jdom.Parent itself. Some dependency is missing from your WEB-INF/lib folder.

If you are building this using maven, make sure that you include all the required optional library as well.

gigadot
  • 8,879
  • 7
  • 35
  • 51
  • So jdom require other libraries? Im not using maven – user1660008 Sep 10 '12 at 12:08
  • unfortunately, i couldn't find what it depends on either. Have you tried Ted answer? If the required class is not found, it may be because of class loading conflict. – gigadot Sep 10 '12 at 13:18
1

possibly class loading conflict issue, please try configure WEB-INF\weblogic.xml

<container-descriptor>
                <prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>

prefer-web-inf-classes

The element, if set to true, will cause classes located in the WEB-INF directory of a Web application to be loaded in preference to classes loaded in the application or system classloader. The default value is false. A value specified in the console will take precedence over a value set manually

Ted Shaw
  • 2,298
  • 14
  • 8