You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Adriano dos Santos Fernandes (JIRA)" <ji...@apache.org> on 2009/02/12 16:14:00 UTC
[jira] Created: (WICKET-2099) NullPointerException after jetty
restart with persistent sessions
NullPointerException after jetty restart with persistent sessions
-----------------------------------------------------------------
Key: WICKET-2099
URL: https://issues.apache.org/jira/browse/WICKET-2099
Project: Wicket
Issue Type: Bug
Components: wicket
Affects Versions: 1.4-RC2
Reporter: Adriano dos Santos Fernandes
I start Jetty with a savePeriod (HashSessionManager) of 4 seconds. When I restart it, a NPE is logged each 4s. After some (not all) page loads, the exception stop.
Since NPE is never a feature, I suggest to apply that patch. Or something else more appropriate, if you understand the problem better.
Index: wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/DiskPageStore.java
===================================================================
--- wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/DiskPageStore.java (revisão 740670)
+++ wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/DiskPageStore.java (cópia de trabalho)
@@ -1165,7 +1165,7 @@
else if (page instanceof SerializedPageWithSession)
{
SerializedPageWithSession serialized = (SerializedPageWithSession)page;
- if (serialized.page.get() == SerializedPageWithSession.NO_PAGE)
+ if (serialized.page != null && serialized.page.get() == SerializedPageWithSession.NO_PAGE)
{
// stripped page, need to restore it first
result = restoreStrippedSerializedPage(serialized);
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-2099) NullPointerException after jetty
restart with persistent sessions
Posted by "Adriano dos Santos Fernandes (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-2099?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12675346#action_12675346 ]
Adriano dos Santos Fernandes commented on WICKET-2099:
------------------------------------------------------
Stack trace:
java.lang.NullPointerException
at org.apache.wicket.protocol.http.pagestore.DiskPageStore.prepareForSerialization(DiskPageStore.java:1168)
at org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.writeObject(SecondLevelCacheSessionStore.java:381)
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 java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
at org.mortbay.jetty.servlet.HashSessionManager$Session.save(HashSessionManager.java:555)
at org.mortbay.jetty.servlet.HashSessionManager.saveSessions(HashSessionManager.java:400)
at org.mortbay.jetty.servlet.HashSessionManager$1.run(HashSessionManager.java:165)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
> NullPointerException after jetty restart with persistent sessions
> -----------------------------------------------------------------
>
> Key: WICKET-2099
> URL: https://issues.apache.org/jira/browse/WICKET-2099
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.4-RC2
> Reporter: Adriano dos Santos Fernandes
>
> I start Jetty with a savePeriod (HashSessionManager) of 4 seconds. When I restart it, a NPE is logged each 4s. After some (not all) page loads, the exception stop.
> Since NPE is never a feature, I suggest to apply that patch. Or something else more appropriate, if you understand the problem better.
> Index: wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/DiskPageStore.java
> ===================================================================
> --- wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/DiskPageStore.java (revisão 740670)
> +++ wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/DiskPageStore.java (cópia de trabalho)
> @@ -1165,7 +1165,7 @@
> else if (page instanceof SerializedPageWithSession)
> {
> SerializedPageWithSession serialized = (SerializedPageWithSession)page;
> - if (serialized.page.get() == SerializedPageWithSession.NO_PAGE)
> + if (serialized.page != null && serialized.page.get() == SerializedPageWithSession.NO_PAGE)
> {
> // stripped page, need to restore it first
> result = restoreStrippedSerializedPage(serialized);
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-2099) NullPointerException after jetty
restart with persistent sessions
Posted by "Adriano dos Santos Fernandes (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-2099?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12706064#action_12706064 ]
Adriano dos Santos Fernandes commented on WICKET-2099:
------------------------------------------------------
Thanks!
> NullPointerException after jetty restart with persistent sessions
> -----------------------------------------------------------------
>
> Key: WICKET-2099
> URL: https://issues.apache.org/jira/browse/WICKET-2099
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.4-RC2
> Reporter: Adriano dos Santos Fernandes
> Assignee: Matej Knopp
>
> I start Jetty with a savePeriod (HashSessionManager) of 4 seconds. When I restart it, a NPE is logged each 4s. After some (not all) page loads, the exception stop.
> Since NPE is never a feature, I suggest to apply that patch. Or something else more appropriate, if you understand the problem better.
> Index: wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/DiskPageStore.java
> ===================================================================
> --- wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/DiskPageStore.java (revisão 740670)
> +++ wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/DiskPageStore.java (cópia de trabalho)
> @@ -1165,7 +1165,7 @@
> else if (page instanceof SerializedPageWithSession)
> {
> SerializedPageWithSession serialized = (SerializedPageWithSession)page;
> - if (serialized.page.get() == SerializedPageWithSession.NO_PAGE)
> + if (serialized.page != null && serialized.page.get() == SerializedPageWithSession.NO_PAGE)
> {
> // stripped page, need to restore it first
> result = restoreStrippedSerializedPage(serialized);
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-2099) NullPointerException after jetty
restart with persistent sessions
Posted by "Adriano dos Santos Fernandes (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-2099?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12705992#action_12705992 ]
Adriano dos Santos Fernandes commented on WICKET-2099:
------------------------------------------------------
Any chance to have my patch applied?
I'm using a modified RC2 (or 3) for a long time with it...
> NullPointerException after jetty restart with persistent sessions
> -----------------------------------------------------------------
>
> Key: WICKET-2099
> URL: https://issues.apache.org/jira/browse/WICKET-2099
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.4-RC2
> Reporter: Adriano dos Santos Fernandes
>
> I start Jetty with a savePeriod (HashSessionManager) of 4 seconds. When I restart it, a NPE is logged each 4s. After some (not all) page loads, the exception stop.
> Since NPE is never a feature, I suggest to apply that patch. Or something else more appropriate, if you understand the problem better.
> Index: wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/DiskPageStore.java
> ===================================================================
> --- wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/DiskPageStore.java (revisão 740670)
> +++ wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/DiskPageStore.java (cópia de trabalho)
> @@ -1165,7 +1165,7 @@
> else if (page instanceof SerializedPageWithSession)
> {
> SerializedPageWithSession serialized = (SerializedPageWithSession)page;
> - if (serialized.page.get() == SerializedPageWithSession.NO_PAGE)
> + if (serialized.page != null && serialized.page.get() == SerializedPageWithSession.NO_PAGE)
> {
> // stripped page, need to restore it first
> result = restoreStrippedSerializedPage(serialized);
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-2099) NullPointerException after jetty
restart with persistent sessions
Posted by "Johan Compagner (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-2099?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12674537#action_12674537 ]
Johan Compagner commented on WICKET-2099:
-----------------------------------------
do you also have a full stacktrace for us to see how that happens?
> NullPointerException after jetty restart with persistent sessions
> -----------------------------------------------------------------
>
> Key: WICKET-2099
> URL: https://issues.apache.org/jira/browse/WICKET-2099
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.4-RC2
> Reporter: Adriano dos Santos Fernandes
>
> I start Jetty with a savePeriod (HashSessionManager) of 4 seconds. When I restart it, a NPE is logged each 4s. After some (not all) page loads, the exception stop.
> Since NPE is never a feature, I suggest to apply that patch. Or something else more appropriate, if you understand the problem better.
> Index: wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/DiskPageStore.java
> ===================================================================
> --- wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/DiskPageStore.java (revisão 740670)
> +++ wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/DiskPageStore.java (cópia de trabalho)
> @@ -1165,7 +1165,7 @@
> else if (page instanceof SerializedPageWithSession)
> {
> SerializedPageWithSession serialized = (SerializedPageWithSession)page;
> - if (serialized.page.get() == SerializedPageWithSession.NO_PAGE)
> + if (serialized.page != null && serialized.page.get() == SerializedPageWithSession.NO_PAGE)
> {
> // stripped page, need to restore it first
> result = restoreStrippedSerializedPage(serialized);
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (WICKET-2099) NullPointerException after jetty
restart with persistent sessions
Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-2099?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Igor Vaynberg reassigned WICKET-2099:
-------------------------------------
Assignee: Matej Knopp
> NullPointerException after jetty restart with persistent sessions
> -----------------------------------------------------------------
>
> Key: WICKET-2099
> URL: https://issues.apache.org/jira/browse/WICKET-2099
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.4-RC2
> Reporter: Adriano dos Santos Fernandes
> Assignee: Matej Knopp
>
> I start Jetty with a savePeriod (HashSessionManager) of 4 seconds. When I restart it, a NPE is logged each 4s. After some (not all) page loads, the exception stop.
> Since NPE is never a feature, I suggest to apply that patch. Or something else more appropriate, if you understand the problem better.
> Index: wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/DiskPageStore.java
> ===================================================================
> --- wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/DiskPageStore.java (revisão 740670)
> +++ wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/DiskPageStore.java (cópia de trabalho)
> @@ -1165,7 +1165,7 @@
> else if (page instanceof SerializedPageWithSession)
> {
> SerializedPageWithSession serialized = (SerializedPageWithSession)page;
> - if (serialized.page.get() == SerializedPageWithSession.NO_PAGE)
> + if (serialized.page != null && serialized.page.get() == SerializedPageWithSession.NO_PAGE)
> {
> // stripped page, need to restore it first
> result = restoreStrippedSerializedPage(serialized);
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (WICKET-2099) NullPointerException after jetty
restart with persistent sessions
Posted by "Matej Knopp (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-2099?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Matej Knopp resolved WICKET-2099.
---------------------------------
Resolution: Fixed
Applied to trunk.
> NullPointerException after jetty restart with persistent sessions
> -----------------------------------------------------------------
>
> Key: WICKET-2099
> URL: https://issues.apache.org/jira/browse/WICKET-2099
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.4-RC2
> Reporter: Adriano dos Santos Fernandes
> Assignee: Matej Knopp
>
> I start Jetty with a savePeriod (HashSessionManager) of 4 seconds. When I restart it, a NPE is logged each 4s. After some (not all) page loads, the exception stop.
> Since NPE is never a feature, I suggest to apply that patch. Or something else more appropriate, if you understand the problem better.
> Index: wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/DiskPageStore.java
> ===================================================================
> --- wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/DiskPageStore.java (revisão 740670)
> +++ wicket/src/main/java/org/apache/wicket/protocol/http/pagestore/DiskPageStore.java (cópia de trabalho)
> @@ -1165,7 +1165,7 @@
> else if (page instanceof SerializedPageWithSession)
> {
> SerializedPageWithSession serialized = (SerializedPageWithSession)page;
> - if (serialized.page.get() == SerializedPageWithSession.NO_PAGE)
> + if (serialized.page != null && serialized.page.get() == SerializedPageWithSession.NO_PAGE)
> {
> // stripped page, need to restore it first
> result = restoreStrippedSerializedPage(serialized);
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.