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)
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).
Joined: Aug 27, 2002
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 ?
Joined: Feb 11, 2002
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.