• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Exception while running struts2 application.

 
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.
 
Bartender
Posts: 9559
12
Mac OS X Linux 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: 9559
12
Mac OS X Linux 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: 9559
12
Mac OS X Linux 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: 9559
12
Mac OS X Linux 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: 9559
12
Mac OS X Linux 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: 9559
12
Mac OS X Linux 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: 9559
12
Mac OS X Linux 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..
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!