struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Cockrill" <>
Subject RE: Noddy struts problem: java.lang.NullPointerException: Module 'null' not found
Date Fri, 25 Jan 2008 09:36:45 GMT
Apologies, reading my filestructure back, it looked a bit like
src/com/pdata lived within the ant folder, which it does not. I've tried
to make this a bit clearer below. Apologies for the spam.


	/build.xml  (main build xml that I use to clean the project from
tomcat and copy files over to the webapps directory)


		/lib (bunch of library files, can define these if

			/build.xml (supplied by struts-blank and not


If there's any other useful information I can provide, please let me
know. Thanks for the help so far



-----Original Message-----
From: Alexandru BARBAT [] 
Sent: 24 January 2008 16:25
To: Struts Users Mailing List
Subject: Re: Noddy struts problem: java.lang.NullPointerException:
Module 'null' not found

You don't have to define properties form in struts-config when you use
classic ActionForm.

it will be enough :
<form-bean name="personDataForm" type="com.pdata.PersonData"/>

----- Original Message ----- 
From: "James Cockrill" <>
To: <>
Sent: Thursday, January 24, 2008 6:07 PM
Subject: Noddy struts problem: java.lang.NullPointerException: Module
not found

> Dear All,
> I've been trying to set up a little struts app to play with some
> and whatnot and just as a little exercise and I seem to have rather
> stumped myself. Essentially I'm getting a
> java.lang.NullPointerException: Module 'null' not found. Exception
> I deploy to Tomcat.
> However as far as I've figured out, the problem is to do with my
> config as a little further up the stacktrace there is:
> SEVERE: Servlet /Struts Taster threw load() exception
> javax.servlet.UnavailableException: Parsing error processing resource
> path jndi:/localhost/Struts Taster/WEB-INF/struts-config.xml
> I think I've narrowed it down to a form-bean definition. My
> spring-config for the form-bean is essentially:
>     <form-bean name="personDataForm" type="com.pdata.PersonData">
>     <form-property name="firstname" type="java.lang.String"
> />
>     <form-property name="lastname" type="java.lang.String"
> />
>     <form-property name="address" type="java.lang.String" />
>     <form-property name="telephoneNumber"
> type="java.lang.String" />
>     </form-bean>
> And 'PersonData' is defined as such...
> package com.pdata;
> import org.apache.struts.action.ActionForm;
> public class PersonData extends ActionForm {
> private String firstname = null;
> private String lastname = null;
> private String address = null;
> private String telephoneNumber = null;
> with getters and setters for each field.
> I'm fairly sure it's this formbean definition as when I comment it
> I get through to the default welcome page just fine. Interestingly,
> of my action-mapping entries is:
> <action path="/PersonData" forward="/pages/personData.jsp" />
>     <action path="/Results" type="com.pdata.PersonDataAction"
>             name="personDataForm"
>             scope="request"
>             input="/pages/personData.jsp">
>             <forward name="success" path="/pages/results.jsp" />
>         <forward name="failed" path="/pages/error.jsp" />
>         </action>
> Now, if I change personDataForm's form-bean definition and remove the
> 'com.pdata.' part of it, then the app builds within tomcat and
> however if I hit / in my browser, I get:
> javax.servlet.ServletException: Cannot retrieve definition for form
> bean: "personDataForm" on action: "/Results", which I guess it means
> can't compile the form bean definition as it can't find the bean.
> Commenting out the form-properties has no effect. I'm presuming that
> I've done something (fairly elementary) wrong. Hopefully this'll be
> for someone to diagnose. Please let me know if you require more
> information
> Thanks,
> Jamie
> PS, I based most of what I've done on the tutorial at
> However I have deviated in a few places as it seems to do a few
> things unnecessarily (like manually copying files about willy nilly).
> This message should be regarded as confidential. If you have received
email in error please notify the sender and destroy it immediately.
> Statements of intent shall only become binding when confirmed in hard
by an authorised signatory.  The contents of this email may relate to
dealings with other companies within the Detica Group plc group of
> Detica Limited is registered in England under No: 1337451.
> Registered offices: Surrey Research Park, Guildford, Surrey, GU2 7YP,
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message