tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john gregg <jgre...@uswest.net>
Subject Tomcat & MySQL
Date Wed, 24 May 2000 23:48:02 GMT
Hello all.

I'm trying to switch from JServ 1.1 to Tomcat 3.1 because I want the new
ServletException constructors available in jsdk 2.1.  I've managed to
muddle through well enough so far, except that I can't make that last
step
and get my MySQL connection going.  I'm using the connection pool
DbConnectionBroker.  I get this in DbConnectionBroker's log:


--->Attempt (1 of 20) failed to create new connections set at startup: 
    java.sql.SQLException: Cannot load connection class
'java.sql.SQLException: Cannot connect to MySQL server on 10.0.0.3:3306.
Is there a MySQL server running on the machine/port you are trying to
connect to? (java.net.ConnectException)'.


And I get this in the Tomcat console:

java.net.ConnectException: Connection refused: no further information
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
        at
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:125)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:112)
        at java.net.Socket.<init>(Socket.java:269)
        at java.net.Socket.<init>(Socket.java:98)
        at org.gjt.mm.mysql.MysqlIO.<init>(MysqlIO.java:122)
        at org.gjt.mm.mysql.jdbc2.IO.<init>(IO.java:56)
        at
org.gjt.mm.mysql.jdbc2.Connection.createNewIO(Connection.java:159)
        at org.gjt.mm.mysql.Connection.connectionInit(Connection.java,
CompiledCode)
        at
org.gjt.mm.mysql.jdbc2.Connection.connectionInit(Connection.java:89)
        at org.gjt.mm.mysql.Driver.connect(Driver.java:155)
        at java.sql.DriverManager.getConnection(DriverManager.java:457)
        at java.sql.DriverManager.getConnection(DriverManager.java:137)
        at
com.javaexchange.dbConnectionBroker.DbConnectionBroker.createConn(DbC
onnectionBroker.java:430)
        at
com.javaexchange.dbConnectionBroker.DbConnectionBroker.<init>(DbConne
ctionBroker.java, Compiled Code)
        at com.biketcbc.servlet.LoginServlet.init(LoginServlet.java:83)
        at
org.apache.tomcat.core.ServletWrapper.initServlet(ServletWrapper.java
, Compiled Code)
        at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.ja
va, Compiled Code)
        at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.ja
va:597)
        at
org.apache.tomcat.servlets.InvokerServlet.service(InvokerServlet.java
:257)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.ja
va, Compiled Code)
        at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:559
)
        at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnectio
n(HttpConnectionHandler.java:160)
        at
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.j
ava:338)
        at java.lang.Thread.run(Thread.java:479)

Tomcat is running on a different machine than the db, however my
application under JServ connects just fine from the same machine as
Tomcat.  Also, UrbanSQL works fine, as does telnet to 3306.  I tried
changing the Tomcat port to 80 but it made no
difference.  All of the connection params (from web.xml) are being read
just fine.  I also tried using both the compressed and uncompressed
mm.mysql driver jar files.

I'd appreciate suggestions.

thanks

john

Mime
View raw message