• Post Reply Bookmark Topic Watch Topic
  • New Topic

Authentication Glassfish 4 and JDBC realm problem  RSS feed

 
Michael Oberleitner
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I'm trying to switch a webapplication developed on Glassfish 4 to switch to use container managed security, using a jdbcrealm and I'm stuck, because I can't login.

This is the database:


the realm:


The relevant parts of the web.xml look like this:



glassfish-web.xml


and glassfish-resources:


I thought that when I have a glassfish-resource.xml file like that, the container would create the corresponding connection-pool and resource in glassfish, but after deploying there was no pool and no resource in the glassfish administration console under resources->JDBC and so I created the pool and the resource manually in the administration console. So that's the first point where I'm uncertain.
The second is that I don't know why i can't log with the credentials username: admin password: 1234

Any help is appreciated!
Happy Whitsun!
 
Michael Oberleitner
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, I fixed the problem. There was just an error in the facelet page of the login and I can now login with the correct credentials.
The next problem now is that i have two persistence units in the application. The security realm and the application db and the user is distributed in both persistence units.
Is there a way to make joins over tables in two different persistence units using JPA2. Also still the issue with the glassfish-resource.xml and the pool and the resource is still confusing to me.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!