You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by "Aaron J. Garcia" <ag...@rentec.com> on 2014/02/05 19:12:15 UTC

Changed JSESSIONID Results in Wicket Exception

Hi Everyone,

I maintain a Wicket application running on Tomcat 7.0.39, and I recently 
altered $TOMCAT_HOME/conf/context.xml to include a sessionCookieName 
parameter.  I made a change like this:

<Context sessionCookieName="JSESSIONID_MYAPP">

This properly changes the session cookie that is used by Wicket to 
JESSIONID_MYAPP instead of JSESSIONID.  However, when I start up my 
Wicket app, I get the following error spit out to the logs in 
Development mode, when running in Intellij.  Any idea why?

When I was using the normal JSESSIONID, it was properly ignoring it when 
it was appended to the classname for the SignInPage.

Thanks for your help!

-- Aaron

java.lang.ClassNotFoundException: 
my/orgs/package/SignInPage;JSESSIONID_MYAPP=075861AE6FB6CE4ED36F2B5EE01B387B
     at java.lang.Class.forName0(Native Method)
     at java.lang.Class.forName(Class.java:340)
     at 
org.apache.wicket.application.AbstractClassResolver.resolveClass(AbstractClassResolver.java:108)
     at 
org.apache.wicket.core.util.lang.WicketObjects.resolveClass(WicketObjects.java:72)
     at 
org.apache.wicket.core.request.mapper.AbstractComponentMapper.getPageClass(AbstractComponentMapper.java:139)
     at 
org.apache.wicket.core.request.mapper.BookmarkableMapper.parseRequest(BookmarkableMapper.java:118)
     at 
org.apache.wicket.core.request.mapper.AbstractBookmarkableMapper.mapRequest(AbstractBookmarkableMapper.java:292)
     at 
org.apache.wicket.request.mapper.CompoundRequestMapper.mapRequest(CompoundRequestMapper.java:152)
     at 
org.apache.wicket.request.cycle.RequestCycle.resolveRequestHandler(RequestCycle.java:190)
     at 
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:215)
     at 
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:289)
     at 
org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259)
     at 
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201)
     at 
org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:137)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
     at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
     at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
     at 
org.apache.catalina.filters.ExpiresFilter.doFilter(ExpiresFilter.java:1179)
     at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
     at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
     at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
     at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
     at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
     at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
     at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
     at 
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:947)
     at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
     at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
     at 
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1009)
     at 
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
     at 
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
     at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
     at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
     at java.lang.Thread.run(Thread.java:744)

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


Re: Changed JSESSIONID Results in Wicket Exception

Posted by Martin Grigorov <mg...@apache.org>.
https://issues.apache.org/jira/browse/WICKET-5500

Martin Grigorov
Wicket Training and Consulting


On Wed, Feb 5, 2014 at 11:50 PM, Aaron J. Garcia <ag...@rentec.com> wrote:

> Martin Grigorov <mgrigorov <at> apache.org> writes:
>
>
> > Hi,
> >
> > I will test this tomorrow.
> >
> > Martin Grigorov
> > Wicket Training and Consulting
>
> Thanks Martin,
>
> FWIW, I was setting this when running Tomcat:
>
> -Dwicket.jsessionid.name=JSESSIONID_MYAPP
>
> It didn't work with the -D option, so I added it to my class that extends
> WebApplication, like so:
>
> System.setProperty("wicket.jsessionid.name", "JSESSIONID_MYAPP");
>
> and that didn't work either.
>
> I'm happy to help pinpoint the issue however I can.  Please let me know.
>
> -- Aaron
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Changed JSESSIONID Results in Wicket Exception

Posted by "Aaron J. Garcia" <ag...@rentec.com>.
Martin Grigorov <mgrigorov <at> apache.org> writes:


> Hi,
> 
> I will test this tomorrow.
> 
> Martin Grigorov
> Wicket Training and Consulting

Thanks Martin,

FWIW, I was setting this when running Tomcat:

-Dwicket.jsessionid.name=JSESSIONID_MYAPP

It didn't work with the -D option, so I added it to my class that extends
WebApplication, like so:

System.setProperty("wicket.jsessionid.name", "JSESSIONID_MYAPP");

and that didn't work either.

I'm happy to help pinpoint the issue however I can.  Please let me know.

-- Aaron


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


Re: Changed JSESSIONID Results in Wicket Exception

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

I will test this tomorrow.

Martin Grigorov
Wicket Training and Consulting


