4 Replies Latest reply on Jun 23, 2009 4:36 AM by wolfgangknauf

    xxx-jboss-beans.xml realm

    michel.strogoff

      Hi,

      I have created a realm configuration to authenticate users against a JNDI registered database.

      I have followed the instructions of this blog : http://anil-identity.blogspot.com/2009/05/as5-specifying-security-domain.html.

      The configuration of the realm seems to be correct since it works correctly when I put it in the login-config.xml file.

      But when I use it as a embedded in my web app (along with jboss-web.xml file), I get the following error :

      javax.security.auth.login.LoginException: Error looking up DataSource from: java:/jdbc/ShareDataSource

      at org.jboss.security.auth.spi.DatabaseServerLoginModule.getUsersPassword(DatabaseServerLoginModule.java:194)
      at org.jboss.security.auth.spi.UsernamePasswordLoginModule.login(UsernamePasswordLoginModule.java:245)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      ...

      Caused by: javax.naming.NameNotFoundException: ShareDataSource


      When I connect to JBoss admin-console, I can see the data source is available. And the application starts up and connects to it.

      But the realm login module is not.

      Can you see why ?

      Best regards,
      Eric