• 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
Null Pointer Exception + ERPersistentStorage + WOForm
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Null Pointer Exception + ERPersistentStorage + WOForm


  • Subject: Null Pointer Exception + ERPersistentStorage + WOForm
  • From: Kevin Hinkson <email@hidden>
  • Date: Mon, 30 Mar 2015 10:45:05 -0400

Hi,

I’m having a very weird error that I cannot pin down at all. The setup is an app using ERPersistentSessionStorage deployed on Tomcat 7 (Elastic Beanstalk) behind an SSL enabled load balancer. On one of the pages I get an NPE on page load without fail. By process of elimination I’ve determined that the WOForm embedded in the page is causing the NPE, but I have no idea why. If I remove it, all works well.  I can even leave all the content that was wrapped in the form and the page will load without the form itself being there. Another page has a WOForm in it without any issue. I’ve tried running the page statelessly and statefully.

Entry to the page uses the following apache rewrite:

RewriteCond %{REQUEST_URI} ^/product [NC]
RewriteRule ^/product/([a-z-]+)/([a-z-]+)$ /WebObjects/CCILogisticsService.woa/wa/viewPage?pageName=Product&brandIdentifier=$1&productIdentifier=$2 [PT]

In my Application class my ‘shouldRestoreSessionOnCleanEntry' looks like this:

public boolean shouldRestoreSessionOnCleanEntry(WORequest request)
    {
        Boolean shouldRestore = Boolean.FALSE;
        try
        {
            ERPersistentSessionStore sessionStore = (ERPersistentSessionStore) this.sessionStore();
            Session session = (Session) sessionStore.restoreSessionWithID(request.sessionID(), request);
            if (null != session) { shouldRestore = Boolean.TRUE; }
        }
        catch (Exception exception) { log.error("null values were passed in during check for shouldRestoreSessionOnCleanEntry"); }
        return shouldRestore.booleanValue();
    }

I’m completely stuck on this one. I don’t even know where to look or what is causing the issue. Any help would be appreciated. I’ve pasted in the NPE stack trace below.

SEVERE: Servlet.service() for servlet [WOServletAdaptor] in context with path [] threw exception
com.webobjects.foundation.NSForwardException [java.lang.IllegalArgumentException] Attempt to insert null object into an  com.webobjects.foundation.NSDictionary.:<er.extensions.appserver.ERXDirectActionRequestHandler>: Exception while trying to generate an error response: java.lang.IllegalArgumentException: Attempt to insert null object into an  com.webobjects.foundation.NSDictionary.
	at com.webobjects.appserver._private.WOActionRequestHandler._handleRequest(WOActionRequestHandler.java:320)
	at com.webobjects.appserver._private.WOActionRequestHandler.handleRequest(WOActionRequestHandler.java:161)
	at er.extensions.appserver.ERXDirectActionRequestHandler.handleRequest(ERXDirectActionRequestHandler.java:128)
	at com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java:1687)
	at er.extensions.appserver.ERXApplication.dispatchRequestImmediately(ERXApplication.java:2127)
	at er.extensions.appserver.ERXApplication.dispatchRequest(ERXApplication.java:2092)
	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:620)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
	at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:683)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalArgumentException: Attempt to insert null object into an  com.webobjects.foundation.NSDictionary.
	at com.webobjects.foundation.NSDictionary.<init>(NSDictionary.java:197)
	at com.webobjects.eoaccess.EOUtilities.objectsMatchingKeyAndValue(EOUtilities.java:189)
	at er.extensions.eof.EOEnterpriseObjectClazz.objectsMatchingKeyAndValue(EOEnterpriseObjectClazz.java:350)
	at er.extensions.eof.EOEnterpriseObjectClazz.objectMatchingKeyAndValue(EOEnterpriseObjectClazz.java:375)
	at er.persistentsessionstorage.ERPersistentSessionStore.restoreSessionWithID(ERPersistentSessionStore.java:36)
	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:2421)
	at com.webobjects.jspservlet.WOServletContext.session(WOServletContext.java:107)
	at com.webobjects.appserver.WOComponent.session(WOComponent.java:1324)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at com.webobjects.foundation.NSKeyValueCoding$ValueAccessor$1.methodValue(NSKeyValueCoding.java:636)
	at com.webobjects.foundation.NSKeyValueCoding$_MethodBinding.valueInObject(NSKeyValueCoding.java:1134)
	at com.webobjects.foundation.NSKeyValueCoding$DefaultImplementation.valueForKey(NSKeyValueCoding.java:1324)
	at com.webobjects.appserver.WOComponent.valueForKey(WOComponent.java:1736)
	at com.webobjects.foundation.NSKeyValueCoding$Utility.valueForKey(NSKeyValueCoding.java:447)
	at com.webobjects.foundation.NSKeyValueCodingAdditions$DefaultImplementation.valueForKeyPath(NSKeyValueCodingAdditions.java:216)
	at com.webobjects.appserver.WOComponent.valueForKeyPath(WOComponent.java:1804)
	at com.webobjects.appserver._private.WOKeyValueAssociation.valueInComponent(WOKeyValueAssociation.java:50)
	at com.webobjects.appserver.WOComponent.pullValuesFromParent(WOComponent.java:524)
	at com.webobjects.appserver._private.WOComponentReference._pushComponentInContext(WOComponentReference.java:102)
	at com.webobjects.appserver._private.WOComponentReference.appendToResponse(WOComponentReference.java:134)
	at com.webobjects.appserver._private.WODynamicGroup.appendChildrenToResponse(WODynamicGroup.java:126)
	at com.webobjects.appserver._private.WODynamicGroup.appendToResponse(WODynamicGroup.java:136)
	at com.webobjects.appserver.WOComponent.appendToResponse(WOComponent.java:1122)
	at er.extensions.components.ERXComponent.appendToResponse(ERXComponent.java:195)
	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 co.coralstone.logistics.service.Application.handleException(Application.java:87)
	at com.webobjects.appserver._private.WODirectActionRequestHandler.generateErrorResponse(WODirectActionRequestHandler.java:126)
	at com.webobjects.appserver._private.WOActionRequestHandler._handleRequest(WOActionRequestHandler.java:318)
	... 31 more
 _______________________________________________
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: Null Pointer Exception + ERPersistentStorage + WOForm
      • From: Ramsey Gurley <email@hidden>
  • Prev by Date: Re: Deploying on Amazon EC
  • Next by Date: Re: Help on ponder
  • Previous by thread: Re: Deploying on Amazon EC
  • Next by thread: Re: Null Pointer Exception + ERPersistentStorage + WOForm
  • Index(es):
    • Date
    • Thread