You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Vijay Anjur <vi...@gmail.com> on 2006/03/06 17:44:23 UTC
Using jndi to get a DBCP BasicDataSource give ClassCastException
I am trying to cast datasource to BasicDataSource and getting a
classcastException during runtime. I tried to output .getClass().getName()
from the datasource to see what it
thinks I see basicDataSource. I found the following link which is exactly my
problem. Any ideas?
http://mail-archives.apache.org/mod_mbox/tomcat-users/200309.mbox/%3C3F58A597.60904@cyberspaceroad.com%3E
Re: Using jndi to get a DBCP BasicDataSource give ClassCastException
Posted by Vijay Anjur <vi...@gmail.com>.
Hi Christian,
You are right. The problem was I had duplicates in the WEB-INF/lib.I can't
tell you how long I spent trying to figure this out and I can't thank you
enough for your quick response.
Thanks you very very very much!!!!!!!!!!!!!!
On 3/6/06, Christian Hufgard <ch...@gmx.de> wrote:
>
> Hello Vijay,
>
>
> > I am trying to cast datasource to BasicDataSource and getting a
> > classcastException during runtime. I tried to output
> .getClass().getName()
> > from the datasource to see what it
> > thinks I see basicDataSource. I found the following link which is
> exactly my
> > problem. Any ideas?
>
> On the first look, this might be a Classloader issue. Where do you
> have your libraries placed? Maybe you have duplicate classes in the
> servers library dir an in WEB-INF/lib?
>
>
>
> --
> Best regards,
> Christian mailto:christian.hufgard@gmx.de
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>
Re: Using jndi to get a DBCP BasicDataSource give ClassCastException
Posted by Christian Hufgard <ch...@gmx.de>.
Hello Vijay,
> I am trying to cast datasource to BasicDataSource and getting a
> classcastException during runtime. I tried to output .getClass().getName()
> from the datasource to see what it
> thinks I see basicDataSource. I found the following link which is exactly my
> problem. Any ideas?
On the first look, this might be a Classloader issue. Where do you
have your libraries placed? Maybe you have duplicate classes in the
servers library dir an in WEB-INF/lib?
--
Best regards,
Christian mailto:christian.hufgard@gmx.de
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org