Today I had faced an issue related with jDom Xpath. In my project I am using Xpath to get Nodes from a web service request. But during this parsing a ‘Class not found exception‘ was throwing continuously and the funny thing is, the class which was not finding was already existing in that jar file. It was a crutial moment for me becouse a demo was going to be happen the day after next day and I have to deploy and give that web service to my friends working in the .net side to continue their work.
The exception was just like the following…
org.jdom.JDOMException: java.lang.NoClassDefFoundError: org/jdom/Text:
The stack trace was like follows
Caused by: java.lang.NoClassDefFoundError: org/jdom/Text
I searched in net and got the following link. Here the author specified the non availability of the jaxen.jar file in the lib folder. This helped me a lot… thanks Connor.. But when I checked in my project lib [ I am also using jBoss for this project] , I found this ‘jaxen.jar’ is already there in my jBoss lib as well as in webapps lib.
I tried by downloading the following jaxen jar, “jaxen-1.1-beta-9.jar” and put in the lib folder. And Its Worked !!! Hope this post will helpful in future, for me or to any of my friends 🙂