7 messages in com.mysql.lists.javaRe: Connector/J versions| From | Sent On | Attachments |
|---|---|---|
| Ales Vaupotic | 13 Feb 2004 03:16 | |
| Mark Matthews | 13 Feb 2004 06:57 | |
| Ales Vaupotic | 14 Feb 2004 15:10 | |
| Mark Matthews | 14 Feb 2004 16:39 | |
| Ales Vaupotic | 15 Feb 2004 06:42 | |
| Mark Matthews | 15 Feb 2004 08:57 | |
| Ales Vaupotic | 15 Feb 2004 10:00 |
| Subject: | Re: Connector/J versions![]() |
|---|---|
| From: | Mark Matthews (ma...@mysql.com) |
| Date: | 02/15/2004 08:57:51 AM |
| List: | com.mysql.lists.java |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Ales Vaupotic wrote:
Mark,
I've reinstalled all software on my machine. And the result with authentication is still the same. I have my system set up in latin1 now, just for testing purposes and I still get the same errors. Here are my init files:
my.ini:
#This File was made using the WinMySQLAdmin 1.4 Tool #15.2.2004 11:49:23
#Uncomment or Add only the keys that you know how works. #Read the MySQL Manual for instructions
[mysqld] basedir=C:/mysql #bind-address=127.0.0.1 datadir=C:/mysql/data #language=C:/mysql/share/your language directory #slow query log#= #tmpdir#= #port=3306 #set-variable=key_buffer=16M
[WinMySQLadmin] Server=C:/mysql/bin/mysqld-max-nt.exe user=amanita1 password=hidden
server.xml realm part:
<Realm className="org.apache.catalina.realm.JDBCRealm" debug="99" driverName="com.mysql.jdbc.Driver" connectionURL="jdbc:mysql://localhost/alesdb" connectionName="root" connectionPassword="" userTable="users" userNameCol="user_name" userCredCol="user_pass" userRoleTable="user_roles" roleNameCol="role_name" />
my database is created as follows:
show create database alesdb
CREATE DATABASE `alesdb` /*!40100 DEFAULT CHARACTER SET latin1 */
show create table users;
CREATE TABLE `users` ( `user_name` varchar(15) NOT NULL default '', `user_pass` varchar(15) NOT NULL default '', PRIMARY KEY (`user_name`) ) TYPE=MyISAM DEFAULT CHARSET=latin1
show create table user_roles;
CREATE TABLE `user_roles` ( `user_name` varchar(15) NOT NULL default '', `role_name` varchar(15) NOT NULL default '', PRIMARY KEY (`user_name`,`role_name`) ) TYPE=MyISAM DEFAULT CHARSET=latin1
catalina-log:
2004-02-15 15:15:11 JDBCRealm[Catalina]: Username amanita1 successfully authenticated 2004-02-15 15:15:14 JDBCRealm[Catalina]: Username amanita1 successfully authenticated
catalina console output:
2004.2.15 15:15:03 org.apache.catalina.startup.Catalina start INFO: Server startup in 3766 ms 2004.2.15 15:15:19 org.apache.coyote.tomcat5.CoyoteAdapter service SEVERE: An exception or error occurred in the container during the request processing java.lang.NullPointerException at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:469) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:393) at
org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthenticator.java:182)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:551)
.......
As you can see, nothing has changed. I still can run only one single authentication. I know there are other ways to set up the authentication, but this seemed to me as the easiest one. Let me remind you, that with 3.0.10 driver, everything works like a charm! Have you actually tested 3.1.0 or 3.1.1 in similar environment ? I am now running "all defaults" config, so it has nothing to do with cp1250, as I suspected earlier. Maybe it has something to do with 5.0.18 Tomcat? I would not like going back to some older versions of software if don't really need to, so if we can solve this with existing versions, I would be very happy!
Ales,
Sorry to say, but this seems to work fine for me in Tomcat-5.0.18 with your tables and Connector/J 3.1.1.
Is your server crashing between authentication attempts for any reason? (thus making the connection invalid, which is something JDBCRealm configured to use its own JDBC connection doesn't deal very well with :( )
I would suggest starting to ask these questions over on the Tomcat mailing lists, and it seems the problem could very likely be in their implementation.
If you could walk through their JDBCRealm implementation in a debugger when it throws a NullPointerException, it would be very helpful, as it seems I can't repeat your scenario.
Regards,
-Mark
- -- Mr. Mark Matthews MySQL AB, Software Development Manager, J2EE and Windows Platforms Office: +1 708 332 0507 www.mysql.com
Meet the MySQL Team! April 14-16, 2004 http://www.mysql.com/uc2004/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFAL6UktvXNTca6JD8RAgmzAJ9K/WKRIbtlUhVYc67svrEcPLUf4ACeLKmY B6UMUGxrYac0pPHVi/n+UUo= =ZZ93 -----END PGP SIGNATURE-----




