Re: Tomcat 5.5.7 cannot connect to mysql datasource - what changed?
Richard, In your context file change userName=ltojsw to username=ltojsw (and of course change your passwd now that it's on the 'net ;-) This is why you see the error: Access denied for user ''@'kingfishS11' I just tried to find some docs to make sure I'm right but I can't see anything under the 5.5 documentation :-S Hope this helps Tom. On Mon, 21 Feb 2005 07:32:29 -0700, Richard Mixon (qwest) [EMAIL PROTECTED] wrote: -Original Message- From: Richard Mixon (qwest) [mailto:[EMAIL PROTECTED] Sent: 21 February, 2005 7:53 AM To: tomcat-user@jakarta.apache.org Subject: Tomcat 5.5.7 cannot connect to mysql datasource - what changed? We have been using Sun Java 1.4.2, Tomcat 5.0.19, MySQL 4.1.7, MySQL Connector/J 3.0.15 with Hibernate 2.1.7c with no problems. This is on both Windows XP Pro SP2 (development) and SuSE Linux SLES9 (test and production). In order to get failover to work the way we wanted we upgraded to Tomcat 5.5.7 and Sun Java 1.5. The main change in our application was the new format for data soruces in the application context. No problem on Windows XP. We've tried to install on one of our Linux servers and are having no end of grief getting a DB connection to properly happen. Any help or ideas would be much appreciated. I've included the application context and the catalina log error messages below. Thanks in advance - Richard ***- APPLICATION CONTEXT: Context path=/stars docBase=stars debug=99 reloadable=true privileged=true antiResourceLocking=false antiJARLocking=true Logger className=org.apache.catalina.logger.FileLogger prefix=stars. suffix=.log timestamp=true/ Realm className=org.apache.catalina.realm.JDBCRealm debug=99 driverName=com.mysql.jdbc.Driver connectionURL=jdbc:mysql://192.168.11.3:3306/ltojsw?autoReconnec t=trueamp;autoCommit=true connectionName=ltojsw connectionPassword=586579 userTable=PoAssociate userNameCol=userid userCredCol=password userRoleTable=PoUserRole roleNameCol=roleName / Resourcename=jdbc/stars type=javax.sql.DataSource auth=Container maxActive=100 maxIdle=10 maxWait=1 defaultAutoCommit=true userName=ltojsw password=586579 driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://192.168.11.3:3306/ltojsw?aut oReconnect=trueamp;autoCommit=true removeAbandoned=true removeAbandonedTimeout=60 logAbandoned=true / /Context ***- CATALINA ERROR MESSAGES: SNIP 19:37:27,642 INFO [http-8080-Processor25] DatasourceConnectionProvider:51 - Using datasource: java:comp/env/jdbc/stars 19:37:27,648 INFO [http-8080-Processor25] TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended) AbandonedObjectPool is used ([EMAIL PROTECTED]) LogAbandoned: true RemoveAbandoned: true RemoveAbandonedTimeout: 60 19:37:41,696 WARN [http-8080-Processor25] SettingsFactory:107 - Could not obtain connection metadata org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Server connection failure during transaction. Due to underlying exception: 'java.sql.SQLException: Access denied for user ''@'kingfishS11' (using password: YES)'. ** BEGIN NESTED EXCEPTION ** java.sql.SQLException MESSAGE: Access denied for user ''@'kingfishS11' (using password: YES) STACKTRACE: java.sql.SQLException: Access denied for user ''@'kingfishS11' (using password: YES) SNIP - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED
RE: Tomcat 5.5.7 cannot connect to mysql datasource - what changed?
Tom, thanks - finally figured out the username error. And thanks on the password. - Richard Tom A wrote: Richard, In your context file change userName=ltojsw to username=ltojsw (and of course change your passwd now that it's on the 'net ;-) This is why you see the error: Access denied for user ''@'kingfishS11' I just tried to find some docs to make sure I'm right but I can't see anything under the 5.5 documentation :-S Hope this helps Tom. On Mon, 21 Feb 2005 07:32:29 -0700, Richard Mixon (qwest) [EMAIL PROTECTED] wrote: -Original Message- From: Richard Mixon (qwest) [mailto:[EMAIL PROTECTED] Sent: 21 February, 2005 7:53 AM To: tomcat-user@jakarta.apache.org Subject: Tomcat 5.5.7 cannot connect to mysql datasource - what changed? We have been using Sun Java 1.4.2, Tomcat 5.0.19, MySQL 4.1.7, MySQL Connector/J 3.0.15 with Hibernate 2.1.7c with no problems. This is on both Windows XP Pro SP2 (development) and SuSE Linux SLES9 (test and production). In order to get failover to work the way we wanted we upgraded to Tomcat 5.5.7 and Sun Java 1.5. The main change in our application was the new format for data soruces in the application context. No problem on Windows XP. We've tried to install on one of our Linux servers and are having no end of grief getting a DB connection to properly happen. Any help or ideas would be much appreciated. I've included the application context and the catalina log error messages below. Thanks in advance - Richard ***- APPLICATION CONTEXT: Context path=/stars docBase=stars debug=99 reloadable=true privileged=true antiResourceLocking=false antiJARLocking=true Logger className=org.apache.catalina.logger.FileLogger prefix=stars. suffix=.log timestamp=true/ Realm className=org.apache.catalina.realm.JDBCRealm debug=99 driverName=com.mysql.jdbc.Driver connectionURL=jdbc:mysql://192.168.11.3:3306/ltojsw?autoReconnec t=trueamp;autoCommit=true connectionName=ltojsw connectionPassword=586579 userTable=PoAssociate userNameCol=userid userCredCol=password userRoleTable=PoUserRole roleNameCol=roleName / Resource name=jdbc/stars type=javax.sql.DataSource auth=Container maxActive=100 maxIdle=10 maxWait=1 defaultAutoCommit=true userName=ltojsw password=586579 driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://192.168.11.3:3306/ltojsw?aut oReconnect=trueamp;autoCommit=true removeAbandoned=true removeAbandonedTimeout=60 logAbandoned=true / /Context ***- CATALINA ERROR MESSAGES: SNIP 19:37:27,642 INFO [http-8080-Processor25] DatasourceConnectionProvider:51 - Using datasource: java:comp/env/jdbc/stars 19:37:27,648 INFO [http-8080-Processor25] TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended) AbandonedObjectPool is used ([EMAIL PROTECTED]) LogAbandoned: true RemoveAbandoned: true RemoveAbandonedTimeout: 60 19:37:41,696 WARN [http-8080-Processor25] SettingsFactory:107 - Could not obtain connection metadata org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Server connection failure during transaction. Due to underlying exception: 'java.sql.SQLException: Access denied for user ''@'kingfishS11' (using password: YES)'. ** BEGIN NESTED EXCEPTION ** java.sql.SQLException MESSAGE: Access denied for user ''@'kingfishS11' (using password: YES) STACKTRACE: java.sql.SQLException: Access denied for user ''@'kingfishS11' (using password: YES) SNIP - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED
RE: Tomcat 5.5.7 cannot connect to mysql datasource - what changed?
Shakeel, Thanks for the suggestion but we were already using DBCP 1.2.1. I downloaded it and tried it again, but get the same error. Any other ideas why the username would not be passed correctly when creating the datasource/pool? -Original Message- From: Shakeel Ahmad [mailto:[EMAIL PROTECTED] Sent: Sunday, February 20, 2005 10:43 PM To: Tomcat Users List Subject: RE: Tomcat 5.5.7 cannot connect to mysql datasource - what changed? Wel we did the same to upgrade our product all went wel except for the connector. Then after some research I found that mysql-connector-java-3.1.6-bin.jar was the missing part. But your trace also shows that the PoolableConnectionFactory is not being created may be try commons-dbcp-1.2.1.jar if not already upgraded. Best Regards, S H A K E E L A H M A D http://members.fortunecity.com/javaclub/shakeel.htm Voice: 00923002723316 Senior Software Engineer. NorthStar Technologies. www.globalnorthstar.com EE(Computer Engineering), UET Lahore, Pakistan. SCJP,SCWCD SCBCD Sun Microsystems, Inc. Brain Bench Certified Java Programmer. -Original Message- From: Richard Mixon (qwest) [mailto:[EMAIL PROTECTED] Sent: 21 February, 2005 10:24 AM To: Tomcat Users List Subject: RE: Tomcat 5.5.7 cannot connect to mysql datasource - what changed? Actually I tried MySQL Connector/J 3.0.15, and then updated to the latest 3.1.7. Each was placed in in $CATALINA_HOME/common/lib and tried - same result/error message. -Original Message- From: Shakeel Ahmad [mailto:[EMAIL PROTECTED] Sent: Sunday, February 20, 2005 10:22 PM To: Tomcat Users List Subject: RE: Tomcat 5.5.7 cannot connect to mysql datasource - what changed? Have you changed the corresponding mysql connector jar file ? -Original Message- From: Richard Mixon (qwest) [mailto:[EMAIL PROTECTED] Sent: 21 February, 2005 7:53 AM To: tomcat-user@jakarta.apache.org Subject: Tomcat 5.5.7 cannot connect to mysql datasource - what changed? We have been using Sun Java 1.4.2, Tomcat 5.0.19, MySQL 4.1.7, MySQL Connector/J 3.0.15 with Hibernate 2.1.7c with no problems. This is on both Windows XP Pro SP2 (development) and SuSE Linux SLES9 (test and production). In order to get failover to work the way we wanted we upgraded to Tomcat 5.5.7 and Sun Java 1.5. The main change in our application was the new format for data soruces in the application context. No problem on Windows XP. We've tried to install on one of our Linux servers and are having no end of grief getting a DB connection to properly happen. Any help or ideas would be much appreciated. I've included the application context and the catalina log error messages below. Thanks in advance - Richard ***- APPLICATION CONTEXT: Context path=/stars docBase=stars debug=99 reloadable=true privileged=true antiResourceLocking=false antiJARLocking=true Logger className=org.apache.catalina.logger.FileLogger prefix=stars. suffix=.log timestamp=true/ Realm className=org.apache.catalina.realm.JDBCRealm debug=99 driverName=com.mysql.jdbc.Driver connectionURL=jdbc:mysql://192.168.11.3:3306/ltojsw?autoReconnec t=trueamp;autoCommit=true connectionName=ltojsw connectionPassword=586579 userTable=PoAssociate userNameCol=userid userCredCol=password userRoleTable=PoUserRole roleNameCol=roleName / Resourcename=jdbc/stars type=javax.sql.DataSource auth=Container maxActive=100 maxIdle=10 maxWait=1 defaultAutoCommit=true userName=ltojsw password=586579 driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://192.168.11.3:3306/ltojsw?aut oReconnect=trueamp;autoCommit=true removeAbandoned=true removeAbandonedTimeout=60 logAbandoned=true / /Context ***- CATALINA ERROR MESSAGES: SNIP 19:37:27,642 INFO [http-8080-Processor25] DatasourceConnectionProvider:51 - Using datasource: java:comp/env/jdbc/stars 19:37:27,648 INFO [http-8080-Processor25] TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended) AbandonedObjectPool is used ([EMAIL PROTECTED]) LogAbandoned: true RemoveAbandoned: true RemoveAbandonedTimeout: 60 19:37:41,696 WARN [http-8080-Processor25] SettingsFactory:107 - Could not obtain connection metadata org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Server connection failure during transaction. Due to underlying exception: 'java.sql.SQLException: Access denied for user ''@'kingfishS11' (using password: YES)'. ** BEGIN NESTED EXCEPTION ** java.sql.SQLException MESSAGE: Access denied for user ''@'kingfishS11' (using password: YES) STACKTRACE: java.sql.SQLException: Access denied for user
RE: Tomcat 5.5.7 cannot connect to mysql datasource - what changed?
Try to hard code user name as the error shows '' as a user name. Also you can write a simple stand alone java program other than your web application to figure out exact problem. More things more problems. Less things quick findings, might help. By the way is your new MySQL communicating to you via any front end tool like SQL Yog or MySQL Front etc. Best Regards, S H A K E E L A H M A D http://members.fortunecity.com/javaclub/shakeel.htm Voice: 00923002723316 Senior Software Engineer. NorthStar Technologies. www.globalnorthstar.com EE(Computer Engineering), UET Lahore, Pakistan. SCJP,SCWCD SCBCD Sun Microsystems, Inc. Brain Bench Certified Java Programmer. -Original Message- From: Richard Mixon (qwest) [mailto:[EMAIL PROTECTED] Sent: 21 February, 2005 6:16 PM To: Tomcat Users List Subject: RE: Tomcat 5.5.7 cannot connect to mysql datasource - what changed? Shakeel, Thanks for the suggestion but we were already using DBCP 1.2.1. I downloaded it and tried it again, but get the same error. Any other ideas why the username would not be passed correctly when creating the datasource/pool? -Original Message- From: Shakeel Ahmad [mailto:[EMAIL PROTECTED] Sent: Sunday, February 20, 2005 10:43 PM To: Tomcat Users List Subject: RE: Tomcat 5.5.7 cannot connect to mysql datasource - what changed? Wel we did the same to upgrade our product all went wel except for the connector. Then after some research I found that mysql-connector-java-3.1.6-bin.jar was the missing part. But your trace also shows that the PoolableConnectionFactory is not being created may be try commons-dbcp-1.2.1.jar if not already upgraded. Best Regards, S H A K E E L A H M A D http://members.fortunecity.com/javaclub/shakeel.htm Voice: 00923002723316 Senior Software Engineer. NorthStar Technologies. www.globalnorthstar.com EE(Computer Engineering), UET Lahore, Pakistan. SCJP,SCWCD SCBCD Sun Microsystems, Inc. Brain Bench Certified Java Programmer. -Original Message- From: Richard Mixon (qwest) [mailto:[EMAIL PROTECTED] Sent: 21 February, 2005 10:24 AM To: Tomcat Users List Subject: RE: Tomcat 5.5.7 cannot connect to mysql datasource - what changed? Actually I tried MySQL Connector/J 3.0.15, and then updated to the latest 3.1.7. Each was placed in in $CATALINA_HOME/common/lib and tried - same result/error message. -Original Message- From: Shakeel Ahmad [mailto:[EMAIL PROTECTED] Sent: Sunday, February 20, 2005 10:22 PM To: Tomcat Users List Subject: RE: Tomcat 5.5.7 cannot connect to mysql datasource - what changed? Have you changed the corresponding mysql connector jar file ? -Original Message- From: Richard Mixon (qwest) [mailto:[EMAIL PROTECTED] Sent: 21 February, 2005 7:53 AM To: tomcat-user@jakarta.apache.org Subject: Tomcat 5.5.7 cannot connect to mysql datasource - what changed? We have been using Sun Java 1.4.2, Tomcat 5.0.19, MySQL 4.1.7, MySQL Connector/J 3.0.15 with Hibernate 2.1.7c with no problems. This is on both Windows XP Pro SP2 (development) and SuSE Linux SLES9 (test and production). In order to get failover to work the way we wanted we upgraded to Tomcat 5.5.7 and Sun Java 1.5. The main change in our application was the new format for data soruces in the application context. No problem on Windows XP. We've tried to install on one of our Linux servers and are having no end of grief getting a DB connection to properly happen. Any help or ideas would be much appreciated. I've included the application context and the catalina log error messages below. Thanks in advance - Richard ***- APPLICATION CONTEXT: Context path=/stars docBase=stars debug=99 reloadable=true privileged=true antiResourceLocking=false antiJARLocking=true Logger className=org.apache.catalina.logger.FileLogger prefix=stars. suffix=.log timestamp=true/ Realm className=org.apache.catalina.realm.JDBCRealm debug=99 driverName=com.mysql.jdbc.Driver connectionURL=jdbc:mysql://192.168.11.3:3306/ltojsw?autoReconnec t=trueamp;autoCommit=true connectionName=ltojsw connectionPassword=586579 userTable=PoAssociate userNameCol=userid userCredCol=password userRoleTable=PoUserRole roleNameCol=roleName / Resourcename=jdbc/stars type=javax.sql.DataSource auth=Container maxActive=100 maxIdle=10 maxWait=1 defaultAutoCommit=true userName=ltojsw password=586579 driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://192.168.11.3:3306/ltojsw?aut oReconnect=trueamp;autoCommit=true removeAbandoned=true removeAbandonedTimeout=60 logAbandoned=true / /Context ***- CATALINA ERROR MESSAGES: SNIP 19:37:27,642 INFO [http-8080-Processor25] DatasourceConnectionProvider:51 - Using datasource: java:comp
RE: Tomcat 5.5.7 cannot connect to mysql datasource - what changed?
I am able to connect fine using the mysql client - either locally or remotely. It is just with the web application using the JDBC driver that it is not working. Yes, maybe I'm at the point of having to do a simple JDBC application to figure this out - though it seems silly given my application works in Tomcat 5.0.19, but not in Tomcat 5.5.7. Thanks - Richard -Original Message- From: Shakeel Ahmad [mailto:[EMAIL PROTECTED] Sent: Monday, February 21, 2005 6:39 AM To: Tomcat Users List Subject: RE: Tomcat 5.5.7 cannot connect to mysql datasource - what changed? Try to hard code user name as the error shows '' as a user name. Also you can write a simple stand alone java program other than your web application to figure out exact problem. More things more problems. Less things quick findings, might help. By the way is your new MySQL communicating to you via any front end tool like SQL Yog or MySQL Front etc. Best Regards, S H A K E E L A H M A D http://members.fortunecity.com/javaclub/shakeel.htm Voice: 00923002723316 Senior Software Engineer. NorthStar Technologies. www.globalnorthstar.com EE(Computer Engineering), UET Lahore, Pakistan. SCJP,SCWCD SCBCD Sun Microsystems, Inc. Brain Bench Certified Java Programmer. -Original Message- From: Richard Mixon (qwest) [mailto:[EMAIL PROTECTED] Sent: 21 February, 2005 6:16 PM To: Tomcat Users List Subject: RE: Tomcat 5.5.7 cannot connect to mysql datasource - what changed? Shakeel, Thanks for the suggestion but we were already using DBCP 1.2.1. I downloaded it and tried it again, but get the same error. Any other ideas why the username would not be passed correctly when creating the datasource/pool? -Original Message- From: Shakeel Ahmad [mailto:[EMAIL PROTECTED] Sent: Sunday, February 20, 2005 10:43 PM To: Tomcat Users List Subject: RE: Tomcat 5.5.7 cannot connect to mysql datasource - what changed? Wel we did the same to upgrade our product all went wel except for the connector. Then after some research I found that mysql-connector-java-3.1.6-bin.jar was the missing part. But your trace also shows that the PoolableConnectionFactory is not being created may be try commons-dbcp-1.2.1.jar if not already upgraded. Best Regards, S H A K E E L A H M A D http://members.fortunecity.com/javaclub/shakeel.htm Voice: 00923002723316 Senior Software Engineer. NorthStar Technologies. www.globalnorthstar.com EE(Computer Engineering), UET Lahore, Pakistan. SCJP,SCWCD SCBCD Sun Microsystems, Inc. Brain Bench Certified Java Programmer. -Original Message- From: Richard Mixon (qwest) [mailto:[EMAIL PROTECTED] Sent: 21 February, 2005 10:24 AM To: Tomcat Users List Subject: RE: Tomcat 5.5.7 cannot connect to mysql datasource - what changed? Actually I tried MySQL Connector/J 3.0.15, and then updated to the latest 3.1.7. Each was placed in in $CATALINA_HOME/common/lib and tried - same result/error message. -Original Message- From: Shakeel Ahmad [mailto:[EMAIL PROTECTED] Sent: Sunday, February 20, 2005 10:22 PM To: Tomcat Users List Subject: RE: Tomcat 5.5.7 cannot connect to mysql datasource - what changed? Have you changed the corresponding mysql connector jar file ? -Original Message- From: Richard Mixon (qwest) [mailto:[EMAIL PROTECTED] Sent: 21 February, 2005 7:53 AM To: tomcat-user@jakarta.apache.org Subject: Tomcat 5.5.7 cannot connect to mysql datasource - what changed? We have been using Sun Java 1.4.2, Tomcat 5.0.19, MySQL 4.1.7, MySQL Connector/J 3.0.15 with Hibernate 2.1.7c with no problems. This is on both Windows XP Pro SP2 (development) and SuSE Linux SLES9 (test and production). In order to get failover to work the way we wanted we upgraded to Tomcat 5.5.7 and Sun Java 1.5. The main change in our application was the new format for data soruces in the application context. No problem on Windows XP. We've tried to install on one of our Linux servers and are having no end of grief getting a DB connection to properly happen. Any help or ideas would be much appreciated. I've included the application context and the catalina log error messages below. Thanks in advance - Richard ***- APPLICATION CONTEXT: Context path=/stars docBase=stars debug=99 reloadable=true privileged=true antiResourceLocking=false antiJARLocking=true Logger className=org.apache.catalina.logger.FileLogger prefix=stars. suffix=.log timestamp=true/ Realm className=org.apache.catalina.realm.JDBCRealm debug=99 driverName=com.mysql.jdbc.Driver connectionURL=jdbc:mysql://192.168.11.3:3306/ltojsw?autoReconnec t=trueamp;autoCommit=true connectionName=ltojsw connectionPassword=586579 userTable=PoAssociate userNameCol=userid userCredCol=password userRoleTable=PoUserRole roleNameCol=roleName / Resourcename=jdbc/stars type=javax.sql.DataSource auth=Container maxActive=100
RE: Tomcat 5.5.7 cannot connect to mysql datasource - what changed? New approach
Sorry to repost - but, except for some great suggestions from Shakeel, I have not made much progress on this. To my way of thinking this seems maddenly simple - either a config error or possibly bug. But what? So my first place to start is to try and see where it is that the userName property get mangled or swallowed. I've double checkd and it is correctly specified in my context.xml But by the time the failure occurs, it is a null or empty string. So, how can I enable logging on my DBCP datasource so that I can see where the connection userName property gets trashed? I've tried putting org.apache.commons.dbcp in my log4j.properties, but do not seem to get any additional output. Once I can see if things are passed correctly here, I'll look at the MySQL Connector/J logging (although it is not obvious how to do this). Any suggestions? Thanks - Richard -Original Message- From: Richard Mixon (qwest) [mailto:[EMAIL PROTECTED] Sent: Sunday, February 20, 2005 7:53 PM To: tomcat-user@jakarta.apache.org Subject: Tomcat 5.5.7 cannot connect to mysql datasource - what changed? We have been using Sun Java 1.4.2, Tomcat 5.0.19, MySQL 4.1.7, MySQL Connector/J 3.0.15 with Hibernate 2.1.7c with no problems. This is on both Windows XP Pro SP2 (development) and SuSE Linux SLES9 (test and production). In order to get failover to work the way we wanted we upgraded to Tomcat 5.5.7 and Sun Java 1.5. The main change in our application was the new format for data soruces in the application context. No problem on Windows XP. We've tried to install on one of our Linux servers and are having no end of grief getting a DB connection to properly happen. Any help or ideas would be much appreciated. I've included the application context and the catalina log error messages below. Thanks in advance - Richard ***- APPLICATION CONTEXT: Context path=/stars docBase=stars debug=99 reloadable=true privileged=true antiResourceLocking=false antiJARLocking=true Logger className=org.apache.catalina.logger.FileLogger prefix=stars. suffix=.log timestamp=true/ Realm className=org.apache.catalina.realm.JDBCRealm debug=99 driverName=com.mysql.jdbc.Driver connectionURL=jdbc:mysql://192.168.11.3:3306/ltojsw?autoReconnec t=trueamp;autoCommit=true connectionName=ltojsw connectionPassword=586579 userTable=PoAssociate userNameCol=userid userCredCol=password userRoleTable=PoUserRole roleNameCol=roleName / Resourcename=jdbc/stars type=javax.sql.DataSource auth=Container maxActive=100 maxIdle=10 maxWait=1 defaultAutoCommit=true userName=ltojsw password=586579 driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://192.168.11.3:3306/ltojsw?aut oReconnect=trueamp;autoCommit=true removeAbandoned=true removeAbandonedTimeout=60 logAbandoned=true / /Context ***- CATALINA ERROR MESSAGES: SNIP 19:37:27,642 INFO [http-8080-Processor25] DatasourceConnectionProvider:51 - Using datasource: java:comp/env/jdbc/stars 19:37:27,648 INFO [http-8080-Processor25] TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended) AbandonedObjectPool is used ([EMAIL PROTECTED]) LogAbandoned: true RemoveAbandoned: true RemoveAbandonedTimeout: 60 19:37:41,696 WARN [http-8080-Processor25] SettingsFactory:107 - Could not obtain connection metadata org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Server connection failure during transaction. Due to underlying exception: 'java.sql.SQLException: Access denied for user ''@'kingfishS11' (using password: YES)'. ** BEGIN NESTED EXCEPTION ** java.sql.SQLException MESSAGE: Access denied for user ''@'kingfishS11' (using password: YES) STACKTRACE: java.sql.SQLException: Access denied for user ''@'kingfishS11' (using password: YES) SNIP - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5.5.7 cannot connect to mysql datasource - what changed? New approach [SOLVED]
OK, yes it turned out to be one of those dumb configuration errors - BUT also a difference in how Tomcat 5.5.7 (or maybe is is Commons DBCP 1.2.1) behaves under Windows versus Linux. I had camelcased the username property in the context.xml Resource tag as userName. This worked under Windows, but NOT for Linux. Anyway, all seems to be working great now that I used just plain username. Thanks for the earlier help and suggestions. - Richard Richard Mixon (qwest) wrote: We have been using Sun Java 1.4.2, Tomcat 5.0.19, MySQL 4.1.7, MySQL Connector/J 3.0.15 with Hibernate 2.1.7c with no problems. This is on both Windows XP Pro SP2 (development) and SuSE Linux SLES9 (test and production). In order to get failover to work the way we wanted we upgraded to Tomcat 5.5.7 and Sun Java 1.5. The main change in our application was the new format for data soruces in the application context. No problem on Windows XP. We've tried to install on one of our Linux servers and are having no end of grief getting a DB connection to properly happen. Any help or ideas would be much appreciated. I've included the application context and the catalina log error messages below. Thanks in advance - Richard ***- APPLICATION CONTEXT: Context path=/stars docBase=stars debug=99 reloadable=true privileged=true antiResourceLocking=false antiJARLocking=true Logger className=org.apache.catalina.logger.FileLogger prefix=stars. suffix=.log timestamp=true/ Realm className=org.apache.catalina.realm.JDBCRealm debug=99 driverName=com.mysql.jdbc.Driver connectionURL=jdbc:mysql://192.168.11.3:3306/ltojsw?autoReconnec t=trueamp;autoCommit=true connectionName=ltojsw connectionPassword=586579 userTable=PoAssociate userNameCol=userid userCredCol=password userRoleTable=PoUserRole roleNameCol=roleName / Resource name=jdbc/stars type=javax.sql.DataSource auth=Container maxActive=100 maxIdle=10 maxWait=1 defaultAutoCommit=true userName=ltojsw password=586579 driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://192.168.11.3:3306/ltojsw?aut oReconnect=trueamp;autoCommit=true removeAbandoned=true removeAbandonedTimeout=60 logAbandoned=true / /Context ***- CATALINA ERROR MESSAGES: SNIP 19:37:27,642 INFO [http-8080-Processor25] DatasourceConnectionProvider:51 - Using datasource: java:comp/env/jdbc/stars 19:37:27,648 INFO [http-8080-Processor25] TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended) AbandonedObjectPool is used ([EMAIL PROTECTED]) LogAbandoned: true RemoveAbandoned: true RemoveAbandonedTimeout: 60 19:37:41,696 WARN [http-8080-Processor25] SettingsFactory:107 - Could not obtain connection metadata org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Server connection failure during transaction. Due to underlying exception: 'java.sql.SQLException: Access denied for user ''@'kingfishS11' (using password: YES)'. ** BEGIN NESTED EXCEPTION ** java.sql.SQLException MESSAGE: Access denied for user ''@'kingfishS11' (using password: YES) STACKTRACE: java.sql.SQLException: Access denied for user ''@'kingfishS11' (using password: YES) SNIP - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Richard Mixon (qwest) wrote: Sorry to repost - but, except for some great suggestions from Shakeel, I have not made much progress on this. To my way of thinking this seems maddenly simple - either a config error or possibly bug. But what? So my first place to start is to try and see where it is that the userName property get mangled or swallowed. I've double checkd and it is correctly specified in my context.xml But by the time the failure occurs, it is a null or empty string. So, how can I enable logging on my DBCP datasource so that I can see where the connection userName property gets trashed? I've tried putting org.apache.commons.dbcp in my log4j.properties, but do not seem to get any additional output. Once I can see if things are passed correctly here, I'll look at the MySQL Connector/J logging (although it is not obvious how to do this). Any suggestions? Thanks - Richard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5.5.7 cannot connect to mysql datasource - what changed?
We have been using Sun Java 1.4.2, Tomcat 5.0.19, MySQL 4.1.7, MySQL Connector/J 3.0.15 with Hibernate 2.1.7c with no problems. This is on both Windows XP Pro SP2 (development) and SuSE Linux SLES9 (test and production). In order to get failover to work the way we wanted we upgraded to Tomcat 5.5.7 and Sun Java 1.5. The main change in our application was the new format for data soruces in the application context. No problem on Windows XP. We've tried to install on one of our Linux servers and are having no end of grief getting a DB connection to properly happen. Any help or ideas would be much appreciated. I've included the application context and the catalina log error messages below. Thanks in advance - Richard ***- APPLICATION CONTEXT: Context path=/stars docBase=stars debug=99 reloadable=true privileged=true antiResourceLocking=false antiJARLocking=true Logger className=org.apache.catalina.logger.FileLogger prefix=stars. suffix=.log timestamp=true/ Realm className=org.apache.catalina.realm.JDBCRealm debug=99 driverName=com.mysql.jdbc.Driver connectionURL=jdbc:mysql://192.168.11.3:3306/ltojsw?autoReconnec t=trueamp;autoCommit=true connectionName=ltojsw connectionPassword=586579 userTable=PoAssociate userNameCol=userid userCredCol=password userRoleTable=PoUserRole roleNameCol=roleName / Resourcename=jdbc/stars type=javax.sql.DataSource auth=Container maxActive=100 maxIdle=10 maxWait=1 defaultAutoCommit=true userName=ltojsw password=586579 driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://192.168.11.3:3306/ltojsw?aut oReconnect=trueamp;autoCommit=true removeAbandoned=true removeAbandonedTimeout=60 logAbandoned=true / /Context ***- CATALINA ERROR MESSAGES: SNIP 19:37:27,642 INFO [http-8080-Processor25] DatasourceConnectionProvider:51 - Using datasource: java:comp/env/jdbc/stars 19:37:27,648 INFO [http-8080-Processor25] TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended) AbandonedObjectPool is used ([EMAIL PROTECTED]) LogAbandoned: true RemoveAbandoned: true RemoveAbandonedTimeout: 60 19:37:41,696 WARN [http-8080-Processor25] SettingsFactory:107 - Could not obtain connection metadata org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Server connection failure during transaction. Due to underlying exception: 'java.sql.SQLException: Access denied for user ''@'kingfishS11' (using password: YES)'. ** BEGIN NESTED EXCEPTION ** java.sql.SQLException MESSAGE: Access denied for user ''@'kingfishS11' (using password: YES) STACKTRACE: java.sql.SQLException: Access denied for user ''@'kingfishS11' (using password: YES) SNIP - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5.5.7 cannot connect to mysql datasource - what changed?
Have you changed the corresponding mysql connector jar file ? Best Regards, S H A K E E L A H M A D http://members.fortunecity.com/javaclub/shakeel.htm Voice: 00923002723316 Senior Software Engineer. NorthStar Technologies. www.globalnorthstar.com EE(Computer Engineering), UET Lahore, Pakistan. SCJP,SCWCD SCBCD Sun Microsystems, Inc. Brain Bench Certified Java Programmer. -Original Message- From: Richard Mixon (qwest) [mailto:[EMAIL PROTECTED] Sent: 21 February, 2005 7:53 AM To: tomcat-user@jakarta.apache.org Subject: Tomcat 5.5.7 cannot connect to mysql datasource - what changed? We have been using Sun Java 1.4.2, Tomcat 5.0.19, MySQL 4.1.7, MySQL Connector/J 3.0.15 with Hibernate 2.1.7c with no problems. This is on both Windows XP Pro SP2 (development) and SuSE Linux SLES9 (test and production). In order to get failover to work the way we wanted we upgraded to Tomcat 5.5.7 and Sun Java 1.5. The main change in our application was the new format for data soruces in the application context. No problem on Windows XP. We've tried to install on one of our Linux servers and are having no end of grief getting a DB connection to properly happen. Any help or ideas would be much appreciated. I've included the application context and the catalina log error messages below. Thanks in advance - Richard ***- APPLICATION CONTEXT: Context path=/stars docBase=stars debug=99 reloadable=true privileged=true antiResourceLocking=false antiJARLocking=true Logger className=org.apache.catalina.logger.FileLogger prefix=stars. suffix=.log timestamp=true/ Realm className=org.apache.catalina.realm.JDBCRealm debug=99 driverName=com.mysql.jdbc.Driver connectionURL=jdbc:mysql://192.168.11.3:3306/ltojsw?autoReconnec t=trueamp;autoCommit=true connectionName=ltojsw connectionPassword=586579 userTable=PoAssociate userNameCol=userid userCredCol=password userRoleTable=PoUserRole roleNameCol=roleName / Resourcename=jdbc/stars type=javax.sql.DataSource auth=Container maxActive=100 maxIdle=10 maxWait=1 defaultAutoCommit=true userName=ltojsw password=586579 driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://192.168.11.3:3306/ltojsw?aut oReconnect=trueamp;autoCommit=true removeAbandoned=true removeAbandonedTimeout=60 logAbandoned=true / /Context ***- CATALINA ERROR MESSAGES: SNIP 19:37:27,642 INFO [http-8080-Processor25] DatasourceConnectionProvider:51 - Using datasource: java:comp/env/jdbc/stars 19:37:27,648 INFO [http-8080-Processor25] TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended) AbandonedObjectPool is used ([EMAIL PROTECTED]) LogAbandoned: true RemoveAbandoned: true RemoveAbandonedTimeout: 60 19:37:41,696 WARN [http-8080-Processor25] SettingsFactory:107 - Could not obtain connection metadata org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Server connection failure during transaction. Due to underlying exception: 'java.sql.SQLException: Access denied for user ''@'kingfishS11' (using password: YES)'. ** BEGIN NESTED EXCEPTION ** java.sql.SQLException MESSAGE: Access denied for user ''@'kingfishS11' (using password: YES) STACKTRACE: java.sql.SQLException: Access denied for user ''@'kingfishS11' (using password: YES) SNIP - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5.5.7 cannot connect to mysql datasource - what changed?
Actually I tried MySQL Connector/J 3.0.15, and then updated to the latest 3.1.7. Each was placed in in $CATALINA_HOME/common/lib and tried - same result/error message. -Original Message- From: Shakeel Ahmad [mailto:[EMAIL PROTECTED] Sent: Sunday, February 20, 2005 10:22 PM To: Tomcat Users List Subject: RE: Tomcat 5.5.7 cannot connect to mysql datasource - what changed? Have you changed the corresponding mysql connector jar file ? -Original Message- From: Richard Mixon (qwest) [mailto:[EMAIL PROTECTED] Sent: 21 February, 2005 7:53 AM To: tomcat-user@jakarta.apache.org Subject: Tomcat 5.5.7 cannot connect to mysql datasource - what changed? We have been using Sun Java 1.4.2, Tomcat 5.0.19, MySQL 4.1.7, MySQL Connector/J 3.0.15 with Hibernate 2.1.7c with no problems. This is on both Windows XP Pro SP2 (development) and SuSE Linux SLES9 (test and production). In order to get failover to work the way we wanted we upgraded to Tomcat 5.5.7 and Sun Java 1.5. The main change in our application was the new format for data soruces in the application context. No problem on Windows XP. We've tried to install on one of our Linux servers and are having no end of grief getting a DB connection to properly happen. Any help or ideas would be much appreciated. I've included the application context and the catalina log error messages below. Thanks in advance - Richard ***- APPLICATION CONTEXT: Context path=/stars docBase=stars debug=99 reloadable=true privileged=true antiResourceLocking=false antiJARLocking=true Logger className=org.apache.catalina.logger.FileLogger prefix=stars. suffix=.log timestamp=true/ Realm className=org.apache.catalina.realm.JDBCRealm debug=99 driverName=com.mysql.jdbc.Driver connectionURL=jdbc:mysql://192.168.11.3:3306/ltojsw?autoReconnec t=trueamp;autoCommit=true connectionName=ltojsw connectionPassword=586579 userTable=PoAssociate userNameCol=userid userCredCol=password userRoleTable=PoUserRole roleNameCol=roleName / Resourcename=jdbc/stars type=javax.sql.DataSource auth=Container maxActive=100 maxIdle=10 maxWait=1 defaultAutoCommit=true userName=ltojsw password=586579 driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://192.168.11.3:3306/ltojsw?aut oReconnect=trueamp;autoCommit=true removeAbandoned=true removeAbandonedTimeout=60 logAbandoned=true / /Context ***- CATALINA ERROR MESSAGES: SNIP 19:37:27,642 INFO [http-8080-Processor25] DatasourceConnectionProvider:51 - Using datasource: java:comp/env/jdbc/stars 19:37:27,648 INFO [http-8080-Processor25] TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended) AbandonedObjectPool is used ([EMAIL PROTECTED]) LogAbandoned: true RemoveAbandoned: true RemoveAbandonedTimeout: 60 19:37:41,696 WARN [http-8080-Processor25] SettingsFactory:107 - Could not obtain connection metadata org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Server connection failure during transaction. Due to underlying exception: 'java.sql.SQLException: Access denied for user ''@'kingfishS11' (using password: YES)'. ** BEGIN NESTED EXCEPTION ** java.sql.SQLException MESSAGE: Access denied for user ''@'kingfishS11' (using password: YES) STACKTRACE: java.sql.SQLException: Access denied for user ''@'kingfishS11' (using password: YES) SNIP - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5.5.7 cannot connect to mysql datasource - what changed?
Wel we did the same to upgrade our product all went wel except for the connector. Then after some research I found that mysql-connector-java-3.1.6-bin.jar was the missing part. But your trace also shows that the PoolableConnectionFactory is not being created may be try commons-dbcp-1.2.1.jar if not already upgraded. Best Regards, S H A K E E L A H M A D http://members.fortunecity.com/javaclub/shakeel.htm Voice: 00923002723316 Senior Software Engineer. NorthStar Technologies. www.globalnorthstar.com EE(Computer Engineering), UET Lahore, Pakistan. SCJP,SCWCD SCBCD Sun Microsystems, Inc. Brain Bench Certified Java Programmer. -Original Message- From: Richard Mixon (qwest) [mailto:[EMAIL PROTECTED] Sent: 21 February, 2005 10:24 AM To: Tomcat Users List Subject: RE: Tomcat 5.5.7 cannot connect to mysql datasource - what changed? Actually I tried MySQL Connector/J 3.0.15, and then updated to the latest 3.1.7. Each was placed in in $CATALINA_HOME/common/lib and tried - same result/error message. -Original Message- From: Shakeel Ahmad [mailto:[EMAIL PROTECTED] Sent: Sunday, February 20, 2005 10:22 PM To: Tomcat Users List Subject: RE: Tomcat 5.5.7 cannot connect to mysql datasource - what changed? Have you changed the corresponding mysql connector jar file ? -Original Message- From: Richard Mixon (qwest) [mailto:[EMAIL PROTECTED] Sent: 21 February, 2005 7:53 AM To: tomcat-user@jakarta.apache.org Subject: Tomcat 5.5.7 cannot connect to mysql datasource - what changed? We have been using Sun Java 1.4.2, Tomcat 5.0.19, MySQL 4.1.7, MySQL Connector/J 3.0.15 with Hibernate 2.1.7c with no problems. This is on both Windows XP Pro SP2 (development) and SuSE Linux SLES9 (test and production). In order to get failover to work the way we wanted we upgraded to Tomcat 5.5.7 and Sun Java 1.5. The main change in our application was the new format for data soruces in the application context. No problem on Windows XP. We've tried to install on one of our Linux servers and are having no end of grief getting a DB connection to properly happen. Any help or ideas would be much appreciated. I've included the application context and the catalina log error messages below. Thanks in advance - Richard ***- APPLICATION CONTEXT: Context path=/stars docBase=stars debug=99 reloadable=true privileged=true antiResourceLocking=false antiJARLocking=true Logger className=org.apache.catalina.logger.FileLogger prefix=stars. suffix=.log timestamp=true/ Realm className=org.apache.catalina.realm.JDBCRealm debug=99 driverName=com.mysql.jdbc.Driver connectionURL=jdbc:mysql://192.168.11.3:3306/ltojsw?autoReconnec t=trueamp;autoCommit=true connectionName=ltojsw connectionPassword=586579 userTable=PoAssociate userNameCol=userid userCredCol=password userRoleTable=PoUserRole roleNameCol=roleName / Resourcename=jdbc/stars type=javax.sql.DataSource auth=Container maxActive=100 maxIdle=10 maxWait=1 defaultAutoCommit=true userName=ltojsw password=586579 driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://192.168.11.3:3306/ltojsw?aut oReconnect=trueamp;autoCommit=true removeAbandoned=true removeAbandonedTimeout=60 logAbandoned=true / /Context ***- CATALINA ERROR MESSAGES: SNIP 19:37:27,642 INFO [http-8080-Processor25] DatasourceConnectionProvider:51 - Using datasource: java:comp/env/jdbc/stars 19:37:27,648 INFO [http-8080-Processor25] TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended) AbandonedObjectPool is used ([EMAIL PROTECTED]) LogAbandoned: true RemoveAbandoned: true RemoveAbandonedTimeout: 60 19:37:41,696 WARN [http-8080-Processor25] SettingsFactory:107 - Could not obtain connection metadata org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Server connection failure during transaction. Due to underlying exception: 'java.sql.SQLException: Access denied for user ''@'kingfishS11' (using password: YES)'. ** BEGIN NESTED EXCEPTION ** java.sql.SQLException MESSAGE: Access denied for user ''@'kingfishS11' (using password: YES) STACKTRACE: java.sql.SQLException: Access denied for user ''@'kingfishS11' (using password: YES) SNIP - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED