tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "albert quinn" <>
Subject problem with Tomcat 5.5.17, Axis 2, MySQL 3.1.12, JNDI
Date Wed, 11 Jul 2007 22:43:20 GMT
Hi ! :

  First of all : excuse my poor english. Second : I'm trying to set up
a MySQL connection pool on Tomcat 5.5.17 (running over Windows XP) to
connect to a remote DB from a web service running on the Axis 2
deployed in Tomcat. I've read the Tomcat docs and the Tomcat mailing
lists but i've not founded any answers that help me to fix the
problem. I've this in my "conf\server.xml" :

           <Context docBase="axis2" path="C:\Archivos de
programa\Apache Software Foundation\Tomcat 5.5\webapps\axis2"

                <Resource auth="Container" driverClassName="
com.mysql.jdbc.Driver" maxActive="100" maxIdle="30" maxWait="10000"
name="java:comp/env/jdbc/DB" password="mypassword"



I've this "C:\Archivos de programa\Apache Software Foundation\Tomcat
5.5\webapps\axis2\META-INF\context.xml " file :

<?xml version="1.0" encoding="UTF-8"?>


      <Resource auth="Container" driverClassName="
com.mysql.jdbc.Driver" maxActive="100" maxIdle="30" maxWait="10000"
name="jdbc/DB" password="mypassword" type="javax.sql.DataSource"


I've these lines in "C:\Archivos de programa\Apache Software
Foundation\Tomcat 5.5\webapps\axis2\WEB-INF\web.xml"

            a description

  When i call the web service running on Axis 2, after a long time i
get the next Exception message :

Cannot create PoolableConnectionFactory (Server connection failure
during transaction. Due to underlying exception:
' No route
to host: connect'.

MESSAGE: No route to host: connect

STACKTRACE: No route to
host: connect

    at com.mysql.jdbc.StandardSocketFactory.connect(

    at com.mysql.jdbc.MysqlIO.<init>(

    at com.mysql.jdbc.Connection.createNewIO( :2680)

    at com.mysql.jdbc.Connection.<init>(

    at com.mysql.jdbc.NonRegisteringDriver.connect(

    at org.apache.tomcat.dbcp.dbcp.DriverConnectionFactory.createConnection

    at org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.makeObject(

    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.validateConnectionFactory

    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(

    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(

    at code.prueba.PruebaBD.getUserLogin(

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

    at java.lang.reflect.Method.invoke(Unknown Source)

    at org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(

    at org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(

    at org.apache.axis2.engine.AxisEngine.receive(

    at org.apache.axis2.transport.http.util.RESTUtil.invokeAxisEngine(

    at org.apache.axis2.transport.http.util.RESTUtil.processURLRequest(

    at org.apache.axis2.transport.http.AxisServlet$ProcessRESTRequest.processURLRequest

    at org.apache.axis2.transport.http.AxisServlet.doGet(

    at javax.servlet.http.HttpServlet.service(

    at javax.servlet.http.HttpServlet.service (

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(

    at org.apache.catalina.core.StandardWrapperValve.invoke(

    at org.apache.catalina.core.StandardContextValve.invoke(

    at org.apache.catalina.core.StandardHostValve.invoke

    at org.apache.catalina.valves.ErrorReportValve.invoke(

    at org.apache.catalina.core.StandardEngineValve.invoke(

    at org.apache.catalina.connector.CoyoteAdapter.service(

    at org.apache.coyote.http11.Http11Processor.process(

    at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection



    at org.apache.tomcat.util.threads.ThreadPool$

    at Source)


Attempted reconnect 3 times. Giving up.)

  I've tried to turn it off the FireWall, but i've got the same
Exception message.  The lines in the web service are :

            Context oContext = new InitialContext();
            DataSource oDataSource = (DataSource)
            Connection oConnection = oDataSource.getConnection();

  I've tried to modify the web service to connect to the DB using the
JDBC Driver directly with :

            Class jdbcDriverClass = Class.forName( "com.mysql.jdbc.Driver" );
            Driver oDriver = (Driver) jdbcDriverClass.newInstance();
            Connection oConnection =

  That way i can connect to the remote database without problems. Of
course i've the mysql jar in the Tomcat's "common\lib" directory. But
after many hours of reading and trying and knocking on heaven's door
(hard, with the head!! ;)  i've no idea of what is happening, even
worse... i've no idea of what to do to find the problem. Does anybody
have any idea to help me to discover where is the problem? Many thanks
to anybody who help!!!!

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message