struts问题,在线等!谢谢

05-08-14 mhbjava
在用struts写的程序中,运行出现的异常错误如下:

2005-08-14 20:37:31 StandardContext[/balancer]org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]]

2005-08-14 20:37:38 StandardContext[/jsp-examples]ContextListener: contextInitialized()

2005-08-14 20:37:38 StandardContext[/jsp-examples]SessionListener: contextInitialized()

2005-08-14 20:37:38 StandardContext[/servlets-examples]ContextListener: contextInitialized()

2005-08-14 20:37:38 StandardContext[/servlets-examples]SessionListener: contextInitialized()

2005-08-14 20:37:39 StandardContext[/guestbook]Marking servlet action as unavailable

2005-08-14 20:37:39 StandardContext[/guestbook]Servlet /guestbook threw load() exception

javax.servlet.ServletException: Error instantiating servlet class org.apache.struts.action.ActionServlet

at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:996)

at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:862)

at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4013)

at org.apache.catalina.core.StandardContext.start(StandardContext.java:4357)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)

at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:277)

at org.apache.catalina.core.StandardHost.install(StandardHost.java:832)

at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:701)

at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:432)

at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)

at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)

at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)

at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)

at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)

at org.apache.catalina.core.StandardService.start(StandardService.java:480)

at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)

at org.apache.catalina.startup.Catalina.start(Catalina.java:556)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:585)

at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)

----- Root Cause -----

java.lang.NoClassDefFoundError: org/apache/commons/beanutils/Converter

at java.lang.Class.getDeclaredConstructors0(Native Method)

at java.lang.Class.privateGetDeclaredConstructors(Class.java:2328)

at java.lang.Class.getConstructor0(Class.java:2640)

at java.lang.Class.newInstance0(Class.java:321)

at java.lang.Class.newInstance(Class.java:303)

at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:987)

at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:862)

at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4013)

at org.apache.catalina.core.StandardContext.start(StandardContext.java:4357)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)

at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:277)

at org.apache.catalina.core.StandardHost.install(StandardHost.java:832)

at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:701)

at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:432)

at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)

at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)

at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)

at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)

at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)

at org.apache.catalina.core.StandardService.start(StandardService.java:480)

at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)

at org.apache.catalina.startup.Catalina.start(Catalina.java:556)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:585)

at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)

2005-08-14 20:37:41 ApplicationDispatcher[/guestbook]: Servlet action is currently unavailable

直接运行。JSP文件是可以的,我在网上找了好多遇到这种错误的帖子,但是都没有解决方案,有哪位高手知道可以帮我解答一下,很是感谢!

banq
2005-08-14 21:24
>NoClassDefFoundError: org/apache/commons/beanutils/Converter

没有在容器的classpath导入这个文件所在的包,将这个类在google搜索一下,找到所在包。

mhbjava
2005-08-16 01:02
多谢banq大师!问题已经解决!

wzbwambition
2006-05-16 20:39
我现在也有javax.servlet.ServletException: Error instantiating servlet class org.apache.struts.action.ActionServlet

的问题,你怎么解决的?

猜你喜欢