databinder-3 bind auth cookie to ip address
databinder-4 databinder dispatch script should respond to 'stop'
databinder-5 databinder dispatch plain HTTP
databinder-6 Access to QueryPanel
databinder-7 auth components need localizable strings
databinder-8 blob size validation
databinder-9 buildr plugin
databinder-10 DataApplication initialization
databinder-11 please reconsider IDataApplication.isDataBrowserAllowed()
databinder-12 Add target directory to svn.ignore
databinder-15 remove button for IterableEntityView
databinder-16 DataServer path-finding problems
databinder-17 DataBinder-AO hard-codes property names
databinder-18 NPE trying to sign in as non-existent user
Created by: zcox
on: 2/27/08
Updated by: zcox
on: 2/29/08
Assigned to:

I'm using the latest Databinder-AO 1.2 snapshot jars (just ran buildr in examples directory at 5pm 27 Feb 2008) and get a NPE when trying to sign in to DataSignInPanel as a user that does not exist in the database:

WicketMessage: Method onFormSubmitted of interface org.apache.wicket.markup.html.form.IFormSubmitListener targeted at component [MarkupContainer [Component id = signInForm, page = net.databinder.auth.components.ao.DataSignInPage, path = 1:signinSocket:signInForm.DataSignInPanel$SignInForm, isVisible = true, isVersioned = true]] threw an exception

Root cause:

java.lang.NullPointerException
at net.databinder.models.ao.EntityModel.setObject(EntityModel.java:47)
at net.databinder.models.ao.EntityModel.<init>(EntityModel.java:30)
at net.databinder.auth.ao.AuthDataSession.getUserModel(AuthDataSession.java:19)
at net.databinder.auth.AuthDataSessionBase.signIn(AuthDataSessionBase.java:124)
at net.databinder.auth.AuthDataSessionBase.signIn(AuthDataSessionBase.java:112)
at net.databinder.auth.components.DataSignInPanel$SignInForm.onSubmit(DataSignInPanel.java:77)
at org.apache.wicket.markup.html.form.Form.delegateSubmit(Form.java:1328)
at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:776)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:183)
at org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73)
at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:90)
at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1166)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1241)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1316)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:354)
at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:842)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)

Complete stack:

org.apache.wicket.WicketRuntimeException: Method onFormSubmitted of interface org.apache.wicket.markup.html.form.IFormSubmitListener targeted at component [MarkupContainer [Component id = signInForm, page = net.databinder.auth.components.ao.DataSignInPage, path = 1:signinSocket:signInForm.DataSignInPanel$SignInForm, isVisible = true, isVersioned = true]] threw an exception
at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:194)
at org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73)
at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:90)
at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1166)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1241)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1316)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:354)

java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:183)
at org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73)
at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:90)
at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1166)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1241)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1316)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:354)

Not sure how this is happening though, as AuthDataSessionBase.signIn:111 does a null check on the potential DataUser object before calling the other signIn method which leads to this exception. Is this a recent fix that hasn’t made it into 1.2 snapshot jars yet?

databinder-20 [ActiveObjects] Passing Null Values to DBParam
databinder-21 TextileLabel Fails to Render Valid Markup
databinder-22 [DataStaticService] ensureSession disregards key
databinder-23 arrows in baseball ex
databinder-24 rollbacks should warn
databinder-25 graffiti bad query

Enter new issue

[databinder-18] NPE trying to sign in as non-existent user edit

Comments

I think I may have fixed this one in fixing the other problems with sign-in, can you check? Unknown user gives “Sorry, these credentials are not recognized ” in my testbed app.

Yep I get the same message “Sorry, these credentials are not recognized.” so looks like this one is fixed. Thanks! :)