• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Tomcat 8 & ERPersistentSessionStorage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Tomcat 8 & ERPersistentSessionStorage


  • Subject: Tomcat 8 & ERPersistentSessionStorage
  • From: Kevin Hinkson <email@hidden>
  • Date: Thu, 09 Mar 2017 02:16:57 +0000
  • Feedback-id: 1.us-east-1.LF00NED762KFuBsfzrtoqw+Brn/qlF9OYdxWukAhsl8=:AmazonSES

Hi all,

I’m getting a strange error with persistent session storage when deployed on Tomcat 8. I’m going for a website that can scale on ElasticBeanstalk. The setup is Tomcat 8 with Apache connected via ProxyPass with rewrites being done (see below). I tried to implement this a year or two ago but I ran into the same problem as below.

What’s happening is that I will load a page once. After that any second attempt to load a page will result in a null sessionID being passed to ERPersistentSessionStore.restoreSessionWithID. This doesn’t happen with the normal session store. The request cookies appear intact. Sessions are stored in the cookies with a path of “/“; In my configuration pages use ERRest HTML routing with IERXRouteComponent but I’ve also had this issue with normal pages.

er.extensions.ERXSession.useSecureSessionCookies=true
er.extensions.ERXSession.useHttpOnlySessionCookies=true

The above properties can also be set to false and the same error will occur. I also get the same error when accessing via http or https.


Here is the exception I’m getting:

java.lang.IllegalArgumentException: Attempt to insert null object into an  com.webobjects.foundation.NSDictionary.
	at com.webobjects.foundation.NSDictionary.<init>(NSDictionary.java:254)
	at com.webobjects.eoaccess.EOUtilities.objectsMatchingKeyAndValue(EOUtilities.java:189)
	at er.extensions.eof.EOEnterpriseObjectClazz.objectsMatchingKeyAndValue(EOEnterpriseObjectClazz.java:356)
	at er.extensions.eof.EOEnterpriseObjectClazz.objectMatchingKeyAndValue(EOEnterpriseObjectClazz.java:381)
	at er.persistentsessionstorage.ERPersistentSessionStore.restoreSessionWithID(ERPersistentSessionStore.java:37)
	at com.webobjects.appserver.WOSessionStore.checkOutSessionWithID(WOSessionStore.java:182)
	at com.webobjects.appserver.WOApplication.restoreSessionWithID(WOApplication.java:1913)
	at er.extensions.appserver.ERXApplication.restoreSessionWithID(ERXApplication.java:2379)
	at com.webobjects.jspservlet.WOServletContext.session(WOServletContext.java:107)
	at com.webobjects.appserver.WOComponent.session(WOComponent.java:1324)
	at com.appname.components.BaseComponent.session(Unknown Source)
	at com.appname.components.PublicPageComponent.appendToResponse(Unknown Source)
	at com.webobjects.appserver.WOComponent._appendPageToResponse(WOComponent.java:1574)
	at com.webobjects.appserver.WOComponent._generateResponseInContext(WOComponent.java:1543)
	at com.webobjects.appserver.WOComponent.generateResponse(WOComponent.java:1538)
	at com.webobjects.appserver._private.WOActionRequestHandler._handleRequest(WOActionRequestHandler.java:278)
	at com.webobjects.appserver._private.WOActionRequestHandler.handleRequest(WOActionRequestHandler.java:161)
	at com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java:1687)
	at er.extensions.appserver.ERXApplication.dispatchRequestImmediately(ERXApplication.java:2092)
	at er.extensions.appserver.ERXApplication.dispatchRequest(ERXApplication.java:2057)
	at com.appname.Application.dispatchRequest(Unknown Source)
	at com.webobjects.jspservlet._WOApplicationWrapper.servletDispatchRequest(_WOApplicationWrapper.java:131)
	at com.webobjects.jspservlet.WOServletAdaptor._handleRequest(WOServletAdaptor.java:727)
	at com.webobjects.jspservlet.WOServletAdaptor.doGet(WOServletAdaptor.java:709)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
	at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:676)
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:509)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1104)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:745)

Apache Config
   RewriteEngine On

    # visually friendly rewrites
    # no uri or query then enter the app
    RewriteRule ^/$ /WebObjects/AppName.woa/ra/start [PT]

    # anything with the app prefix is meant for WebObjects
    RewriteCond %{REQUEST_URI} ^/app/.*$ [NC]
    RewriteRule ^/app/(.+) /WebObjects/AppName.woa/$1 [NC,PT,QSA]

    # anything else that is not static is meant to be passed to ERRest
    RewriteCond %{REQUEST_URI} !^/app/.*$ [NC]
    RewriteCond %{REQUEST_URI} !^/static/.*$ [NC]
    RewriteCond %{REQUEST_URI} !^/WebObjects/.*$ [NC]
    RewriteRule ^/(.+) /WebObjects/AppName.woa/ra/$1 [NC,PT,QSA]

    <Proxy *>
        Order deny,allow
        Allow from all
    </Proxy>

    ProxyPass / http://localhost:8080/ retry=0
    ProxyPassReverse / http://localhost:8080/
    ProxyPreserveHost on

Rewrite Properties
er.extensions.ERXApplication.replaceApplicationPath.pattern=/WebObjects/AppName.woa
er.extensions.ERXApplication.replaceApplicationPath.replace=/app

Any pointers would be appreciated if anyone has seen this issue before.

Thanks.

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Tomcat 8 & ERPersistentSessionStorage
      • From: Paul Hoadley <email@hidden>
  • Prev by Date: Re: Installing WOLips in Eclipse Neon (4.6.2)
  • Next by Date: Re: Tomcat 8 & ERPersistentSessionStorage
  • Previous by thread: Re: OT screen capture (movie) ???
  • Next by thread: Re: Tomcat 8 & ERPersistentSessionStorage
  • Index(es):
    • Date
    • Thread