This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Struts and the fly likes java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSource Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSource" Watch "java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSource" New topic

java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSource

Sivakumar Subburaman

Joined: Jun 10, 2011
Posts: 13

I am using RAD 8 as IDE and WAS 7.

When I am starting my application, I get this error.

Caused by: java.lang.NoClassDefFoundError: org.apache.commons.dbcp.BasicDataSource
at org.quartz.utils.PoolingConnectionProvider.initialize(
at org.quartz.utils.PoolingConnectionProvider.<init>(
at org.quartz.impl.StdSchedulerFactory.instantiate(
at org.quartz.impl.StdSchedulerFactory.getScheduler(

I have included the latest commons-dbcp-1.4.jar in WEB-INF\lib folder and added to java build path.

I am not sure, why am still getting error.

Any help appreciated!

Shankar Tanikella
Ranch Hand

Joined: Jan 30, 2011
Posts: 329

Hi Siva, Do not know much about your exact problem but it looks like the version of your jar doesn't have the class being looked up. My reference is from here. Try opening the jar file and see if the class file is there in the intended package structure.

Have Fun with Java
little,little.. little by little makes a lot..
Sivakumar Subburaman

Joined: Jun 10, 2011
Posts: 13
Thanks Shankar for your reference!

I did verify to make sure that referenced class is available in that jar. I am particularly using commons-dbcp-1.4.jar, since I am using Java 6. As per apache, 1.4 version is developed for Java 6.

I am also understood from my collegue that he does not face this issue. But he is using WAS 6.1 and I am using WAS 7.

Let me know if you require any other info.

I agree. Here's the link:
subject: java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSource
It's not a secret anymore!