Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » Architecture & Framework  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
flat modethreaded modego to previous topicgo to next topicgo to back
作者 急!500 No action instance for path XXX could be created原因!
onebluesky



发贴: 0
积分: 0
于 2003-05-14 18:28 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
请问这个错误是什么原因??以前能够正常运行的程序目前出错:
500 No action instance for path /QueryrsAction could be created


onebluesky edited on 2003-05-15 11:08

作者 Re:急!请问此错误原因! [Re:onebluesky]
floater

Java Jedi

总版主


发贴: 3233
积分: 421
于 2003-05-15 02:12 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
Any more info for the troubleshooting?

One line doesn't help much.



"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."
- Martin Fowler, Refactoring - Improving the Design of Existing Code
作者 Re:急!请问此错误原因! [Re:onebluesky]
why

問題兒童

总版主


发贴: 4629
积分: 388
于 2003-05-15 04:25 user profilesend a private message to usersend email to whysearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
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



作者 Re:急!500 No action instance for path XXX could be created原因! [Re:onebluesky]
onebluesky



发贴: 0
积分: 0
于 2003-05-15 11:32 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
这个程序以前完全可以正常运行,在此期间我重装过系统,但环境也配了!
不知这个错误和什么有关?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>



作者 Re:急!500 No action instance for path XXX could be created原因! [Re:onebluesky]
onebluesky



发贴: 0
积分: 0
于 2003-05-15 13:48 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
谢谢各位我已经排除了错误!
原因在环境配置中多了一项:E:\javalib\struts.jar;
只是我不明白原因!
还请各位指教!!



作者 Re:急!500 No action instance for path XXX could be created原因! [Re:onebluesky]
why

問題兒童

总版主


发贴: 4629
积分: 388
于 2003-05-15 20:03 user profilesend a private message to usersend email to whysearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
"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



作者 Re:急!500 No action instance for path XXX could be created原因! [Re:onebluesky]
floater

Java Jedi

总版主


发贴: 3233
积分: 421
于 2003-05-15 22:24 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
check the versions/timestamps of this jar.

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



"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."
- Martin Fowler, Refactoring - Improving the Design of Existing Code
作者 Re:急!500 No action instance for path XXX could be created原因! [Re:onebluesky]
onebluesky



发贴: 0
积分: 0
于 2003-05-16 12:11 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
why, thanks!
floater, thanks!
我的确找到了一个低版本的struts.jar。
这是为什么呢???



作者 Re:急!500 No action instance for path XXX could be created原因! [Re:onebluesky]
haibo



CJSDN高级会员


发贴: 322
积分: 71
于 2003-05-16 15:25 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
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



作者 Re:急!500 No action instance for path XXX could be created原因! [Re:haibo]
onebluesky



发贴: 0
积分: 0
于 2003-05-16 16:57 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
haibo,thank you , but i am sorry !
the reason what you said didn't adapt to my situation !
Sad
i don't understand!



作者 Re:急!500 No action instance for path XXX could be created原因! [Re:onebluesky]
haibo



CJSDN高级会员


发贴: 322
积分: 71
于 2003-05-16 18:12 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
then

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

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



作者 Re:急!500 No action instance for path XXX could be created原因! [Re:onebluesky]
why

問題兒童

总版主


发贴: 4629
积分: 388
于 2003-05-16 20:46 user profilesend a private message to usersend email to whysearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
> 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



作者 Re:急!500 No action instance for path XXX could be created原因! [Re:onebluesky]
floater

Java Jedi

总版主


发贴: 3233
积分: 421
于 2003-05-16 22:45 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
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.



"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."
- Martin Fowler, Refactoring - Improving the Design of Existing Code
作者 Re:急!500 No action instance for path XXX could be created原因! [Re:onebluesky]
onebluesky



发贴: 0
积分: 0
于 2003-05-18 00:22 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
Thank you very much !
my "Actionmapping config " is very long !
i am not experienced enough really ! Blush
i'll work hard !




flat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

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