File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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(
at org.apache.struts.taglib.TagUtils.getModuleConfig(
at org.apache.struts.taglib.logic.ForwardTag.doEndTag(
at org.apache.jsp.index_jsp._jspx_meth_logic_005fforward_005f0(
at org.apache.jsp.index_jsp._jspService(
at org.apache.jasper.runtime.HttpJspBase.service(
at javax.servlet.http.HttpServlet.service(
at org.apache.jasper.servlet.JspServletWrapper.service(
at org.apache.jasper.servlet.JspServlet.serviceJspFile(
at org.apache.jasper.servlet.JspServlet.service(
at javax.servlet.http.HttpServlet.service(
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
at org.apache.catalina.core.StandardWrapperValve.invoke(
at org.apache.catalina.core.StandardContextValve.invoke(
at org.apache.catalina.core.StandardHostValve.invoke(
at org.apache.catalina.valves.ErrorReportValve.invoke(
at org.apache.catalina.core.StandardEngineValve.invoke(
at org.apache.catalina.connector.CoyoteAdapter.service(
at org.apache.coyote.http11.Http11Processor.process(
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(
at org.apache.tomcat.util.threads.ThreadPool$
at 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="" 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.
I agree. Here's the link:
subject: NullPointerException: Module 'null' not found.
It's not a secret anymore!