On Wed, Feb 5, 2014 at 11:09 PM, Francois Meillet <
francois.meillet@gmail.com> wrote:

> Use a system property :
> System.setProperty("wicket.jsessionid.name", "JSESSIONID_MYAPP");
>
>
> François Meillet
> Formation Wicket - Développement Wicket
>
>
>
>
>
> Le 5 févr. 2014 à 22:05, Aaron J. Garcia <ag...@rentec.com> a écrit :
>
> > Timo Schmidt <wicket <at> xomit.de> writes:
> >
> >>
> >> On Wed 05.02.2014 13:12, Aaron J. Garcia wrote:
> >>> Hi Everyone,
> >>>
> >>> I maintain a Wicket application running on Tomcat 7.0.39, and I
> recently
> >>> altered $TOMCAT_HOME/conf/context.xml to include a sessionCookieName
> >>> parameter.  I made a change like this:
> >>>
> >>> <Context sessionCookieName="JSESSIONID_MYAPP">
> >>>
> >>> This properly changes the session cookie that is used by Wicket to
> >>> JESSIONID_MYAPP instead of JSESSIONID.  However, when I start up my
> Wicket
> >>> app, I get the following error spit out to the logs in Development
> mode,
> >>> when running in Intellij.  Any idea why?
> >>>
> >>> When I was using the normal JSESSIONID, it was properly ignoring it
> when it
> >>> was appended to the classname for the SignInPage.
> >>
> >> See https://issues.apache.org/jira/browse/WICKET-4873
> >>
> >> as of Wicket 6.4.0 you may use a different session id name. Set
> >> a system property »wicket.jsessionid.name« to the desired
> >> value.
> >>
> >>  -Timo
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe <at> wicket.apache.org
> >> For additional commands, e-mail: users-help <at> wicket.apache.org
> >>
> >>
> >
> > This doesn't work for me.  Looking at the source for WicketObjects.java
> > (where the error is coming from), it seems like the className passed
> into it
> > should be passed through Strings.stripJSessionId() before it is
> attempted to
> > be resolved.
> >
> > Should I open a JIRA issue for this change?
> >
> > -- Aaron
> >
> > WARN  - WicketObjects              - Could not resolve class
> > [org.mine.SignInPage;JSESSIONID_MYAPP=AFAB91436EA86A0DF57057C56DEBEEB4]
> > java.lang.ClassNotFoundException:
> > org/mine/SignInPage;JSESSIONID_MYAPP=AFAB91436EA86A0DF57057C56DEBEEB4
> >       at java.lang.Class.forName0(Native Method)
> >       at java.lang.Class.forName(Class.java:340)
> >       at org.apache.wicket.application.AbstractClassResolver
> >              .resolveClass(AbstractClassResolver.java:108)
> >       at org.apache.wicket.core.util.lang.WicketObjects
> >              .resolveClass(WicketObjects.java:72)
> >
> > ... snip ...
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
>
>

Re: Changed JSESSIONID Results in Wicket Exception

Posted by Francois Meillet <fr...@gmail.com>.
Use a system property :
System.setProperty("wicket.jsessionid.name", "JSESSIONID_MYAPP");


François Meillet
Formation Wicket - Développement Wicket





Le 5 févr. 2014 à 22:05, Aaron J. Garcia <ag...@rentec.com> a écrit :

> Timo Schmidt <wicket <at> xomit.de> writes:
> 
>> 
>> On Wed 05.02.2014 13:12, Aaron J. Garcia wrote:
>>> Hi Everyone,
>>> 
>>> I maintain a Wicket application running on Tomcat 7.0.39, and I recently
>>> altered $TOMCAT_HOME/conf/context.xml to include a sessionCookieName
>>> parameter.  I made a change like this:
>>> 
>>> <Context sessionCookieName="JSESSIONID_MYAPP">
>>> 
>>> This properly changes the session cookie that is used by Wicket to
>>> JESSIONID_MYAPP instead of JSESSIONID.  However, when I start up my Wicket
>>> app, I get the following error spit out to the logs in Development mode,
>>> when running in Intellij.  Any idea why?
>>> 
>>> When I was using the normal JSESSIONID, it was properly ignoring it when it
>>> was appended to the classname for the SignInPage.
>> 
>> See https://issues.apache.org/jira/browse/WICKET-4873
>> 
>> as of Wicket 6.4.0 you may use a different session id name. Set
>> a system property »wicket.jsessionid.name« to the desired
>> value.
>> 
>>  -Timo
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe <at> wicket.apache.org
>> For additional commands, e-mail: users-help <at> wicket.apache.org
>> 
>> 
> 
> This doesn't work for me.  Looking at the source for WicketObjects.java
> (where the error is coming from), it seems like the className passed into it
> should be passed through Strings.stripJSessionId() before it is attempted to
> be resolved.
> 
> Should I open a JIRA issue for this change?  
> 
> -- Aaron
> 
> WARN  - WicketObjects              - Could not resolve class
> [org.mine.SignInPage;JSESSIONID_MYAPP=AFAB91436EA86A0DF57057C56DEBEEB4]
> java.lang.ClassNotFoundException:
> org/mine/SignInPage;JSESSIONID_MYAPP=AFAB91436EA86A0DF57057C56DEBEEB4
> 	at java.lang.Class.forName0(Native Method)
> 	at java.lang.Class.forName(Class.java:340)
> 	at org.apache.wicket.application.AbstractClassResolver
>              .resolveClass(AbstractClassResolver.java:108)
> 	at org.apache.wicket.core.util.lang.WicketObjects
>              .resolveClass(WicketObjects.java:72)
> 
> ... snip ...
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 


