Hi all.

 

Trying to do this:

 

@RequiredStringValidator(message = "Hello", key = "Hello.key")

public String getQuestion1Option()

{

return question1Option;

}

 

 

But receiving this error on submission of the action:

 

[09 Oct 2007 17:54:46] ERROR
org.apache.catalina.core.ContainerBase.[jboss.web].

[localhost].[/csi].[default]  - Servlet.service() for servlet default
threw exce

ption

java.lang.NullPointerException

        at
com.opensymphony.xwork2.util.LocalizedTextUtil.createMissesKey(Locali

zedTextUtil.java:240)

        at
com.opensymphony.xwork2.util.LocalizedTextUtil.findResourceBundle(Loc

alizedTextUtil.java:219)

        at
com.opensymphony.xwork2.util.LocalizedTextUtil.getMessage(LocalizedTe

xtUtil.java:602)

        at
com.opensymphony.xwork2.util.LocalizedTextUtil.findMessage(LocalizedT

extUtil.java:643)

        at
com.opensymphony.xwork2.util.LocalizedTextUtil.findText(LocalizedText

Util.java:360)

        at
com.opensymphony.xwork2.util.LocalizedTextUtil.findText(LocalizedText

Util.java:293)

        at
com.opensymphony.xwork2.TextProviderSupport.getText(TextProviderSuppo

rt.java:173)

        at
com.opensymphony.xwork2.TextProviderSupport.getText(TextProviderSuppo

rt.java:104)

        at
com.opensymphony.xwork2.ActionSupport.getText(ActionSupport.java:75)

        at
com.opensymphony.xwork2.validator.DelegatingValidatorContext.getText(

DelegatingValidatorContext.java:106)

        at
com.opensymphony.xwork2.validator.validators.ValidatorSupport.getMess

age(ValidatorSupport.java:66)

        at
com.opensymphony.xwork2.validator.validators.ValidatorSupport.addFiel

dError(ValidatorSupport.java:162)

        at
com.opensymphony.xwork2.validator.validators.RequiredStringValidator.

validate(RequiredStringValidator.java:77)

 

etc

 

 

Any idea what's wrong? The key is in my struts-messages.properties and
struts-messages_en.properties

 

Cheers

Reply via email to