This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Encounte this error:No action instance for path /logon could be created

 
Hari Peng
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,every one,

My cicrument is Tomcat 5.0 + struts 1.1,this is a simple logon page,I put
LogonAction.class in WEB_INF\classes\netcom\docmanager\transcation

struts_config.xml is:
...
<form-bean name="logonForm" type="netcom.docmanager.formbean.LogonForm"/>
</form-beans>
<action-mappings>
<action path="/logon" name="logonForm" type=" netcom.docmanager.transcation.LogonAction " scope="request" >
<forward name="failure" path="/ logon.jsp"/>
<forward name="success" path="/ mainmenu.jsp"/>
</action>
</action-mappings>
...

when address the url ".../logon.do",following error info is given:

"No action instance for path /logon could be created
java.lang.ClassNotFoundException: netcom.docmanager.transcation.LogonAction"

but I call "java netcom.docmanager.transcation.LogonAction",this class can be found,so this is not the issue about classpath,

Can anybody know what's wrong with it?
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, everything looks fine so it has to be a classpath issue. It's been a while since I really messed with them but I'll give it a shot.

Since it works in java_home but not in tomcat (?catalina_home??), try adding java_home to tomcat's path if it isn't already.

Another thing to doublecheck is if the spellings are lining up. I couldn't help but notice transcation in your post when I believe transaction was intended.

Good luck!
 
Hari Peng
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,Marc
thank you for your help,
you point out that the 'transaction' is my real intention,that's true,It's luck that this wrong spell happen on the begin of this program,so its used
later consistently,it does not result in this error.

and in you post:
===========================================
Since it works in java_home but not in tomcat (?catalina_home??), try adding java_home to tomcat's path if it isn't already.
===========================================

I thought since the directory structure of servlet app
is a standard,the container will know the class is in '/WEB_INF/classes/'
before.

I don't know where to set the classpath of a servlet container,(web.xml,or struts_config.xml)?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic