File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Websphere and the fly likes Trouble in running the web application in WSAD v 6 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "Trouble in running the web application in WSAD v 6" Watch "Trouble in running the web application in WSAD v 6" New topic
Author

Trouble in running the web application in WSAD v 6

Parameswaran Thangavel
Ranch Hand

Joined: Mar 01, 2005
Posts: 485
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
Bartender

Joined: Oct 14, 2005
Posts: 18115
    
    8

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

Joined: Aug 26, 2006
Posts: 4968

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

Joined: Mar 01, 2005
Posts: 485
Cameron,
I fixed the issue by playing around with PARENT_LAST and PARENT_FIRST.

Thanks for your time.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Trouble in running the web application in WSAD v 6
 
Similar Threads
jsp - jar - dll
Applet settings in WSAD
Problem getting applet in WSAD
java.sql.SQLException: No suitable driver
Do we have Application specific class-path?