users@glassfish.java.net

Re: How to: use Form based auth via JDBCRealm:oracle in Glassfish 3.0

From: Felipe Gaścho <fgaucho_at_gmail.com>
Date: Fri, 15 Jan 2010 12:32:14 +0100

then you did a select in your database for this user and hashed password ?

if yes, then sorry .. I am running out of imagination :)

On Fri, Jan 15, 2010 at 11:50 AM, <glassfish_at_javadesktop.org> wrote:
> Yes and I was thinking the null thing is a result of the failure to find the JDBCRealm class, after that I would expect anything to fail.
>
> I went back and added a username and password to the realm page and now I get the same messages except instead of "user null" it says user wonderland - which is the username I put in.
>
>
> Here is some log stuff:
> [#|2010-01-15T05:45:25.622-0500|SEVERE|glassfishv3.0|javax.enterprise.system.core.security.com.sun.enterprise.security.auth.realm|_ThreadID=33;_ThreadName=Thread-1;|SEC1112: Cannot validate user [any] for JDBC realm.|#]
>
>
>
> [#|2010-01-15T05:45:25.622-0500|FINE|glassfishv3.0|javax.enterprise.system.core.security.com.sun.enterprise.security.auth.realm|_ThreadID=33;_ThreadName=Thread-1;ClassName=com.sun.enterprise.security.auth.realm.jdbc.JDBCRealm;MethodName=isUserValid;|Cannot validate user
>
> javax.security.auth.login.LoginException: Unable to connect to datasource jdbcrealmwonderland for database user wonderland.
>
>        at com.sun.enterprise.security.auth.realm.jdbc.JDBCRealm.getConnection(JDBCRealm.java:550)
>
>        at com.sun.enterprise.security.auth.realm.jdbc.JDBCRealm.isUserValid(JDBCRealm.java:393)
>
>        at com.sun.enterprise.security.auth.realm.jdbc.JDBCRealm.authenticate(JDBCRealm.java:311)
>
>        at com.sun.enterprise.security.auth.login.JDBCLoginModule.authenticate(JDBCLoginModule.java:72)
>
>        at com.sun.enterprise.security.auth.login.PasswordLoginModule.authenticateUser(PasswordLoginModule.java:90)
>
>        at com.sun.appserv.security.AppservPasswordLoginModule.login(AppservPasswordLoginModule.java:141)
>
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>
>        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>
>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>
>        at java.lang.reflect.Method.invoke(Method.java:597)
>
>        at javax.security.auth.login.LoginContext.invoke(LoginContext.java:769)
>
>        at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
>
>        at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
>
>        at java.security.AccessController.doPrivileged(Native Method)
>
>        at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)
>
>        at javax.security.auth.login.LoginContext.login(LoginContext.java:579)
>
>        at com.sun.enterprise.security.auth.login.LoginContextDriver.doPasswordLogin(LoginContextDriver.java:341)
>
>        at com.sun.enterprise.security.auth.login.LoginContextDriver.login(LoginContextDriver.java:199)
>
>        at com.sun.enterprise.security.auth.login.LoginContextDriver.login(LoginContextDriver.java:152)
>
>        at com.sun.web.security.RealmAdapter.authenticate(RealmAdapter.java:478)
>
>        at com.sun.web.security.RealmAdapter.authenticate(RealmAdapter.java:417)
>
>        at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:265)
>
>        at org.apache.catalina.authenticator.AuthenticatorBase.processSecurityCheck(AuthenticatorBase.java:970)
>
>        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:575)
>
>        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:615)
>
>        at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
>
>        at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)
>
>        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185)
>
>        at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:332)
>
>        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:233)
>
>        at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165)
>
>        at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
>
>        at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
>
>        at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
>
>        at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
>
>        at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
>
>        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
>
>        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
>
>        at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
>
>        at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
>
>        at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
>
>        at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
>
>        at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
>
>        at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
>
>        at java.lang.Thread.run(Thread.java:619)
>
> Caused by: javax.naming.NamingException: Lookup failed for 'jdbcrealmwonderland' in SerialContext  [Root exception is javax.naming.NameNotFoundException: jdbcrealmwonderland not found]
>
>        at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:442)
>
>        at javax.naming.InitialContext.lookup(InitialContext.java:392)
>
>        at javax.naming.InitialContext.lookup(InitialContext.java:392)
>
>        at com.sun.enterprise.connectors.service.ConnectorResourceAdminServiceImpl.lookup(ConnectorResourceAdminServiceImpl.java:203)
>
>        at com.sun.enterprise.connectors.ConnectorRuntime.lookupNonTxResource(ConnectorRuntime.java:428)
>
>        at com.sun.enterprise.security.auth.realm.jdbc.JDBCRealm.getConnection(JDBCRealm.java:538)
>
>        ... 44 more
>
> Caused by: javax.naming.NameNotFoundException: jdbcrealmwonderland not found
>
>        at com.sun.enterprise.naming.impl.TransientContext.doLookup(TransientContext.java:197)
>
>        at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:168)
>
>        at com.sun.enterprise.naming.impl.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:58)
>
>        at com.sun.enterprise.naming.impl.LocalSerialContextProviderImpl.lookup(LocalSerialContextProviderImpl.java:101)
>
>        at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:430)
>
>        ... 49 more
>
> |#]
>
>
>
> [#|2010-01-15T05:45:25.622-0500|FINE|glassfishv3.0|javax.enterprise.system.core.security.com.sun.appserv.security|_ThreadID=33;_ThreadName=Thread-1;ClassName=com.sun.appserv.security.AppservPasswordLoginModule;MethodName=abort;|JAAS authentication aborted.|#]
>
>
>
> [#|2010-01-15T05:45:25.622-0500|FINEST|glassfishv3.0|javax.enterprise.system.core.security.com.sun.enterprise.security.auth.login|_ThreadID=33;_ThreadName=Thread-1;ClassName=com.sun.enterprise.security.auth.login.LoginContextDriver;MethodName=doPasswordLogin;|doPasswordLogin fails
>
> javax.security.auth.login.LoginException: Security Exception
>
>        at javax.security.auth.login.LoginContext.invoke(LoginContext.java:856)
>
>        at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
>
>        at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
>
>        at java.security.AccessController.doPrivileged(Native Method)
>
>        at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)
>
>        at javax.security.auth.login.LoginContext.login(LoginContext.java:579)
>
>        at com.sun.enterprise.security.auth.login.LoginContextDriver.doPasswordLogin(LoginContextDriver.java:341)
>
>        at com.sun.enterprise.security.auth.login.LoginContextDriver.login(LoginContextDriver.java:199)
>
>        at com.sun.enterprise.security.auth.login.LoginContextDriver.login(LoginContextDriver.java:152)
>
>        at com.sun.web.security.RealmAdapter.authenticate(RealmAdapter.java:478)
>
>        at com.sun.web.security.RealmAdapter.authenticate(RealmAdapter.java:417)
>
>        at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:265)
>
>        at org.apache.catalina.authenticator.AuthenticatorBase.processSecurityCheck(AuthenticatorBase.java:970)
>
>        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:575)
>
>        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:615)
>
>        at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
>
>        at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)
>
>        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185)
>
>        at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:332)
>
>        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:233)
>
>        at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165)
>
>        at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
>
>        at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
>
>        at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
>
>        at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
>
>        at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
>
>        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
>
>        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
>
>        at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
>
>        at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
>
>        at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
>
>        at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
>
>        at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
>
>        at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
>
>        at java.lang.Thread.run(Thread.java:619)
>
> Caused by: java.lang.SecurityException
>
>        at javax.security.auth.login.LoginContext.invoke(LoginContext.java:857)
>
>        ... 34 more
>
> |#]
>
>
>
> [#|2010-01-15T05:45:25.622-0500|WARNING|glassfishv3.0|javax.enterprise.system.container.web.com.sun.web.security|_ThreadID=33;_ThreadName=Thread-1;|Web login failed: Login failed: javax.security.auth.login.LoginException: Security Exception|#]
> [Message sent by forum member 'cal41' (calgach_at_yahoo.ca)]
>
> http://forums.java.net/jive/thread.jspa?messageID=381138
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>



-- 
------------------------------------------
   Felipe Gaścho
   10+ Java Programmer
   CEJUG Senior Advisor