tomcat-users mailing list archives

John,
Possibly the following will help as it is listed in the 5.5 JDBC DataSource html page in the
User guide: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasource-examples-howto.html
"Please note that JNDI resource configuration has changed somewhat between Tomcat 5.0.x and
Tomcat 5.5.x. You will most likely need to modify your JNDI resource configurations to match
the syntax in the example below in order to make them work in Tomcat 5.5.x"
With that said you can replace your specified parameters with the following from the mysql
section of that page.
<Resource name="jdbc/TestDB" auth="Container" type="javax.sql.DataSource"
maxActive="100" maxIdle="30" maxWait="10000"
username="javauser" password="javadude" driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/javatest?autoReconnect=true"/>
Hope this helps
- andy
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.