Having the jars in the same class loader will make debugging this much easier.

The class referenced is com/mchange/v2/resourcepool/BasicResourcePool$5 which points to an anonymous inner class.  For that to not be there is very odd.  Have you tried using the latest c3p0 jars?  Do you always get this error when trying to get a connection from c3p0?


On 4/30/08, Joćo Paulo Mafra <jpmneofito@gmail.com> wrote:
Hi Carl,

the jars are in WEB-INF/lib in the web app war file. It looks strange
because the class com.mchange.v2.resourcepool.BasicResourcePool, which
should be in the same jar, is loaded as seen in the stacktrace.


Thanks



2008/4/30 Carl Hall <carl.hall@gmail.com>:

>
>
> Where do you have your c3p0 and hibernate jars located on the server?  The
> problem reads like a class loader issue.
>
>
>
>
>
> On 4/30/08, Joćo Paulo Mafra <jpmneofito@gmail.com> wrote:
> >
> >
> >
> > Hi,
> >
> > My name is Joćo Paulo, I'm a brazilliam developer. I'm working in a
> > web application to tune its performance, and one of the tasks I've
> > performed were to use a connection properly (the app uses hibernate).
> > When several web app's run in a single tomcat, the following error
> > happens:
> >
> > java.lang.NoClassDefFoundError:
> >   com/mchange/v2/resourcepool/BasicResourcePool$5
> >
> com.mchange.v2.resourcepool.BasicResourcePool.destroyResource(BasicResourcePool.java:572)
> >
> com.mchange.v2.resourcepool.BasicResourcePool.removeResource(BasicResourcePool.java:902)
> >
> com.mchange.v2.resourcepool.BasicResourcePool.removeResource(BasicResourcePool.java:896)
> >
> com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:231)
> >
> com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:209)
> >
> com.mchange.v2.c3p0.PoolBackedDataSource.getConnection(PoolBackedDataSource.java:64)
> >
> org.hibernate.connection.C3P0ConnectionProvider.getConnection(C3P0ConnectionProvider.java:35)
> >
> org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:298)
> >
> org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:110)
> >         org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:137)
> >         org.hibernate.impl.SessionImpl.connection(SessionImpl.java:345)
> >
> br.com.vetorweb.EntryPoint.getParametroscliente(EntryPoint.java:139)
> >
> br.com.vetorweb.EntryPoint.getParametroscliente(EntryPoint.java:128)
> >
> br.com.vetorweb.security.SecurityFilter.doFilter(SecurityFilter.java:50)
> >         br.com.vetorweb.pool.PoolFilter.doFilter(PoolFilter.java:106)
> >
> > The app uses hibernate 3.0.5 and c3p0 0.8.5.2.
> >
> > I've searched in google about the error above, but I found few
> > results. One I think that may be the same of mine is described in:
> >    http://forum.hibernate.org/viewtopic.php?t=924774
> > but no solution is mentioned.
> >
> > Has someone some helpful information about this error?
> >
> >
> > Thanks... sorry my bad english... :'(
> >
> > Joćo Paulo
> >
> > -------------------------------------------------------------------------
> > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> > Don't miss this year's exciting event. There's still time to save $100.
> > Use priority code J8TL2D2.
> >
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> > _______________________________________________
> > c3p0-users mailing list
> > c3p0-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/c3p0-users
> >
>
>