• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Trouble in running the web application in WSAD v 6

 
Ranch Hand
Posts: 485
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author and cow tipper
Posts: 5009
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Cameron,
I fixed the issue by playing around with PARENT_LAST and PARENT_FIRST.

Thanks for your time.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic