You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Sven Haster (Jira)" <ji...@apache.org> on 2020/08/05 19:06:00 UTC

[jira] [Updated] (WICKET-6810) Asynchronous+encrypted pagestore leads to WicketRuntimeException

     [ https://issues.apache.org/jira/browse/WICKET-6810?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sven Haster updated WICKET-6810:
--------------------------------
    Description: 
If you have a Wicket application with the default DefaultPageManagerProvider (which sets a chain of PageStores) and with the storesettings "encrypted" and "asynchronous" on true (so your chain contains the AsynchronousPageStore and the CryptingPageStore), you get a WicketRuntimeException on the asynchronous pagestore thread upon the first page load.

 

This is because the asynchronous thread has no session, which the CryptingPageStore requires, leading to an exception (stacktrace below).

I'm working on a concrete example but it should be enough to just add 

{code:java}
getStoreSettings().setAsynchronous(true).setEncrypted(true);
{code}

to the init of a default wicket application that has the DefaultPageManagerProvider.

This might not be easy to solve and therefore an unsupported configuration but given that you can create it by simply setting two properties to true, without any indication that it is wrong, it seems like a configuration bug at the least.

 

Stacktrace:
{noformat}
2020-08-05 21:02:39,303 ERROR [stderr] (Wicket-AsyncPageStore-PageSavingThread) Exception in thread "Wicket-AsyncPageStore-PageSavingThread" org.apache.wicket.WicketRuntimeException: There is no application attached to current thread Wicket-AsyncPageStore-PageSavingThread
2020-08-05 21:02:39,303 ERROR [stderr] (Wicket-AsyncPageStore-PageSavingThread) 	at deployment.keyhub-web-console.war//org.apache.wicket.Application.get(Application.java:213)
2020-08-05 21:02:39,304 ERROR [stderr] (Wicket-AsyncPageStore-PageSavingThread) 	at deployment.keyhub-web-console.war//org.apache.wicket.Session.get(Session.java:181)
2020-08-05 21:02:39,304 ERROR [stderr] (Wicket-AsyncPageStore-PageSavingThread) 	at deployment.keyhub-web-console.war//org.apache.wicket.pageStore.DefaultPageContext.getSessionData(DefaultPageContext.java:74)
2020-08-05 21:02:39,304 ERROR [stderr] (Wicket-AsyncPageStore-PageSavingThread) 	at deployment.keyhub-web-console.war//org.apache.wicket.pageStore.AsynchronousPageStore$PendingAdd.getSessionData(AsynchronousPageStore.java:214)
2020-08-05 21:02:39,304 ERROR [stderr] (Wicket-AsyncPageStore-PageSavingThread) 	at deployment.keyhub-web-console.war//org.apache.wicket.pageStore.CryptingPageStore.getSessionData(CryptingPageStore.java:90)
2020-08-05 21:02:39,304 ERROR [stderr] (Wicket-AsyncPageStore-PageSavingThread) 	at deployment.keyhub-web-console.war//org.apache.wicket.pageStore.CryptingPageStore.addPage(CryptingPageStore.java:135)
2020-08-05 21:02:39,304 ERROR [stderr] (Wicket-AsyncPageStore-PageSavingThread) 	at deployment.keyhub-web-console.war//org.apache.wicket.pageStore.SerializingPageStore.addPage(SerializingPageStore.java:82)
2020-08-05 21:02:39,304 ERROR [stderr] (Wicket-AsyncPageStore-PageSavingThread) 	at deployment.keyhub-web-console.war//org.apache.wicket.pageStore.AsynchronousPageStore$PageAddingRunnable.run(AsynchronousPageStore.java:278)
2020-08-05 21:02:39,304 ERROR [stderr] (Wicket-AsyncPageStore-PageSavingThread) 	at java.base/java.lang.Thread.run(Thread.java:832)
{noformat}

  was:
If you have a Wicket application with the default DefaultPageManagerProvider (which sets a chain of PageStores) and with the storesettings "encrypted" and "asynchronous" on true (so your chain contains the AsynchronousPageStore and the CryptingPageStore), you get a WicketRuntimeException on the asynchronous pagestore thread upon the first page load.

 

This is because the asynchronous thread has no session, which the CryptingPageStore requires, leading to an exception (stacktrace below).

I'm working on a concrete example but it should be enough to just add 

getStoreSettings().setAsynchronous(true).setEncrypted(true);

to the init of a default wicket application that has the DefaultPageManagerProvider.

This might not be easy to solve and therefore an unsupported configuration but given that you can create it by simply setting two properties to true, without any indication that it is wrong, it seems like a configuration bug at the least.

 

Stacktrace:
{noformat}
2020-08-05 21:02:39,303 ERROR [stderr] (Wicket-AsyncPageStore-PageSavingThread) Exception in thread "Wicket-AsyncPageStore-PageSavingThread" org.apache.wicket.WicketRuntimeException: There is no application attached to current thread Wicket-AsyncPageStore-PageSavingThread
2020-08-05 21:02:39,303 ERROR [stderr] (Wicket-AsyncPageStore-PageSavingThread) 	at deployment.keyhub-web-console.war//org.apache.wicket.Application.get(Application.java:213)
2020-08-05 21:02:39,304 ERROR [stderr] (Wicket-AsyncPageStore-PageSavingThread) 	at deployment.keyhub-web-console.war//org.apache.wicket.Session.get(Session.java:181)
2020-08-05 21:02:39,304 ERROR [stderr] (Wicket-AsyncPageStore-PageSavingThread) 	at deployment.keyhub-web-console.war//org.apache.wicket.pageStore.DefaultPageContext.getSessionData(DefaultPageContext.java:74)
2020-08-05 21:02:39,304 ERROR [stderr] (Wicket-AsyncPageStore-PageSavingThread) 	at deployment.keyhub-web-console.war//org.apache.wicket.pageStore.AsynchronousPageStore$PendingAdd.getSessionData(AsynchronousPageStore.java:214)
2020-08-05 21:02:39,304 ERROR [stderr] (Wicket-AsyncPageStore-PageSavingThread) 	at deployment.keyhub-web-console.war//org.apache.wicket.pageStore.CryptingPageStore.getSessionData(CryptingPageStore.java:90)
2020-08-05 21:02:39,304 ERROR [stderr] (Wicket-AsyncPageStore-PageSavingThread) 	at deployment.keyhub-web-console.war//org.apache.wicket.pageStore.CryptingPageStore.addPage(CryptingPageStore.java:135)
2020-08-05 21:02:39,304 ERROR [stderr] (Wicket-AsyncPageStore-PageSavingThread) 	at deployment.keyhub-web-console.war//org.apache.wicket.pageStore.SerializingPageStore.addPage(SerializingPageStore.java:82)
2020-08-05 21:02:39,304 ERROR [stderr] (Wicket-AsyncPageStore-PageSavingThread) 	at deployment.keyhub-web-console.war//org.apache.wicket.pageStore.AsynchronousPageStore$PageAddingRunnable.run(AsynchronousPageStore.java:278)
2020-08-05 21:02:39,304 ERROR [stderr] (Wicket-AsyncPageStore-PageSavingThread) 	at java.base/java.lang.Thread.run(Thread.java:832)
{noformat}


> Asynchronous+encrypted pagestore leads to WicketRuntimeException
> ----------------------------------------------------------------
>
>                 Key: WICKET-6810
>                 URL: https://issues.apache.org/jira/browse/WICKET-6810
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-core
>    Affects Versions: 9.0.0
>            Reporter: Sven Haster
>            Priority: Major
>
> If you have a Wicket application with the default DefaultPageManagerProvider (which sets a chain of PageStores) and with the storesettings "encrypted" and "asynchronous" on true (so your chain contains the AsynchronousPageStore and the CryptingPageStore), you get a WicketRuntimeException on the asynchronous pagestore thread upon the first page load.
>  
> This is because the asynchronous thread has no session, which the CryptingPageStore requires, leading to an exception (stacktrace below).
> I'm working on a concrete example but it should be enough to just add 
> {code:java}
> getStoreSettings().setAsynchronous(true).setEncrypted(true);
> {code}
> to the init of a default wicket application that has the DefaultPageManagerProvider.
> This might not be easy to solve and therefore an unsupported configuration but given that you can create it by simply setting two properties to true, without any indication that it is wrong, it seems like a configuration bug at the least.
>  
> Stacktrace:
> {noformat}
> 2020-08-05 21:02:39,303 ERROR [stderr] (Wicket-AsyncPageStore-PageSavingThread) Exception in thread "Wicket-AsyncPageStore-PageSavingThread" org.apache.wicket.WicketRuntimeException: There is no application attached to current thread Wicket-AsyncPageStore-PageSavingThread
> 2020-08-05 21:02:39,303 ERROR [stderr] (Wicket-AsyncPageStore-PageSavingThread) 	at deployment.keyhub-web-console.war//org.apache.wicket.Application.get(Application.java:213)
> 2020-08-05 21:02:39,304 ERROR [stderr] (Wicket-AsyncPageStore-PageSavingThread) 	at deployment.keyhub-web-console.war//org.apache.wicket.Session.get(Session.java:181)
> 2020-08-05 21:02:39,304 ERROR [stderr] (Wicket-AsyncPageStore-PageSavingThread) 	at deployment.keyhub-web-console.war//org.apache.wicket.pageStore.DefaultPageContext.getSessionData(DefaultPageContext.java:74)
> 2020-08-05 21:02:39,304 ERROR [stderr] (Wicket-AsyncPageStore-PageSavingThread) 	at deployment.keyhub-web-console.war//org.apache.wicket.pageStore.AsynchronousPageStore$PendingAdd.getSessionData(AsynchronousPageStore.java:214)
> 2020-08-05 21:02:39,304 ERROR [stderr] (Wicket-AsyncPageStore-PageSavingThread) 	at deployment.keyhub-web-console.war//org.apache.wicket.pageStore.CryptingPageStore.getSessionData(CryptingPageStore.java:90)
> 2020-08-05 21:02:39,304 ERROR [stderr] (Wicket-AsyncPageStore-PageSavingThread) 	at deployment.keyhub-web-console.war//org.apache.wicket.pageStore.CryptingPageStore.addPage(CryptingPageStore.java:135)
> 2020-08-05 21:02:39,304 ERROR [stderr] (Wicket-AsyncPageStore-PageSavingThread) 	at deployment.keyhub-web-console.war//org.apache.wicket.pageStore.SerializingPageStore.addPage(SerializingPageStore.java:82)
> 2020-08-05 21:02:39,304 ERROR [stderr] (Wicket-AsyncPageStore-PageSavingThread) 	at deployment.keyhub-web-console.war//org.apache.wicket.pageStore.AsynchronousPageStore$PageAddingRunnable.run(AsynchronousPageStore.java:278)
> 2020-08-05 21:02:39,304 ERROR [stderr] (Wicket-AsyncPageStore-PageSavingThread) 	at java.base/java.lang.Thread.run(Thread.java:832)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)