You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Kr...@tietoenator.com on 2006/01/24 12:59:41 UTC

NullPointer

I am getting this NullPointer Exception : 

 

java.lang.NullPointerException

        at org.apache.struts.validator.Resources.getMessageResources(Resources.java:127)

        at org.apache.struts.validator.Resources.getActionMessage(Resources.java:349)

        at org.apache.struts.validator.FieldChecks.validateMask(FieldChecks.java:241)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:324)

        at org.apache.commons.validator.ValidatorAction.executeValidationMethod(ValidatorAction.java:543)

        at org.apache.commons.validator.Field.validateForRule(Field.java:766)

        at org.apache.commons.validator.Field.validate(Field.java:845)

        at org.apache.commons.validator.Form.validate(Form.java:290)

        at org.apache.commons.validator.Validator.validate(Validator.java:353)

        at com.tietoenator.dk.lub.utility.PropertyValidator.validate(PropertyValidator.java:189)

 

My validation.xml entry lookes like this : 

 

<form name="courseStatusViewActionForm">

  <field property="completedDate" depends="mask">

    <msg name="mask" key="errors.courseStatusViewActionForm.date.maskmsg"/>

    <arg0 key="courseStatusViewActionForm.completedDate"/>

    <var>

      <var-name>mask</var-name>

      <var-value>${date}</var-value>

    </var>

  </field>

</form>

 

I got these in my resourse bundle :

 

errors.courseStatusViewActionForm.date.maskmsg=Gennemført dato er ikke valid.

courseStatusViewActionForm.completedDate=gennemført dato

Med venlig hilsen / Kind regards
Kristian Lind Petersen
Konsulent / Consultant

TietoEnator A/S
Rygaards Alle 131
DK - 2900 Hellerup
Telephone: +45 72 30 60 00
Mobile: +45 25 42 36 56
E-mail: kristian.l.petersen@tietoenator.com <ma...@tietoenator.com> 

 

 


Re: NullPointer

Posted by Niall Pemberton <ni...@gmail.com>.
You would probably have more chance of getting help on this if you
post to the struts user list.

Also it would be useful to know what version of Struts and what
version of Commons Validator you are using.

Niall

On 1/24/06, Kristian.L.Petersen@tietoenator.com
<Kr...@tietoenator.com> wrote:
> I am getting this NullPointer Exception :
>
>
>
> java.lang.NullPointerException
>
>        at org.apache.struts.validator.Resources.getMessageResources(Resources.java:127)

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org