db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Owens, Ryan" <row...@uhd.com>
Subject Torque Error: Cannot connect to MySQL (full question)
Date Mon, 10 Feb 2003 23:44:03 GMT
Hi all.  Sorry about the half send last time.

I'm having a huge problem trying to deploy Torque to a client's webhost.
Any help would be hugely appreciated.

The host in running Ensim Site Administrator 3.1.4-1.
which uses Tomcat 4.0.3 and java 1.4  don't know the exact version.

I have tested the app thoroughly on my local machine with the same tomcat version with no
problems.

For testing I have a jsp which connect directly to the db with sql.Connection, ResultSet etc
(not using torque) it yields:
Trying to connect to: jdbc:mysql://127.0.0.1:3306/mydb?user=u5er&password=password
- with driver: org.gjt.mm.mysql.Driver 
- connection = com.mysql.jdbc.jdbc2.Connection@b258fa 
Sterling Highway & Esther Drive 
SUCCESS!! 
the results on screen is an address from the db.
so my connection string and user/pass info is correct, and I can connect to the DB.

However, when running another test jsp from the same place using Torque I get:

org.apache.torque.TorqueException: Cannot connect to MySQL server on apollo.tilted.net:3306.
Is there a MySQL server running on the machine/port you are trying to connect to? (java.security.AccessControlException)
STACK TRACE:
org.apache.torque.Torque.getConnection(Torque.java:901) 
org.apache.torque.Torque.getConnection(Torque.java:871) 
---------

the applicable torque properties are also printed out by my test jsp. They are:

prop:database.default.adapter=mysql 
prop:dsfactory.default.factory=org.apache.torque.dsfactory.Jdbc2PoolDataSourceFactory 
prop:dsfactory.default.pool.defaultMaxActive=30 
prop:dsfactory.default.pool.testOnBorrow=true 
prop:dsfactory.default.pool.validationQuery=SELECT 1 
prop:dsfactory.default.connection.driver=com.mysql.jdbc.Driver 
prop:dsfactory.default.connection.url=jdbc:mysql://127.0.0.1:3306/mydb
prop:dsfactory.default.connection.user=u5er 
prop:dsfactory.default.connection.password=password 


So I guess something in the DataSource isn't connecting properly???
Is there a possible security conflict or something?

This is a shared server, and all my jars are in my web-inf/lib dir.
The mysql-connector jar is in web-inf/lib as well, and it connects fine.

It wasn't working with a week old version of the torque plugin for maven, 
so I just rebuilt it and still no luck. 

Again, this whole thing works perfectly on my local machine running the same version of tomcat.

Thanks very much for any ideas!

   Ryan Owens

Mime
View raw message