• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Exception while running struts2 application.

 
hemanth acharya
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am building a simple struts application using struts-2.1.6, but i am getting the following exception.



My struts xml is the following...




The following is my lib structure..

antlr-2.7.6.jar
commons-collections-3.1.jar
commons-fileupload-1.2.1.jar
commons-io-1.3.2.jar
commons-logging-1.1.1.jar
dom4j-1.6.1.jar
freemarker-2.3.13.jar
jsonplugin-0.32.jar
ognl-2.6.11.jar
struts2-convention-plugin-2.1.6.jar
struts2-core-2.1.6.jar
xwork-2.1.2.jar

Suggestions appreciated..

Thanks and regards,
Hemanth.
 
Joe Ess
Bartender
Posts: 9312
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
java.lang.NoSuchMethodException: struts2.LoginAction.execute()()


It looks like your struts2.LoginAction class does not have a method named "execute".
 
hemanth acharya
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Joe,

It has a execute method !..
The following is my action class...



Regards,
hemanth.
 
Joe Ess
Bartender
Posts: 9312
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It has a execute method !..


The error is in a class called struts2.LoginAction. You posted the source for a class named struts2.Populating.
 
hemanth acharya
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Joe,

My bad !! I apologize for that.... Here is the Login.action and my struts xml...



Struts.xml

 
Joe Ess
Bartender
Posts: 9312
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If your source contains the method, I suspect that the .class file is an old version that does not. How are you building your web application?
 
hemanth acharya
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
joe,

I am building using tomcat,

Here's my classpath file,



Regards,
hemanth.
 
Joe Ess
Bartender
Posts: 9312
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hemanth acharya wrote:
I am building using tomcat,


Tomcat is a servlet container, not a build tool. I am unfamiliar with this classpath file, but it looks like something from Eclipse.
 
hemanth acharya
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Joe,

yes, I am using eclipse.
 
Joe Ess
Bartender
Posts: 9312
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So are you running Tomcat from Eclipse, or are you packaging the application and deploying it to Tomcat independently?
 
hemanth acharya
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Joe,

The former, running tomcat from eclipse.
 
Joe Ess
Bartender
Posts: 9312
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you try rebuilding your application?
 
hemanth acharya
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Joe,

Yep, i tried everything.. seems stuck there...
 
Joe Ess
Bartender
Posts: 9312
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't use Eclipse to run Tomcat, so I can't help you. Perhaps you can get some help in our IDE Forum if you can describe your problem effectively.
 
hemanth acharya
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Joe,
Ok, thank you..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic