Glassfish 4 Authentication (JDBCRealm and JPA 2) works with Dery but not with MySQL

679 views Asked by At

I followed this tutorial http://slackspace.de/articles/jdbc-security-with-glassfish-3-1-and-java-ee-6/ for setting up authentication. Using Glassfish 4, MySQL 5.5, Ubuntu 12.04 LTS.

Everything works fine with Derby but I have no success with MySQL. To switch from Derby to MySQL, I simply change the JDBC pool in the JDBC resource. JPA persistence works fine with both databases.

Question 1: Any idea what I'm missing?

Question 2: If not, what can I do to narrow the problem. The Glassfish Log is not very detailed.

Question 3: I suspect something with case sensitive table names. Derby does not care about the table names case (tested with ij client). MySQL does (tested with mysql client). Could it be that?

Please take in account that I'm new to Glassfish, JPA and Java EE. Thanks.

1

There are 1 answers

0
Stefan On

Think this is solved and has to do with the MySQL installation. Suddenly when I enabled logging on MySQL, everything worked fine. The only difference was starting the database manually with mysqld instead of the Ubuntu init script. I'll just have to figure out what happens with the script...