learn java
The moose likes Struts and the fly likes NullPointerException: Module 'null' not found. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "NullPointerException: Module Watch "NullPointerException: Module New topic

NullPointerException: Module 'null' not found.

Kathy Hale

Joined: Jan 24, 2007
Posts: 5
Just wanted to post the solution to this confusing error message. It seems other conditions can cause the same error (missing load-on-startup in web.xml, missing struts-config.xml or having it in the wrong place). But for me, I had all of these things and still got the error. It turned out to be some jars that were missing from WEB-INF/lib.

I'm using Struts 1.3.9 & Tiles. At first I only included these in my war:
* struts-core-1.3.9.jar
* struts-taglib-1.3.9.jar
* struts-tiles-1.3.9.jar
* commons-io-1.1.jar

The error went away when I added some of the other dependencies that came with Struts 1.3.9:
* commons-beanutils-1.7.0jar
* commons-chain-1.1.jar
* commons-digester-1.8.jar

I wonder if something in the code is eating a ClassDefNotFound exception... But at any rate, the message is quite cryptic, although easy to fix.

Here was my full stack trace from my tomcat localhost log:

Jul 21, 2008 2:46:12 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet jsp threw exception
java.lang.NullPointerException: Module 'null' not found.
at org.apache.struts.taglib.TagUtils.getModuleConfig(TagUtils.java:755)
at org.apache.struts.taglib.TagUtils.getModuleConfig(TagUtils.java:735)
at org.apache.struts.taglib.logic.ForwardTag.doEndTag(ForwardTag.java:84)
at org.apache.jsp.index_jsp._jspx_meth_logic_005fforward_005f0(index_jsp.java:80)
at org.apache.jsp.index_jsp._jspService(index_jsp.java:56)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Unknown Source)

I went round and round trying to figure out what was wrong with that JSP. All it had was this:

<%@ page language="java"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<logic:forward name="welcome"/>
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Thanks for your input, Kathy.

I've updated question 12 of our FAQ to include a caution to make sure all the jar files are there.

Consultant, Sima Solutions
Venkatesh Appaswamy

Joined: Dec 09, 2008
Posts: 2
Thanks a lot. I was able to fix the issue, I missed to include
commons-digester-1.8 and commons-io-1.1 in WEB-INF/lib.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: NullPointerException: Module 'null' not found.