Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Himanshu Rawat
Ranch Hand
Posts: 141
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
Arulanand Dayalan
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 141
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 146
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 141
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Brent Sterling
Ranch Hand
Posts: 948
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 141
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 141
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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....
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic