Topic: 急!500 No action instance for path XXX could be created原因!

  Print this page

1.急!500 No action instance for path XXX could be created原因! Copy to clipboard
Posted by: onebluesky
Posted on: 2003-05-14 18:28

请问这个错误是什么原因??以前能够正常运行的程序目前出错:
500 No action instance for path /QueryrsAction could be created

2.Re:急!请问此错误原因! [Re: onebluesky] Copy to clipboard
Posted by: floater
Posted on: 2003-05-15 02:12

Any more info for the troubleshooting?

One line doesn't help much.

3.Re:急!请问此错误原因! [Re: onebluesky] Copy to clipboard
Posted by: why
Posted on: 2003-05-15 04:25

1. have you checked your struts-config.xml and web.xml first? (wrong class name or package name, or, though rarely, incorrect servlet-mapping)
2. you may have to show us the two files.

3. 請用一個有意義、能說明問題主旨的標題啦!例如:
Struts問題︰500 No action instance for path /XXX could be created
大俠可以按修改標題的。Smile

4.Re:急!500 No action instance for path XXX could be created原因! [Re: onebluesky] Copy to clipboard
Posted by: onebluesky
Posted on: 2003-05-15 11:32

这个程序以前完全可以正常运行,在此期间我重装过系统,但环境也配了!
不知这个错误和什么有关?struts-config.xml and web.xml 我都检查过!
它还与其他的文件有关吗?
下面是WEB.XML:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>application</param-name>
<param-value>ApplicationResources_ch</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet>
<servlet-name>dbInit</servlet-name>
<servlet-class>test.db.util.DBInitServlet</servlet-class>
<init-param>
<param-name>driverClass</param-name>
<param-value>com.microsoft.jdbc.sqlserver.SQLServerDriver</param-value>
</init-param>
<init-param>
<param-name>jdbcURL</param-name>
<param-value>jdbc:microsoft:sqlserver://blue:1433;databasename=TEST;user=sa ;password=test</param-value>
</init-param>
<init-param>
<param-name>maxCount</param-name>
<param-value>20</param-value>
</init-param>
<init-param>
<param-name>minCount</param-name>
<param-value>1</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>servlet-shtml</servlet-name>
<url-pattern>*.shtml</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.htm</welcome-file>
</welcome-file-list>
<taglib>
<taglib-uri>/bean</taglib-uri>
<taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/html</taglib-uri>
<taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/logic</taglib-uri>
<taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/template</taglib-uri>
<taglib-location>/WEB-INF/struts-template.tld</taglib-location>
</taglib>
</web-app>

QueryrsAction在struts-config.xml 中的配置:
<action path="/QueryAction"
type="test.actions.admenu.QueryAction"
input="/web/login.jsp"
name="AdminBean"
scope="request">
<forward name="first" path="/web/notice.jsp"/>
<forward name="error" path="/web/login.jsp"/>
</action>

5.Re:急!500 No action instance for path XXX could be created原因! [Re: onebluesky] Copy to clipboard
Posted by: onebluesky
Posted on: 2003-05-15 13:48

谢谢各位我已经排除了错误!
原因在环境配置中多了一项:E:\javalib\struts.jar;
只是我不明白原因!
还请各位指教!!

6.Re:急!500 No action instance for path XXX could be created原因! [Re: onebluesky] Copy to clipboard
Posted by: why
Posted on: 2003-05-15 20:03

"No action instance for path /XXX could be created" accompanies almost every error message.
That's why we asked for more information for troubleshooting -- the complete error message is one of them.

I have no idea why the addition of struts.jar to your CLASSPATH would cause the problem, I added struts.jar to my CLASSPATH and it didn't do any harm.Smile

7.Re:急!500 No action instance for path XXX could be created原因! [Re: onebluesky] Copy to clipboard
Posted by: floater
Posted on: 2003-05-15 22:24

check the versions/timestamps of this jar.

check the classpath, I bet somehow this jar precede the jar you have somewhere else.

8.Re:急!500 No action instance for path XXX could be created原因! [Re: onebluesky] Copy to clipboard
Posted by: onebluesky
Posted on: 2003-05-16 12:11

why, thanks!
floater, thanks!
我的确找到了一个低版本的struts.jar。
这是为什么呢???

9.Re:急!500 No action instance for path XXX could be created原因! [Re: onebluesky] Copy to clipboard
Posted by: haibo
Posted on: 2003-05-16 15:25

onebluesky wrote:
请问这个错误是什么原因??以前能够正常运行的程序目前出错:
500 No action instance for path /QueryrsAction could be created


1.it was not the incrrect classpath or error package location , for it didn't throw ClassNotFoundException.
2.it was not the wrong config of web.xml(Servelet mapping),for it is not
the "404 ,page not found " error.

3.it is the "Actionmapping config " error in the Struts-config.xml file.

Check it carefully .SleepySleepySleepy

10.Re:急!500 No action instance for path XXX could be created原因! [Re: haibo] Copy to clipboard
Posted by: onebluesky
Posted on: 2003-05-16 16:57

haibo,thank you , but i am sorry !
the reason what you said didn't adapt to my situation !
Sad
i don't understand!

11.Re:急!500 No action instance for path XXX could be created原因! [Re: onebluesky] Copy to clipboard
Posted by: haibo
Posted on: 2003-05-16 18:12

then

Could you please lay out the "wrong page" ??

i mean the exception stack tracing ,,,,,,,

12.Re:急!500 No action instance for path XXX could be created原因! [Re: onebluesky] Copy to clipboard
Posted by: why
Posted on: 2003-05-16 20:46

> 1.it was not the incorrect classpath or error package location
It could be the case that it's pointing to an incorrect version of a class or package, then no ClassNotFoundException would be thrown.

In onebluesky's case, it seems to be struts.jar (et al.), and in other cases, it could be the developer's own package.
Of course, this's an ActionMapping error at the same time. And that's why I wrote: "No action instance for path /XXX could be created" accompanies almost every error. (the word "message" is bogus.)

> 3.it is the "Actionmapping config " error in the Struts-config.xml file
I believe one would've checked the ActionMapping configurations carefully before s/he posts a question, don't you think so?Smile

13.Re:急!500 No action instance for path XXX could be created原因! [Re: onebluesky] Copy to clipboard
Posted by: floater
Posted on: 2003-05-16 22:45

That's why I hate those xml based action mappings.

1. If you have 50 applications, each app has 50 actions in average, then you end up with 2500 action mappings. If you put all of them in one file(1.0 case, 1.1 is better), how to spot errors???

2. If you crack one spot in the xml file, the whole thing simply blows off the roof, like that space shuttle.

3. If I am using jsp, why in the world do I have to bring a xml parser to read this?

I guess those Struts folks are not experienced enough, just hit a jackpot. They didn't think how users are going to use that framework.

xml is good, but not as good as simple properties file in this case, solid, simple, not so easy to break others' irrelevant code.

Well, just a little bit off track, but hope it's useful to see the limitation of struts.

As for the lower version struts lib, don't ask me why it's there, *you* put it there, Tongue, hehe... kidding. It happens. I did that many times.

14.Re:急!500 No action instance for path XXX could be created原因! [Re: onebluesky] Copy to clipboard
Posted by: onebluesky
Posted on: 2003-05-18 00:22

Thank you very much !
my "Actionmapping config " is very long !
i am not experienced enough really ! Blush
i'll work hard !


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923