databinder 0.6 NPE on getCookies

Get help using Databinder, suggest new features, report bugs, and save the princess.

databinder 0.6 NPE on getCookies

Postby rkaercher on Thu Jul 27, 2006 10:55 am

Hi,
I've just toyed around with the auth classes of databinder 0.6 and needed to add my own user-class because apparently the derby database doesn't like "User" as a table name.
After I replaced the necessary classes and started the application the following stacktrace was thrown whenever I opened the app in a fresh browser. Is it possible that getCookies() from the WebRequest class returns null or am I doing something wrong?

java.lang.NullPointerException at net.databinder.DataRequestCycle.getCookies(DataRequestCycle.java:128) at net.databinder.DataRequestCycle.getCookie(DataRequestCycle.java:143) at net.databinder.auth.AuthDataSession.cookieSignIn(AuthDataSession.java:145) at net.databinder.auth.AuthDataSession.isSignedIn(AuthDataSession.java:75) at net.databinder.auth.AuthDataSession.getUser(AuthDataSession.java:61) at net.databinder.auth.AuthDataApplication.hasAnyRole(AuthDataApplication.java:97) at wicket.authorization.strategies.role.AbstractRoleAuthorizationStrategy.hasAny(AbstractRoleAuthorizationStrategy.java:63) at wicket.authorization.strategies.role.annotations.AnnotationsRoleAuthorizationStrategy.isInstantiationAuthorized(AnnotationsRoleAuthorizationStrategy.java:73) at wicket.authorization.strategies.CompoundAuthorizationStrategy.isInstantiationAuthorized(CompoundAuthorizationStrategy.java:61) at wicket.Application$1.onInstantiation(Application.java:243) at wicket.Application.notifyComponentInstantiationListeners(Application.java:777) at wicket.Component.<init>(Component.java:559) at wicket.MarkupContainer.<init>(MarkupContainer.java:115) at wicket.Page.<init>(Page.java:193) at wicket.markup.html.WebPage.<init>(WebPage.java:119) at net.databinder.components.DataPage.<init>(DataPage.java:41)

BTW - Great work you are doing with the whole databinder project, keep up the good work, thank you!

roland
rkaercher
 
Posts: 4
Joined: Thu Jul 27, 2006 10:48 am

Postby Nathan on Thu Jul 27, 2006 1:59 pm

Er, perhaps I was a little brash in calling the object/table "User." Maybe I'll change it.

For that NPE, Wicket is just returning the value from HttpServletRequest so I guess anything is possible. Bummer. Try upping your Databinder version to 0.7-SNAPSHOT, which I just deployed with a null check for the cookie array. I hope that does the trick!
Nathan
Site Admin
 
Posts: 422
Joined: Thu Mar 30, 2006 12:58 am
Location: New York

Postby rkaercher on Fri Jul 28, 2006 6:46 am

Hi Nathan,

did that and everything is working fine now. Thank you!

roland

P.S.: I guess a name change would delight a lot of netbeans users because derby is the default db that can be installed via update center in 5.5 and it will be part of the Java SE 6 release as well.
rkaercher
 
Posts: 4
Joined: Thu Jul 27, 2006 10:48 am

Postby Nathan on Fri Jul 28, 2006 11:38 am

You're very welcome, and thanks for your interest in Databinder. How is NetBeans + Maven these days? Is it time for me to tone down my complaints on the workspace optimization page? With all those bundled servers it would probably be my recommended IDE for new users.
Nathan
Site Admin
 
Posts: 422
Joined: Thu Mar 30, 2006 12:58 am
Location: New York

Postby rkaercher on Sat Jul 29, 2006 12:28 pm

I like the maven integration with mevenide2, works great and instantly deployed to the sun appserver. I haven't checked the eclipse support but I must say that I'm quite happy with the current netbeans integration. I haven't checked the jetty jetty plugin yet because somehow the new jetty plugin just wont download on my installation, I must have messed something up with maven there.

roland
rkaercher
 
Posts: 4
Joined: Thu Jul 27, 2006 10:48 am

Postby Nathan on Sat Jul 29, 2006 8:39 pm

Okay, I'll take another look at NetBeans.

For anyone wanting this fix (or any snapshot), the snapshot repository has moved. I couldn't have them in the same place as point releases since we're now seeding to Maven directly. To get snapshots you need the repository described in this updated FAQ.
Nathan
Site Admin
 
Posts: 422
Joined: Thu Mar 30, 2006 12:58 am
Location: New York

Postby rkaercher on Tue Aug 08, 2006 4:50 am

I just checked the new mevenide release for netbeans and was able to successfully create a databinder project using the archetype :-)
Dependency downloading was painfully slow somehow but I guess that will improve automatically once maven2 will catch on in bigger organizations providing more bandwith for repositories. They also added the ability to manually install artefacts from the gui. (tested on netbeans 5.5b2).

roland
rkaercher
 
Posts: 4
Joined: Thu Jul 27, 2006 10:48 am

Postby Nathan on Tue Aug 08, 2006 9:42 am

The central repository performance comes and goes. You could try setting up with one of the mirrors, if you haven't already. Maven needs to make it easier to choose a mirror, or do it automatically. I'm sure that feature can't be too far off, as we're all feeling the slow repo pain.
Nathan
Site Admin
 
Posts: 422
Joined: Thu Mar 30, 2006 12:58 am
Location: New York


Return to Databinder Questions

Who is online

Users browsing this forum: Google [Bot] and 0 guests

cron