求救 求救 折磨一晚上了
用Struts2 运行时 一直报错 整了一晚上了 求大神前辈 救命啊
严重: Dispatcher initialization failed
Unable to load configuration. - bean - jar:file:/D:/TomCat/Tomcat%206.0/webapps/SS2SP/WEB-INF/lib/struts2-osgi-plugin-2.3.4.1.jar!/struts-plugin.xml:15:113
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:69)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:390)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:437)
at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)
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:3709)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4363)
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:926)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:889)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
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:578)
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: Unable to load bean: type:org.apache.struts2.osgi.BundleAccessor class:org.apache.struts2.osgi.DefaultBundleAccessor - bean - jar:file:/D:/TomCat/Tomcat%206.0/webapps/SS2SP/WEB-INF/lib/struts2-osgi-plugin-2.3.4.1.jar!/struts-plugin.xml:15:113
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:243)
at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:102)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:210)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66)
... 31 more
Caused by: java.lang.NoClassDefFoundError: org/osgi/framework/InvalidSyntaxException
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
at java.lang.Class.getDeclaredConstructors(Class.java:1836)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:233)
... 34 more
Caused by: java.lang.ClassNotFoundException: org.osgi.framework.InvalidSyntaxException
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
... 38 more
我用的jar包是
commons-logging-api-1.1.jar
freemarker-2.3.19.jar
ognl-3.0.5.jar
struts-core-1.3.10.jar
xwork-core-2.3.4.1.jar
commons-fileupload-1.2.2.jar
commons-io-2.0.1.jar
commons-lang-2.4.jar
commons-lang3-3.1.jar
commons-logging-1.1.1.jar
javassist-3.11.0.GA.jar
struts2-core-2.3.4.1.jar
[解决办法]
spring+ibatis 我的包是
commons-beanutils-1.7.0.jar
commons-collections-3.2.jar
commons-dbcp.jar
commons-fileupload-1.2.1.jar io,lang,log,pool
freemarker2.3.13
ibatis
jsonplugin
log4j
mysql
ognl
spring
struts2-core
struts2-spring-plugin
xwork
[解决办法]
我之前也是这个问题 是包多引了 还有就是 包版本的问题 具体的你再看看 如果不行 联系我 我这边有已经整理好的包的配置 QQ:476726319
[解决办法]
有包重复,我建议建立学习项目,实现最简单的helloworld,SSH一个个应用,并且进行总结存档,对学习更有用处,再者从官网下载
[解决办法]
直接到struts官网,下载源码,里面一个blank.war,最基础的项目,把那里面的包拷过来就可以了。