Re: MySql Connector returning ?DataSource

2007-07-23 Thread Wade Chandler
From a JSP page try to make a MYSQL connection using just pure JDBC calls. It may be something to do with your JDBC classes and the directory your JAR files are housed. If I remember correctly I had to put my MYSQL JAR file in the shared folder so the server could access them. This versus having

Re: MySql Connector returning ?DataSource

2007-07-23 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Prem, Prem Padarath wrote: I am trying to set up a database resource in Tomcat 5.5.20 . I am having a problem getting a DataSource object back from a JNDI lookup. (I am getting a org.apache.tomcat.dbcp.dbcp.BasicDataSource object returned and

Re: MySql Connector returning ?DataSource

2007-07-23 Thread Prem Padarath
Hi Chris, o.a.t.d.d.BasicDataSource implements javax.sql.DataSource. What's the problem? The problem is that whatever is returned from the lookup call is causing an exception. I tested what is coming back and it is an o.a.t.d.d.B.D.S and it is putting it to a DataSource. The stack trace

Re: MySql Connector returning ?DataSource

2007-07-23 Thread Prem Padarath
Hi Wade, Yes, I have been able to connect with a plain java class and I have been able to connect from within Struts2 directly. It is when I try to get a DataSource object from Tomcat's JNDI that it messes. Prem On 7/23/07, Wade Chandler [EMAIL PROTECTED] wrote: From a JSP page try to make

Re: MySql Connector returning ?DataSource

2007-07-23 Thread David Smith
This could easily be caused by the mysql jar file not being in tomcat's common/lib directory -- especially if local, non JNDI access is working. --David Prem Padarath wrote: Hi Wade, Yes, I have been able to connect with a plain java class and I have been able to connect from within Struts2

Re: MySql Connector returning ?DataSource

2007-07-23 Thread Prem Padarath
David, I checked. The mysql jar file is in common\lib directory! I think my test app (direct access) would have had to have retrieved the jdbc classes from the Tomcat lib as I didn't include them in the war file. Thx, Prem On 7/23/07, David Smith [EMAIL PROTECTED] wrote: This could easily

RE: MySql Connector returning ?DataSource

2007-07-23 Thread Caldarale, Charles R
From: Prem Padarath [mailto:[EMAIL PROTECTED] Subject: Re: MySql Connector returning ?DataSource I checked. The mysql jar file is in common\lib directory! Is it also in the webapp's WEB-INF/lib directory? Having it in two places at once can cause all sorts of interesting problems

Re: MySql Connector returning ?DataSource

2007-07-23 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, Caldarale, Charles R wrote: From: Prem Padarath [mailto:[EMAIL PROTECTED] Subject: Re: MySql Connector returning ?DataSource I checked. The mysql jar file is in common\lib directory! Is it also in the webapp's WEB-INF/lib directory

Re: MySql Connector returning ?DataSource

2007-07-23 Thread Prem Padarath
Chuck, Checked...it is only in the one place. Thx, Prem On 7/23/07, Caldarale, Charles R [EMAIL PROTECTED] wrote: From: Prem Padarath [mailto:[EMAIL PROTECTED] Subject: Re: MySql Connector returning ?DataSource I checked. The mysql jar file is in common\lib directory! Is it also