My Oracle Support Banner

NullPointerException When Using Struts Action Errors in a UIX page (Doc ID 329368.1)

Last updated on FEBRUARY 07, 2020

Applies to:

Oracle JDeveloper - Version 10.1.2.0.0 and later
Information in this document applies to any platform.

Symptoms

You are trying to display Struts Action Errors in a UIX page.

You have added a namespace to the page element:

<page xmlns="http://xmlns.oracle.com/uix/controller"
      (...)
      xmlns:struts="http://xmlns.oracle.com/uix/struts"
      (...)>

and a <messageBox automatic="true"/> tag within <struts:dataScope>:

<struts:dataScope xmlns="http://xmlns.oracle.com/uix/ui"
                  xmlns:data="http://xmlns.oracle.com/uix/ui">
  <contents>
    <messageBox automatic="true"/>
  </contents>
</struts:dataScope>


Your UIX page and application compile without error, and the runtime seems to be OK, until a Struts Action Error should be displayed in the UIX messageBox.
Then, instead of seeing the error message, you get a NullPointerException:

java.lang.NullPointerException
	at oracle.cabo.servlet.struts.ui.MessageDataProvider._addMessages(Unknown Source)
	at oracle.cabo.servlet.struts.ui.MessageDataProvider.getDataObject(Unknown Source)
	at oracle.cabo.ui.data.provider.TableDataProvider.getDataObject(Unknown Source)
	at oracle.cabo.ui.data.provider.CachingDataProvider.getDataObject(Unknown Source)
	at oracle.cabo.ui.data.provider.DataProviderStack.getDataObject(Unknown Source)
	at oracle.cabo.ui.LogicalNodeRenderingContext.getDataObject(Unknown Source)
	at oracle.cabo.ui.RootRenderingContext.getDataObject(Unknown Source)
	at oracle.cabo.ui.LogicalNodeRenderingContext.getDataObject(Unknown Source)
	at oracle.cabo.ui.RootRenderingContext.getDataObject(Unknown Source)
	at oracle.cabo.ui.laf.base.desktop.MessageBoxUtils.sGetMessageData(Unknown Source)
	at oracle.cabo.ui.laf.base.desktop.MessageBoxUtils.sIsRendered(Unknown Source)
	at oracle.cabo.ui.laf.oracle.desktop.MessageBoxRenderer.render(Unknown Source)
	at oracle.cabo.ui.BaseUINode.render(Unknown Source)
	at oracle.cabo.ui.BaseUINode.render(Unknown Source)
	at oracle.cabo.ui.composite.ContextPoppingUINode$ContextPoppingRenderer.render(Unknown Source)
	at oracle.cabo.ui.BaseUINode.render(Unknown Source)
	at oracle.cabo.ui.BaseUINode.render(Unknown Source)
	at oracle.cabo.ui.BaseRenderer.renderChild(Unknown Source)
	at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
	at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
	at oracle.cabo.ui.BaseRenderer.renderContent(Unknown Source)
	at oracle.cabo.ui.BaseRenderer.render(Unknown Source)
	at oracle.cabo.ui.laf.base.xhtml.XhtmlLafRenderer.render(Unknown Source)
	at oracle.cabo.ui.BaseUINode.render(Unknown Source)
	at oracle.cabo.ui.BaseUINode.render(Unknown Source)
	at oracle.cabo.ui.BaseRenderer.renderChild(Unknown Source)
	at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
	at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
	at oracle.cabo.ui.BaseRenderer.renderContent(Unknown Source)
	at oracle.cabo.ui.BaseRenderer.render(Unknown Source)
	at oracle.cabo.ui.laf.base.xhtml.XhtmlLafRenderer.render(Unknown Source)
	at oracle.cabo.ui.BaseUINode.render(Unknown Source)
	at oracle.cabo.ui.BaseUINode.render(Unknown Source)
	at oracle.cabo.ui.BaseRenderer.renderChild(Unknown Source)
	at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
	at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
	at oracle.cabo.ui.BaseRenderer.renderContent(Unknown Source)
	at oracle.cabo.ui.laf.base.xhtml.BorderLayoutRenderer.renderIndexedChildren(Unknown Source)
	at oracle.cabo.ui.laf.base.xhtml.BorderLayoutRenderer.renderContent(Unknown Source)
	at oracle.cabo.ui.BaseRenderer.render(Unknown Source)
	at oracle.cabo.ui.laf.base.xhtml.XhtmlLafRenderer.render(Unknown Source)
	at oracle.cabo.ui.BaseUINode.render(Unknown Source)
	at oracle.cabo.ui.BaseUINode.render(Unknown Source)
	at oracle.cabo.ui.BaseRenderer.renderChild(Unknown Source)
	at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
	at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
	at oracle.cabo.ui.BaseRenderer.renderContent(Unknown Source)
	at oracle.cabo.ui.BaseRenderer.render(Unknown Source)
	at oracle.cabo.ui.laf.base.xhtml.XhtmlLafRenderer.render(Unknown Source)
	at oracle.cabo.ui.BaseUINode.render(Unknown Source)
	at oracle.cabo.ui.BaseUINode.render(Unknown Source)
	at oracle.cabo.ui.composite.UINodeRenderer.renderWithNode(Unknown Source)
	at oracle.cabo.ui.composite.UINodeRenderer.render(Unknown Source)
	at oracle.cabo.ui.laf.oracle.desktop.PageLayoutRenderer.render(Unknown Source)
	at oracle.cabo.ui.BaseUINode.render(Unknown Source)
	at oracle.cabo.ui.BaseUINode.render(Unknown Source)
	at oracle.cabo.ui.BaseRenderer.renderChild(Unknown Source)
	at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
	at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
	at oracle.cabo.ui.BaseRenderer.renderContent(Unknown Source)
	at oracle.cabo.ui.BaseRenderer.render(Unknown Source)
	at oracle.cabo.ui.laf.base.xhtml.XhtmlLafRenderer.render(Unknown Source)
	at oracle.cabo.ui.BaseUINode.render(Unknown Source)
	at oracle.cabo.ui.BaseUINode.render(Unknown Source)
	at oracle.cabo.ui.BaseRenderer.renderChild(Unknown Source)
	at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
	at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
	at oracle.cabo.ui.BaseRenderer.renderContent(Unknown Source)
	at oracle.cabo.ui.laf.base.xhtml.BodyRenderer.renderContent(Unknown Source)
	at oracle.cabo.ui.BaseRenderer.render(Unknown Source)
	at oracle.cabo.ui.BaseUINode.render(Unknown Source)
	at oracle.cabo.ui.BaseUINode.render(Unknown Source)
	at oracle.cabo.ui.BaseRenderer.renderChild(Unknown Source)
	at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
	at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
	at oracle.cabo.ui.BaseRenderer.renderContent(Unknown Source)
	at oracle.cabo.ui.laf.base.xhtml.DocumentRenderer.renderContent(Unknown Source)
	at oracle.cabo.ui.BaseRenderer.render(Unknown Source)
	at oracle.cabo.ui.laf.base.xhtml.DocumentRenderer.render(Unknown Source)
	at oracle.cabo.ui.BaseUINode.render(Unknown Source)
	at oracle.cabo.ui.BaseUINode.render(Unknown Source)
	at oracle.cabo.ui.composite.ContextPoppingUINode$ContextPoppingRenderer.render(Unknown Source)
	at oracle.cabo.ui.BaseUINode.render(Unknown Source)
	at oracle.cabo.ui.BaseUINode.render(Unknown Source)
	at oracle.cabo.ui.BaseRenderer.renderChild(Unknown Source)
	at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
	at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
	at oracle.cabo.ui.BaseRenderer.renderContent(Unknown Source)
	at oracle.cabo.ui.laf.base.DataScopeRenderer.renderContent(Unknown Source)
	at oracle.cabo.ui.BaseRenderer.render(Unknown Source)
	at oracle.cabo.ui.BaseUINode.render(Unknown Source)
	at oracle.cabo.ui.BaseUINode.render(Unknown Source)
	at oracle.cabo.ui.BaseRenderer.renderChild(Unknown Source)
	at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
	at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
	at oracle.cabo.ui.BaseRenderer.renderContent(Unknown Source)
	at oracle.cabo.ui.laf.base.DataScopeRenderer.renderContent(Unknown Source)
	at oracle.cabo.ui.BaseRenderer.render(Unknown Source)
	at oracle.cabo.ui.BaseUINode.render(Unknown Source)
	at oracle.cabo.ui.BaseUINode.render(Unknown Source)
	at oracle.cabo.ui.composite.UINodeRenderer.renderWithNode(Unknown Source)
	at oracle.cabo.ui.composite.UINodeRenderer.render(Unknown Source)
	at oracle.cabo.ui.BaseUINode.render(Unknown Source)
	at oracle.cabo.ui.BaseUINode.render(Unknown Source)
	at oracle.cabo.servlet.ui.UINodePageRenderer.renderPage(Unknown Source)
	at oracle.cabo.servlet.AbstractPageBroker.renderPage(Unknown Source)
	at oracle.cabo.servlet.PageBrokerHandler.handleRequest(Unknown Source)
	at oracle.cabo.servlet.UIXServlet.doGet(Unknown Source)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
	at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
	at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:649)
	at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322)
	at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:220)
	at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)
	at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
	at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1485)
	at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:509)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
	at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
	at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16)
	at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:239)
	at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:645)
	at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322)
	at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
	at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
	at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
	at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
	at java.lang.Thread.run(Thread.java:534)

If you remove the tag <messageBox automatic="true"/> from your UIX page, then the NullPointerException doesn't occur anymore.

Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.