[jboss-user] [Installation, Configuration & DEPLOYMENT] - xxx-jboss-beans.xml realm

michel.strogoff do-not-reply at jboss.com
Thu Jun 18 18:10:52 EDT 2009


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,

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4238623#4238623

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4238623

More information about the jboss-user mailing list