Re: NullPointerException is running Wicket 6.2 app

2012-11-07 Thread Martin Grigorov
Hi,

Can you easily reproduce this ?

The problem is at this code in Wicket:

logger.warn(Thread '{}' failed to acquire lock to page with id '{}',
attempted for {} out of allowed {}. The thread that holds the lock has name
'{}'.,
 new Object[] { thread.getName(), pageId, start.elapsedSince(), timeout,
previous.thread.getName() });

For some reason 'previous' is null. But looking at the code it shouldn't be
...
If you can reproduce it in a quickstart application then please attach it
to a ticket in Jira.



On Wed, Nov 7, 2012 at 10:14 PM, saty satya...@gmail.com wrote:

 Any help on what i am doing wrong here..

 Caused by: java.lang.NullPointerException
 at

 org.apache.wicket.page.PageAccessSynchronizer$PageLock.access$000(PageAccessSynchronizer.java:296)
 at

 org.apache.wicket.page.PageAccessSynchronizer.lockPage(PageAccessSynchronizer.java:148)
 at

 org.apache.wicket.page.PageAccessSynchronizer$2.touchPage(PageAccessSynchronizer.java:272)
 at org.apache.wicket.Page.dirty(Page.java:293)
 at org.apache.wicket.markup.html.WebPage.dirty(WebPage.java:324)
 at org.apache.wicket.Page.init(Page.java:715)
 at org.apache.wicket.Page.init(Page.java:182)
 at org.apache.wicket.Page.init(Page.java:161)
 at org.apache.wicket.markup.html.WebPage.init(WebPage.java:106)
 at

 org.wicketstuff.security.components.SecureWebPage.init(SecureWebPage.java:59)
 .
 .




 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/NullPointerException-is-running-Wicket-6-2-app-tp4653694.html
 Sent from the Users forum mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com http://jweekend.com/


Re: NullPointerException is running Wicket 6.2 app

2012-11-07 Thread saty
Thanks for responding,

I am trying to migrate an older app to 6.2 and hit this error.

using debug i could also narrow it down to 'previous' (PageLock previous)
being null, i will try to reproduce this in quickstart application and
create jira.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/NullPointerException-in-running-Wicket-6-2-app-tp4653694p4653697.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: NullPointerException is running Wicket 6.2 app

2012-11-07 Thread saty
I see that timeout prints 0 in my case , so it never executed the  code
previous = locks.get().putIfAbsent(pageId, lock); 

, for some reason the old app did not set a timeout, so after setting it to
something meaningful the app works.

Perhaps

/** timeout value for acquiring a page lock */
private final Duration timeout;

assigning it some default value here may be considered.




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/NullPointerException-in-running-Wicket-6-2-app-tp4653694p4653698.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org