wood burning stoves
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

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
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"/>

in applicationResorces.properties:
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 (ValidatorResources.java:464)
at org.apache.commons.validator.ValidatorResources.process(ValidatorResources.java:415)
at org.apache.commons.validator.ValidatorResources.<init>(ValidatorResources.java:162)

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: http://aspose.com/file-tools
subject: validation.xml NullPointerException
It's not a secret anymore!