aspose file tools*
The moose likes Websphere and the fly likes setting classpath in WAS 5.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "setting classpath in WAS 5.0" Watch "setting classpath in WAS 5.0" New topic
Author

setting classpath in WAS 5.0

Rajeev Ravindran
Ranch Hand

Joined: Aug 27, 2002
Posts: 455
hi all,

I am trying to workout a simple Struts application using WSAD 5.1.0 + WAS 5.0. I was able to run the application in Tomcat, but when i tried the same in the WAS Test Enviroment using WSAD it throws java.lang.NoClassDefFoundError: org/apache/commons/dbcp/BasicDataSource. I restarted the Server after adding commons-dbcp-1.1.jar in the project classpath but the same exception occured.. Could anyone tell me where to add this jar file ? I thought WAS will take all the jar files in the project classpath, but its not happening. i am very new to WAS.. would appretiate if anyone could give me an url where i can study the in and out of WAS. I tried redbooks and ibm site but could not find the basic stuffs anywhere..



Thanks in advance,
Rajeev.


SCJP, SCWCD, SCBCD, Oracle Certified Professional (SQL n PL/SQL)
Ed Wallen
Ranch Hand

Joined: Feb 11, 2002
Posts: 34
In addition to adding it to your project classpath, you need to add the jar to your Web application's manifest file. Here's what this means in WSAD: right click on the web project and select "Properites". Next, select "Java Jar Dependencies". Make sure that the new Jar that you added to your application is checked (all checked jar entries get added to the Manifest.mf).

-Ed
Rajeev Ravindran
Ranch Hand

Joined: Aug 27, 2002
Posts: 455
Hi Ed,

Thanks for ur reply..

I just verified the "Java Jar Dependencies" on my project. I could not find any entries there Could u tell me how to add the jar to the manifest file ?

Thanks,
Rajeev
Ed Wallen
Ranch Hand

Joined: Feb 11, 2002
Posts: 34
Hey Rajeev,

Go back to your "Java JAR Dependencies" and see if you have an "Enterprise application project name" associated with your web project other than the default (this is a drop down on that screen). If not (or if it is associated with the Default EAR), you need to go to your J2EE project's application.xml and add your web project as a web module. Then go back to your "Java JAR Dependencies" and check all .jar files that you want to be included in your manifest.

-Ed
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: setting classpath in WAS 5.0