wood burning stoves*
The moose likes Struts and the fly likes not able to solve this error!!!!!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "not able to solve this error!!!!!!" Watch "not able to solve this error!!!!!!" New topic
Author

not able to solve this error!!!!!!

Himanshu Rawat
Ranch Hand

Joined: Nov 27, 2005
Posts: 141
Hi,
i m getting this error...


message: No action instance for path /library could be created

description: The server encountered an internal error (No action instance for path /library could be created) that prevented it from fulfilling this request.

i have given action mapping in struts-config.xml file bt still its givin me error...can nybody tell me how to resolve this...


rawat
SCJP 1.4
Arulanand Dayalan
Ranch Hand

Joined: Aug 10, 2005
Posts: 124
Are you submitting a form then, check whether action attribute you provide in ur jsp matches with ur StrutsConfig.xml.

<html:form action="LoadBasicInf" name="BasicInfForm"
type="com.form.BasicInfForm" enctype="multipart/form-data">

This should have a mapping in struts config .xml
<action-mappings>
<action path="/LoadBasicInf" name = "BasicInfForm" type="com.action.LoadRLBasicInfAction" scope="request">

</action>
</action-mappings>

Hope this Helps
Vicky Pandya
Ranch Hand

Joined: Dec 16, 2004
Posts: 148
Post your strus-config mapping piece for this action and action class name (actual name). It's evident that there is something wrong with mapping name (typo), which is not matching with action class name.
Originally posted by Himanshu Rawat:
Hi,
i m getting this error...


message: No action instance for path /library could be created

description: The server encountered an internal error (No action instance for path /library could be created) that prevented it from fulfilling this request.

i have given action mapping in struts-config.xml file bt still its givin me error...can nybody tell me how to resolve this...
Himanshu Rawat
Ranch Hand

Joined: Nov 27, 2005
Posts: 141
this is my struts-config.xml....

<struts-config>
<data-sources />
<form-beans>
<form-bean name="libraryForm" type="com.LogicaUtilitiesWeb.struts.form.LibraryForm" />
</form-beans>
<global-exceptions />
<action
attribute="libraryForm"
input="/jsp/Home/HomePageLeft.jsp"
name="libraryForm"
path="/library"
scope="session"
type="com.LogicaUtilitiesWeb.struts.action.LibraryAction">
<forward name="library" path="/jsp/Library/LibraryMainPage.jsp" />
</action>
</struts-config>


now can nybody tell me wats wrong in it???
Abhishek Asthana
Ranch Hand

Joined: Sep 08, 2004
Posts: 146
Hey Mote,
Try this.
Change your action name from /library to /something/library and make according changes.
Can't give any proper explanation for this. But this may work. Also are you using DispatchAction? If yes send the JSP file also.
Asty
Himanshu Rawat
Ranch Hand

Joined: Nov 27, 2005
Posts: 141
hi asthana,

I am actually working on CVS and its working on 1 system bt nt working on other system. why so?? when code is same!!!.

I am using jsp struts 1.1 (<html:form action="form name" bla blaaa>
so eveyrthing is inside in that form tag. and on cliking it , is going to appropriate ActionForm....

wat u've suggested i tried bt its nt working either....
balakrishna billa
Greenhorn

Joined: Mar 13, 2006
Posts: 13
hi rawat,

I thought that the class is not there in the webapp-classpath...

Can u once check the webapplication classes folder whether that perticular class is there or not...<Context>/WEB-INF/classes or /lib

or
Make sure that the class u compiled is extending the Action Class.


balakrishna
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
If it works on one system but not another I would first try to identify the difference between the two systems. Are you deploying your application as a war file or ear file?

When do you get the error message? Is it when your first page is displayed, or when you click the submit button?

- Brent
Himanshu Rawat
Ranch Hand

Joined: Nov 27, 2005
Posts: 141
hi,
i m deploying it as exploded war file. I am not getting error on first page.
First page is displayed but when i click on some hyperlink(which goes to some action class) then it gives me error.
moreover its givin me error on every link...
Roberston Guillaume
Greenhorn

Joined: Mar 31, 2006
Posts: 3
Just For Information, the last time I have got this error I forgot
to declare the heritage of org.apache.struts.action.Action

<action
path="/infodocExport"
scope="request"
type="struts.util.InfodocExportAction" unknown="false">
<forward name="success" path="/jsp/infodocListeUser.jsp"/>
</action>

1) Check If struts.util.InfodocExportAction class exist and is accessible

2) in struts/util/InfodocExportAction.java

package struts.util;


public class InfodocExportAction extends org.apache.struts.action.Action
{
...
Himanshu Rawat
Ranch Hand

Joined: Nov 27, 2005
Posts: 141
hi frnds,

finally i was able to solve the problem...the problem was of build path.if u r deploying application from eclipse then make sure to check build path.There should be no errors in that. If there is error in ny build path(like missing jar file) then in classes folder eclipse inside workspace ,ecipse will nt creat ny classes and therefore i was getting that error..cos there was no classes inside that folder...nyways stupid mistake i've done...took lot of time....

thnx for all ur suggestions....
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: not able to solve this error!!!!!!
 
Similar Threads
I am getting this error struts application
No action instance could be created
Getting the following Exception
Tomcat 5.5
No action instance for path /initialregister could be created