Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

dom4j xpath parsing problem

 
Ranch Hand
Posts: 510
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

I'm trying to parse the xml file below using dom4j xpath tool.
however the java code below give me an exception :



what am i doing wrong ?
thanks for helping.

java code:



the xml file :
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know if you've tried this or not,
but it seems to me that there's a problem with the classpath setup, particularly concerning the org.jaxen package.

After checking the cp setup, I'd make sure the directory structure was correct.

Upon failure after that, I'd clear the .classes around there and recompile.

Hope that helps!
 
Yahya Elyasse
Ranch Hand
Posts: 510
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for reply.

i made sure to add dom4j.jar to my classpath.i also cleaned old .class files & recompile but still got same problem!

hope someone could help me discover the problem.

thanks
 
Sheriff
Posts: 24654
58
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's a plain ordinary classpath problem. You don't have org/jaxen/JaxenException in your classpath. So find out what jar file it's in and add that jar file to your classpath.
 
Yahya Elyasse
Ranch Hand
Posts: 510
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks
i added the missing jaxen.jar to classpath.
now the error disappeared .i fixed the code & now i'm getting correct results.
many thanks for your helpful replies.
 
ice is for people that are not already cool. Chill with this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!