tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andy gordon <efha...@yahoo.com>
Subject Re: cannot setup JNDI with MySQL
Date Thu, 06 Oct 2005 10:16:00 GMT
One more thing and i may have missed it in your note: Did you say you placed mysql's jar file
in the common\lib directory ?

John Cherouvim <jc@eworx.gr> wrote:Hello

I've been trying to setup a mysql connection pool using JNDI as shown in 
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html
But no luck.

I never get to see the datasource registered Tomcat Administration Tool.
I've included in server.xml the following lines somewhere inside the 
.. 




factory 
org.apache.commons.dbcp.BasicDataSourceFactory 


driverClassName 
com.mysql.jdbc.Driver 


url 
jdbc:mysql://localhost:3306/dea?autoReconnect=true 



username myusername 


password mypassword 


maxActive 20 


maxIdle 10 


maxWait 40 




I have Tomcat/5.0.28

And the following files in common\lib
mysql-connector-java-3.1.10-bin.jar
commons-collections-3.1.jar
commons-dbcp-1.2.1.jar
commons-pool-1.2.jar
*

*What I get in tomcat\logs\stdout.log is:
NotifyUtil::java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:295)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:161)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:148)
at java.net.Socket.connect(Socket.java:425)
at java.net.Socket.connect(Socket.java:375)
at sun.net.NetworkClient.doConnect(NetworkClient.java:139)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:366)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:582)
at sun.net.www.http.HttpClient.(HttpClient.java:292)
at sun.net.www.http.HttpClient.(HttpClient.java:253)
at sun.net.www.http.HttpClient.New(HttpClient.java:321)
at sun.net.www.http.HttpClient.New(HttpClient.java:306)
at sun.net.www.http.HttpClient.New(HttpClient.java:301)
at 
sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:469)
at 
sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:460)
at 
sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:516)
at 
org.netbeans.modules.web.monitor.server.NotifyUtil$RecordSender.run(NotifyUtil.java:237)


What did I miss? I've even tried setting up the JNDI in the 
conf\Catalina\localhost\myapp.xml
And also tried instead of 

I also tried all that with the org.gjt.mm.mysql.Driver

Regards,
I.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org



		
---------------------------------
Yahoo! for Good
 Click here to donate to the Hurricane Katrina relief effort. 
Mime
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message