This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Struts and the fly likes validation.xml NullPointerException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Frameworks » Struts
Bookmark "validation.xml NullPointerException" Watch "validation.xml NullPointerException" New topic

validation.xml NullPointerException

Whitney Albrecht

Joined: May 09, 2005
Posts: 19
Can anyone help me find my mistake? I have a form with three fields (username, password, and encryptedPassword).

To start off with I am just trying to make sure the userName field is filled in.

In my struts-config.xml:
<form-propery name="userName" type="java.lang.String"/>
<form-propery name="password" type="java.lang.String"/>
<form-propery name="encryptPassword" type="java.lang.String"/>
<plug-in className="org.apache.stuts.validator.ValidatorPlugin">



<form name="authenticate">
<field property="userName" depends="required">
<arg0 key="authenticate.userName"/>

authenticate.userName=User Name
errors.required={0} is required.

When I deploy the project I get the following error:
[ValidatorPlugin] Loading validation rules from '/WEB-INF/validation.xml'
ERROR [ValidatorPlugin] java.lang.NullPointerException
at org.apache.commons.validator.ValidatorResources.internalProcessForms (
at org.apache.commons.validator.ValidatorResources.process(
at org.apache.commons.validator.ValidatorResources.<init>(

I am using struts 1.2.4 and JBoss.

Anyone have any ideas what I am missing or misstyping?

Thanks in advance.
[ July 26, 2005: Message edited by: Whitney Albrecht ]
Cendy Nguvy
Ranch Hand

Joined: May 25, 2005
Posts: 37

In tag form-bean, replace form-propery by form-property.
Whitney Albrecht

Joined: May 09, 2005
Posts: 19

Thanks for seeing what I couldn't.
I agree. Here's the link:
subject: validation.xml NullPointerException
jQuery in Action, 3rd edition