wood burning stoves 2.0*
The moose likes Struts and the fly likes Unable to initialize Struts ActionServlet due to an unexpected exception or error thrown Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Unable to initialize Struts ActionServlet due to an unexpected exception or error thrown" Watch "Unable to initialize Struts ActionServlet due to an unexpected exception or error thrown" New topic
Author

Unable to initialize Struts ActionServlet due to an unexpected exception or error thrown

Gayan Herath
Greenhorn

Joined: Dec 09, 2009
Posts: 7
My Struts application give following error when it is deploying.
I tried it with another server and it works.
All the libraries used are same as other server.

org.apache.struts.action.ActionServlet ( 364) Unable to initialize Struts ActionServlet due to an unexpected exception or error thrown, so marking the servlet as unavailable. Most likely, this is due to an incorrect or missing library dependency.
java.lang.NoSuchMethodError: org.springframework.beans.factory.config.ConfigurableListableBeanFactory.registerScope(Ljava/lang/String;Lorg/springframework/beans/factory/config/Scope;)V
at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.postProcessBeanFactory(AbstractRefreshableWebApplicationContext.java:161)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:284)
at org.springframework.web.struts.ContextLoaderPlugIn.createWebApplicationContext(ContextLoaderPlugIn.java:353)
at org.springframework.web.struts.ContextLoaderPlugIn.initWebApplicationContext(ContextLoaderPlugIn.java:296)
at org.springframework.web.struts.ContextLoaderPlugIn.init(ContextLoaderPlugIn.java:225)
at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:869)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:336)
at javax.servlet.GenericServlet.init(GenericServlet.java:212)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4042)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4348)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:714)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
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:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)


Can any one help me. I can't switch to another server I want to do it this server itself.

David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

*Something* must be different about them. Have you confirmed that the versions of the libraries in the jars are the same?
Gayan Herath
Greenhorn

Joined: Dec 09, 2009
Posts: 7
David Newton wrote:*Something* must be different about them. Have you confirmed that the versions of the libraries in the jars are the same?



Yes, I added all the jars of working server. but Still the problem is same.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Can't think of anything else off the top of my head--it's pretty clear that there's a missing or incorrect dependency, but without the machine(s) in front of me it's hard to verify.
Gayan Herath
Greenhorn

Joined: Dec 09, 2009
Posts: 7
David Newton wrote:Can't think of anything else off the top of my head--it's pretty clear that there's a missing or incorrect dependency, but without the machine(s) in front of me it's hard to verify.


Never mind David. I'll try more resolve this. thanks for your co-oparation.
 
Consider Paul's rocket mass heater.
 
subject: Unable to initialize Struts ActionServlet due to an unexpected exception or error thrown