7 messages in com.mysql.lists.javaRe: Connector/J versions
FromSent OnAttachments
Ales Vaupotic13 Feb 2004 03:16 
Mark Matthews13 Feb 2004 06:57 
Ales Vaupotic14 Feb 2004 15:10 
Mark Matthews14 Feb 2004 16:39 
Ales Vaupotic15 Feb 2004 06:42 
Mark Matthews15 Feb 2004 08:57 
Ales Vaupotic15 Feb 2004 10:00 
Subject:Re: Connector/J versions
From:Ales Vaupotic (ales@email.si)
Date:02/15/2004 06:42:54 AM
List:com.mysql.lists.java

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!

Br, Ales