This week's giveaway is in the Spring forum.
We're giving away four copies of Learn Spring Security (video course) and have Eugen Paraschiv on-line!
See this thread for details.
Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Trouble in running the web application in WSAD v 6

 
Parameswaran Thangavel
Ranch Hand
Posts: 485
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all
when i deployed my web application as EAR and tried to run i got the following exception



Clearly it says the class is not in the class path. but i do included that jar file (Jdom.jar which has xmloutputter file) in web-inf/lib folder. whether i need to add this jar to any other folder.

I faced the similar error when i tried running my app in JRun server and the issue is fixed by adding that jar file to the server's lib folder.

I donno why i need to add it to the server's lib folder.

Any idea why it is behaving in this fashion.
and give me the solution how to fix this in WSAD.
 
Paul Clapham
Sheriff
Posts: 20713
30
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Parameswaran Thangavel:
Clearly it says the class is not in the class path.
Well, no, it doesn't say that. It says you have created an org.jdom.output.XMLOutputter object (successfully) and you are trying to call some setTrimAllWhite method of that object, but the class does not actually have such a method.

And when I look at the documentation for JDOM 1.0, there is no such method in the XMLOutputter class. In fact it doesn't exist in any class in JDOM 1.0. So if your code compiles correctly you must be compiling against some other version of JDOM. Make sure you include the jar file containing that version in your web application. Or, preferably, update your code to work with JDOM 1.0.
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a total classpath issue. You have one version of the class in one place on your filesystem, and another version on another place.

There are various ways you can address this, and sometimes playing around with PARENT_FIRST and PARENT_LAST classloader configurations can solve this problem.

A chapter in my book What is WebSphere? is dedicated to classloaders. I put an unedited section of it up here if you want to see it:

Getting Loaded with the WebSphere Classloaders

Classloader issues are very annoying, and are very common with differing versions of the xml parsers.

Let us know if you successfully fix the problem.

-Cameron McKenzie
 
Parameswaran Thangavel
Ranch Hand
Posts: 485
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cameron,
I fixed the issue by playing around with PARENT_LAST and PARENT_FIRST.

Thanks for your time.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic