STRUTS 2.2.1 Error, can not start

Source: Internet
Author: User
Tags addchild

Severity: Dispatcher initialization failed
Java.lang.RuntimeException:java.lang.reflect.InvocationTargetException
At Com.opensymphony.xwork2.inject.containerimpl$methodinjector.inject (containerimpl.java:295)
At Com.opensymphony.xwork2.inject.containerimpl$constructorinjector.construct (containerimpl.java:431)
At Com.opensymphony.xwork2.inject.containerbuilder$5.create (containerbuilder.java:207)
At Com.opensymphony.xwork2.inject.scope$2$1.create (scope.java:51)
At Com.opensymphony.xwork2.inject.containerbuilder$3.create (containerbuilder.java:93)
At Com.opensymphony.xwork2.inject.containerbuilder$7.call (containerbuilder.java:487)
At Com.opensymphony.xwork2.inject.containerbuilder$7.call (containerbuilder.java:484)
At Com.opensymphony.xwork2.inject.ContainerImpl.callInContext (containerimpl.java:574)
At Com.opensymphony.xwork2.inject.ContainerBuilder.create (containerbuilder.java:484)
At Com.opensymphony.xwork2.config.impl.DefaultConfiguration.createBootstrapContainer (Defaultconfiguration.java : 252)
At Com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer (defaultconfiguration.java:193)
At Com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration (configurationmanager.java:66)
At Org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration (dispatcher.java:371)
At Org.apache.struts2.dispatcher.Dispatcher.init (dispatcher.java:415)
At Org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher (initoperations.java:69)
At Org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init ( STRUTSPREPAREANDEXECUTEFILTER.JAVA:51)
At Org.apache.catalina.core.ApplicationFilterConfig.getFilter (applicationfilterconfig.java:275)
At Org.apache.catalina.core.ApplicationFilterConfig.setFilterDef (applicationfilterconfig.java:397)
At Org.apache.catalina.core.applicationfilterconfig.<init> (applicationfilterconfig.java:108)
At Org.apache.catalina.core.StandardContext.filterStart (standardcontext.java:3693)
At Org.apache.catalina.core.StandardContext.start (standardcontext.java:4340)
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.deployDirectory (hostconfig.java:920)
At Org.apache.catalina.startup.HostConfig.deployDirectories (hostconfig.java:883)
At Org.apache.catalina.startup.HostConfig.deployApps (hostconfig.java:492)
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)
caused by:java.lang.reflect.InvocationTargetException
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 Com.opensymphony.xwork2.inject.containerimpl$methodinjector.inject (containerimpl.java:293)
... More
caused By:java.lang.ExceptionInInitializerError
At Com.opensymphony.xwork2.ognl.OgnlValueStackFactory.setContainer (ognlvaluestackfactory.java:85)
... More
caused By:java.lang.IllegalArgumentException:Javassist library is missing in classpath! Please add missed dependency!
At OGNL. Ognlruntime.<clinit> (ognlruntime.java:165)
... More
Caused by:java.lang.ClassNotFoundException:javassist. Classpool
At Org.apache.catalina.loader.WebappClassLoader.loadClass (webappclassloader.java:1358)
At Org.apache.catalina.loader.WebappClassLoader.loadClass (webappclassloader.java:1204)
At Java.lang.ClassLoader.loadClassInternal (classloader.java:320)
At JAVA.LANG.CLASS.FORNAME0 (Native Method)
At Java.lang.Class.forName (class.java:169)
At OGNL. Ognlruntime.<clinit> (ognlruntime.java:162)
... More
2010-12-9 17:23:07 Org.apache.catalina.core.StandardContext Filterstart
Severity: Exception Starting filter Struts2
Java.lang.reflect.invocationtargetexception-class:com.opensymphony.xwork2.inject.containerimpl$methodinjector
File:ContainerImpl.java
Method:inject
Line:295-com/opensymphony/xwork2/inject/containerimpl.java:295:-1
At Org.apache.struts2.dispatcher.Dispatcher.init (dispatcher.java:428)
At Org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher (initoperations.java:69)
At Org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init ( STRUTSPREPAREANDEXECUTEFILTER.JAVA:51)
At Org.apache.catalina.core.ApplicationFilterConfig.getFilter (applicationfilterconfig.java:275)
At Org.apache.catalina.core.ApplicationFilterConfig.setFilterDef (applicationfilterconfig.java:397)
At Org.apache.catalina.core.applicationfilterconfig.<init> (applicationfilterconfig.java:108)
At Org.apache.catalina.core.StandardContext.filterStart (standardcontext.java:3693)
At Org.apache.catalina.core.StandardContext.start (standardcontext.java:4340)
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.deployDirectory (hostconfig.java:920)
At Org.apache.catalina.startup.HostConfig.deployDirectories (hostconfig.java:883)
At Org.apache.catalina.startup.HostConfig.deployApps (hostconfig.java:492)
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)
caused by:java.lang.RuntimeException:java.lang.reflect.InvocationTargetException
At Com.opensymphony.xwork2.inject.containerimpl$methodinjector.inject (containerimpl.java:295)
At Com.opensymphony.xwork2.inject.containerimpl$constructorinjector.construct (containerimpl.java:431)
At Com.opensymphony.xwork2.inject.containerbuilder$5.create (containerbuilder.java:207)
At Com.opensymphony.xwork2.inject.scope$2$1.create (scope.java:51)
At Com.opensymphony.xwork2.inject.containerbuilder$3.create (containerbuilder.java:93)
At Com.opensymphony.xwork2.inject.containerbuilder$7.call (containerbuilder.java:487)
At Com.opensymphony.xwork2.inject.containerbuilder$7.call (containerbuilder.java:484)
At Com.opensymphony.xwork2.inject.ContainerImpl.callInContext (containerimpl.java:574)
At Com.opensymphony.xwork2.inject.ContainerBuilder.create (containerbuilder.java:484)
At Com.opensymphony.xwork2.config.impl.DefaultConfiguration.createBootstrapContainer (Defaultconfiguration.java : 252)
At Com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer (defaultconfiguration.java:193)
At Com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration (configurationmanager.java:66)
At Org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration (dispatcher.java:371)
At Org.apache.struts2.dispatcher.Dispatcher.init (dispatcher.java:415)
... More
caused by:java.lang.reflect.InvocationTargetException
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 Com.opensymphony.xwork2.inject.containerimpl$methodinjector.inject (containerimpl.java:293)
... More
caused By:java.lang.ExceptionInInitializerError
At Com.opensymphony.xwork2.ognl.OgnlValueStackFactory.setContainer (ognlvaluestackfactory.java:85)
... More
caused By:java.lang.IllegalArgumentException:Javassist library is missing in classpath! Please add missed dependency!
At OGNL. Ognlruntime.<clinit> (ognlruntime.java:165)
... More
Caused by:java.lang.ClassNotFoundException:javassist. Classpool
At Org.apache.catalina.loader.WebappClassLoader.loadClass (webappclassloader.java:1358)
At Org.apache.catalina.loader.WebappClassLoader.loadClass (webappclassloader.java:1204)
At Java.lang.ClassLoader.loadClassInternal (classloader.java:320)
At JAVA.LANG.CLASS.FORNAME0 (Native Method)
At Java.lang.Class.forName (class.java:169)
At OGNL. Ognlruntime.<clinit> (ognlruntime.java:162)
... More

When using struts-2.2.1, it is necessary to introduce Javassist-3.7.ga.jar, which is not in struts-2.2.1/lib, and needs to be struts-2.2.1/apps/ Struts2-blank-2.2.1.war under the Lib in search.

This concludes with a bit of experience: each version needs a package that may be different, so the quickest way is to download struts-2.2.1-all.zip, the simplest struts2-blank in the application instance is the most basic package. For example, the 2.1.x version needs to be commons-logging-1.0.4.jar,2.2.1.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.