aspose file tools*
The moose likes Struts and the fly likes Struts validation in Version 1.3.5 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts validation in Version 1.3.5" Watch "Struts validation in Version 1.3.5" New topic
Author

Struts validation in Version 1.3.5

Ingoba Ningthoujam
Ranch Hand

Joined: Dec 04, 2006
Posts: 90
I got the error as follows

java.lang.NoSuchMethodError: org.apache.struts.action.ActionErrors.add(Ljava/lang/String;Lorg/apache/struts/action/ActionError V
com.LoginForm.validate(Unknown Source)
org.apache.struts.chain.commands.servlet.ValidateActionForm.validate(ValidateActionForm.java:53)
org.apache.struts.chain.commands.AbstractValidateActionForm.execute(AbstractValidateActionForm.java:100)
org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:48)
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:280)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1858)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:459)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30764
    
156

Ingoba,
Is Struts in your runtime classpath?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
The ActionError class has been removed from Struts 1.3.5, but the ActionErrors class remains. Therefore, when you add an error message to an ActionErrors instance, you must use an instance of ActionMessage rather than ActionError. Example:

See the javadoc for details.


Merrill
Consultant, Sima Solutions
Ingoba Ningthoujam
Ranch Hand

Joined: Dec 04, 2006
Posts: 90
Thank you very much
 
wood burning stoves
 
subject: Struts validation in Version 1.3.5