Re: Changed JSESSIONID Results in Wicket Exception

Posted by "Aaron J. Garcia" <ag...@rentec.com>.
Timo Schmidt <wicket <at> xomit.de> writes:

> 
> On Wed 05.02.2014 13:12, Aaron J. Garcia wrote:
> > Hi Everyone,
> > 
> > I maintain a Wicket application running on Tomcat 7.0.39, and I recently
> > altered $TOMCAT_HOME/conf/context.xml to include a sessionCookieName
> > parameter.  I made a change like this:
> > 
> > <Context sessionCookieName="JSESSIONID_MYAPP">
> > 
> > This properly changes the session cookie that is used by Wicket to
> > JESSIONID_MYAPP instead of JSESSIONID.  However, when I start up my Wicket
> > app, I get the following error spit out to the logs in Development mode,
> > when running in Intellij.  Any idea why?
> > 
> > When I was using the normal JSESSIONID, it was properly ignoring it when it
> > was appended to the classname for the SignInPage.
> 
> See https://issues.apache.org/jira/browse/WICKET-4873
> 
> as of Wicket 6.4.0 you may use a different session id name. Set
> a system property »wicket.jsessionid.name« to the desired
> value.
> 
>   -Timo
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe <at> wicket.apache.org
> For additional commands, e-mail: users-help <at> wicket.apache.org
> 
> 

This doesn't work for me.  Looking at the source for WicketObjects.java
(where the error is coming from), it seems like the className passed into it
should be passed through Strings.stripJSessionId() before it is attempted to
be resolved.

Should I open a JIRA issue for this change?  

-- Aaron

WARN  - WicketObjects              - Could not resolve class
[org.mine.SignInPage;JSESSIONID_MYAPP=AFAB91436EA86A0DF57057C56DEBEEB4]
java.lang.ClassNotFoundException:
org/mine/SignInPage;JSESSIONID_MYAPP=AFAB91436EA86A0DF57057C56DEBEEB4
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:340)
	at org.apache.wicket.application.AbstractClassResolver
              .resolveClass(AbstractClassResolver.java:108)
	at org.apache.wicket.core.util.lang.WicketObjects
              .resolveClass(WicketObjects.java:72)

... snip ...


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


Re: Changed JSESSIONID Results in Wicket Exception

Posted by Timo Schmidt <wi...@xomit.de>.
On Wed 05.02.2014 13:12, Aaron J. Garcia wrote:
> Hi Everyone,
> 
> I maintain a Wicket application running on Tomcat 7.0.39, and I recently
> altered $TOMCAT_HOME/conf/context.xml to include a sessionCookieName
> parameter.  I made a change like this:
> 
> <Context sessionCookieName="JSESSIONID_MYAPP">
> 
> This properly changes the session cookie that is used by Wicket to
> JESSIONID_MYAPP instead of JSESSIONID.  However, when I start up my Wicket
> app, I get the following error spit out to the logs in Development mode,
> when running in Intellij.  Any idea why?
> 
> When I was using the normal JSESSIONID, it was properly ignoring it when it
> was appended to the classname for the SignInPage.

See https://issues.apache.org/jira/browse/WICKET-4873

as of Wicket 6.4.0 you may use a different session id name. Set
a system property »wicket.jsessionid.name« to the desired
value.

  -Timo

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