File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Does anyone know what this error means? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Does anyone know what this error means?" Watch "Does anyone know what this error means?" New topic
Author

Does anyone know what this error means?

Dave Alvarado
Ranch Hand

Joined: Jul 02, 2008
Posts: 436
Hi,

In my Struts 1 application on Weblogic 9.2.2, I'm getting this 500 Internal Server Error ...

java.lang.NullPointerException
at org.apache.struts.tiles.definition.ComponentDefinitionsFactoryWrapper.getDefinition(ComponentDefinitionsFactoryWrapper.java:84)
at org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(TilesRequestProcessor.java:152)
at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:302)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:229)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3231)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2002)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1908)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1362)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)


This also appears in the server log without any additional info. Does this mean anything to you or do you have any advice on how I can start to troubleshoot this?

Thanks, - Dave
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

W/o any further info the first thing I'd check is that the definition you think is defined is actually defined, then that entities referred to in the definition are also defined. Tiles is notorious for providing just slightly less information than might be considered helpful. Turning up logging *may* help, but not necessarily.
Dave Alvarado
Ranch Hand

Joined: Jul 02, 2008
Posts: 436
I thought I had solved this but this error is returning. So my follow up questions are, what definitions are you talking about? Also, is there a way to turn tiles off. I don't know what it is and the JSP page I'm trying to serve doesn't use any Struts specific stuff at all.

Thanks, - Dave
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

...

Are there any other applications deployed on the server? *Something* is using Tiles.
Dave Alvarado
Ranch Hand

Joined: Jul 02, 2008
Posts: 436
There are two WAR files deployed within the same WebLogic cluster. I assumed one would not interfere with the other. Here's the code of the JSP page that is supposed to be rendered but never does (not even the log files are rendered) ...


<%@ page import="java.util.*" %>
<%@ page import="org.apache.commons.lang.StringEscapeUtils" %>
<%@ page import="org.apache.log4j.Logger" %>
<%@ page import="com.myco.regui.utils.RoutingEnginePropertiesMgr" %>
<%
Logger logger;
final RoutingEnginePropertiesMgr rePropMgr = RoutingEnginePropertiesMgr.getInstance();
if (rePropMgr != null) {
final String loggerName = rePropMgr.getLogger();
logger = Logger.getLogger(loggerName);
logger.debug("On redirect page with action=" + request.getAttribute("redirect"));
} // if
%>
<html>
<head>
<title>Redirect</title>
</head>
<body onload="document.forms[0].submit();">
<form name="RedirectForm" method="post" action="<%= request.getAttribute("redirect") %>">
<%
Enumeration<String> e = request.getParameterNames();
while (e.hasMoreElements()) {
String paramName = e.nextElement();
String paramValue = request.getParameter(paramName);
out.println("\t<input type=\"hidden\" id=\"" + paramName + "\" name=\"" + paramName + "\" value=\"" + StringEscapeUtils.escapeHtml(paramValue) + "\" />\n");
} // while
%>
</form>
</body>
</html>
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Ewewewew. Not even sure code tags would make that bearable.

Don't know what we're supposed to do with that code. In any case, *something* is using Tiles, and that's why you're getting Tiles messages. IIRC at least older versions of WL may have used Struts for their admin console (I could be completely mis-remembering that) which might be another thing to consider.

If the error messages are coming when you're making requests to *your* application then like it or not your application may be using tiles.
Dave Alvarado
Ranch Hand

Joined: Jul 02, 2008
Posts: 436
I believe you that I'm using Tiles somewhere but do you have any ideas on how I can figure out where, since I don't even know what Tiles is?

Not a single line of that stack trace refers to code I've written, hence my confusion.

- Dave
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Then it's in another application, either internal to WL or something else deployed.

The easiest thing to check first is to tool around in the admin screens and see if it shows up. You can also check the WL libs to see if S1/Tiles are anywhere (or inside WL jars) to see if WL is using it for anything.
Dave Alvarado
Ranch Hand

Joined: Jul 02, 2008
Posts: 436
Ok, I will check around the WL libs. What classes/JAR files am I looking for? - Dave
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Things related to Struts and Tiles.
Dave Alvarado
Ranch Hand

Joined: Jul 02, 2008
Posts: 436
I discovered the reason why why requests were being routed through the TilesProcessor class. I had this line in my struts-config.xml file

<controller processorClass="org.apache.struts.tiles.TilesRequestProcessor"/>

I removed it. Problem solved? We'll see. -
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

It might, but I'm a little skeptical at first glance--it seems like it's actually processing a definition, and if there weren't any tiles at all it doesn't seem like there'd be a need to.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Does anyone know what this error means?