3 messages in com.mysql.lists.javaunsupported operation using mm.mysql-...
FromSent OnAttachments
Fabian Sommer15 Aug 2002 08:11 
Mark Matthews15 Aug 2002 09:00 
Fabian Sommer15 Aug 2002 09:15 
Subject:unsupported operation using mm.mysql-MysqlDataSource?
From:Fabian Sommer (faso@web.de)
Date:08/15/2002 08:11:20 AM
List:com.mysql.lists.java

Hello!

I got a problem using the mm.mysql-2.0.14-driver resp. the mysql-connector-3.0: I try to access a mysql-database (4.0 but I think this is not important) using jsp with struts-extension, running on a Tomcat4.1 servlet-container.

I use standard-database-description in an xml-file, providing the url for the driver and username and password.

I get a DataSource-object (javax.sql.DataSource) and I can use the DataSource.getConnection() method. But all I get when I use this method is a SQLException telling me that user "nobody@127.0.0.1 (using Password:YES)" is not allowed to access the database. That's alright, I expected this as this is what I entered in the Grant-tables.

But when I try to use DataSource.getConnection(String user, String passwd) method, using correct (or incorrect, doesn't matter) user entrys all I get is an Exception "Unsupported Operation" which seems to got thrown by the database driver. But how shall I connect using the DataSource object if I can't use a username and password?

Please tell me if I made something wrong or there is a solution beside my knowledge (I hope for this...). Thanks for any help!