struts2+ibats+spring整合启动tomcat报错

问题描述

严重: Dispatcher initialization failedjava.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetExceptionat com.opensymphony.xwork2.inject.ContainerBuilder$4.create(ContainerBuilder.java:132)at com.opensymphony.xwork2.inject.Scope$2$1.create(Scope.java:51)at com.opensymphony.xwork2.inject.ContainerImpl.getInstance(ContainerImpl.java:507)at com.opensymphony.xwork2.inject.ContainerImpl.getInstance(ContainerImpl.java:517)at com.opensymphony.xwork2.inject.ContainerImpl$9.call(ContainerImpl.java:548)at com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.java:574)at com.opensymphony.xwork2.inject.ContainerImpl.getInstance(ContainerImpl.java:546)at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:197)at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66)at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:380)at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:424)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.initFilter(ApplicationFilterConfig.java:277)at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:258)at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:382)at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:103)at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4650)at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5306)at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)at java.util.concurrent.FutureTask.run(Unknown Source)at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)at java.lang.Thread.run(Unknown Source)Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetExceptionat com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:495)at com.opensymphony.xwork2.inject.ContainerImpl$7.call(ContainerImpl.java:532)at com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.java:581)at com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:530)at com.opensymphony.xwork2.config.impl.LocatableFactory.create(LocatableFactory.java:32)at com.opensymphony.xwork2.inject.ContainerBuilder$4.create(ContainerBuilder.java:130)... 26 moreCaused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetExceptionat com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.construct(ContainerImpl.java:440)at com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:492)... 31 moreCaused by: java.lang.reflect.InvocationTargetExceptionat sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)at java.lang.reflect.Constructor.newInstance(Unknown Source)at com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.construct(ContainerImpl.java:419)... 32 moreCaused by: java.lang.NoClassDefFoundError: org/apache/commons/lang/xwork/StringUtilsat org.apache.struts2.spring.StrutsSpringObjectFactory.<init>(StrutsSpringObjectFactory.java:104)... 37 moreCaused by: java.lang.ClassNotFoundException: org.apache.commons.lang.xwork.StringUtilsat org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)... 38 more2012-11-26 17:32:49 org.apache.catalina.core.StandardContext filterStart严重: Exception starting filter struts2java.lang.RuntimeException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException - Class: com.opensymphony.xwork2.inject.ContainerBuilder$4File: ContainerBuilder.javaMethod: createLine: 132 - com/opensymphony/xwork2/inject/ContainerBuilder.java:132:-1at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:437)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.initFilter(ApplicationFilterConfig.java:277)at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:258)at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:382)at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:103)at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4650)at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5306)at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)at java.util.concurrent.FutureTask.run(Unknown Source)at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)at java.lang.Thread.run(Unknown Source)Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetExceptionat com.opensymphony.xwork2.inject.ContainerBuilder$4.create(ContainerBuilder.java:132)at com.opensymphony.xwork2.inject.Scope$2$1.create(Scope.java:51)at com.opensymphony.xwork2.inject.ContainerImpl.getInstance(ContainerImpl.java:507)at com.opensymphony.xwork2.inject.ContainerImpl.getInstance(ContainerImpl.java:517)at com.opensymphony.xwork2.inject.ContainerImpl$9.call(ContainerImpl.java:548)at com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.java:574)at com.opensymphony.xwork2.inject.ContainerImpl.getInstance(ContainerImpl.java:546)at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:197)at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66)at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:380)at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:424)... 16 moreCaused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetExceptionat com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:495)at com.opensymphony.xwork2.inject.ContainerImpl$7.call(ContainerImpl.java:532)at com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.java:581)at com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:530)at com.opensymphony.xwork2.config.impl.LocatableFactory.create(LocatableFactory.java:32)at com.opensymphony.xwork2.inject.ContainerBuilder$4.create(ContainerBuilder.java:130)... 26 moreCaused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetExceptionat com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.construct(ContainerImpl.java:440)at com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:492)... 31 moreCaused by: java.lang.reflect.InvocationTargetExceptionat sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)at java.lang.reflect.Constructor.newInstance(Unknown Source)at com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.construct(ContainerImpl.java:419)... 32 moreCaused by: java.lang.NoClassDefFoundError: org/apache/commons/lang/xwork/StringUtilsat org.apache.struts2.spring.StrutsSpringObjectFactory.<init>(StrutsSpringObjectFactory.java:104)... 37 moreCaused by: java.lang.ClassNotFoundException: org.apache.commons.lang.xwork.StringUtilsat org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)... 38 more 问题补充:这几个jar包没有显示出来antlr-2.7.6.jar、commons-dbcp.jar、commons-fileupload-1.2.2.jar、struts2-core-2.2.3.jar、struts2-spring-plugin-2.1.8.1.jar、xwork-core-2.2.3.jar。或者哪位有完整的整合项目发给我也可以,感激不尽啊

解决方案

Caused by: java.lang.NoClassDefFoundError: org/apache/commons/lang/xwork/StringUtils xwork-core jar包不对
解决方案二:
应该是少jar包导致的,我这里有个实例,你可以看看

时间: 2024-10-30 10:54:52

struts2+ibats+spring整合启动tomcat报错的相关文章

spring3-ssh2框架整合启动tomcat报错!!!

问题描述 ssh2框架整合启动tomcat报错!!! 严重: Context initialization failed org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from file [D:Toolapache-tomcat-6.0.36webappsNewsWEB-INFclassesapplicationContext-db

ssh2框架整合启动tomcat报错!

问题描述 严重: Context initialization failedorg.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from file [D:Toolapache-tomcat-6.0.36webappsNewsWEB-INFclassesapplicationContext-db.xml]; nested exception

shiro报错-项目中使用了shiro,我添加了几个实体类,启动tomcat报错

问题描述 项目中使用了shiro,我添加了几个实体类,启动tomcat报错 Error creating bean with name 'entityManagerFactory' defined in URL [file:/F:/eclipseWorkSpace1219/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/OmpApp/WEB-INF/classes/spring/spring-dao.xml]: Inv

spring-myeclipse下启动tomcat报错

问题描述 myeclipse下启动tomcat报错 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionResource' defined in ServletContext resource [/WEB-INF/saiku-beans.xml]: Cannot resolve reference to bean 'userServiceBean' while

mycelipse 启动tomcat 报错

问题描述 mycelipse 启动tomcat 报错 1C myeclipse-blue 同时开启两个,一个正常一个报错如下: 解决方案 虚拟机配置错误,重新配置一下虚拟机 解决方案二: 注:Unrecognized option: -vmargs 错误吗 解决方案三: 启动tomcat报错tomcat启动报错解决方案Tomcat启动报错,一闪而过 等问题 解决方案四: 不能创建Java虚拟机,一个严重的异常操作,程序将返回,之前我有个同学也遇到过,没什么大问题,清理一下垃圾和插件,然后重启一下

图片-eclipse下启动tomcat报错

问题描述 eclipse下启动tomcat报错 解决方案 你的这个目录下边是不是空的啊 解决方案二: 我怎么觉得你的路径有些问题呢 解决方案三: 我用的是eclipse-jee-indigo-SR2-win32这个版本,其它版本可能有所不同 配置servers服务时,会在工作路径下创建一个servers.且不会把调试目录放入Tomcat里的webapps里.但用地址仍可访问.等工程完成可以打包成.war手工放入webapps里. 1.找不到apr--(这个网上很多的,搜一下,要下一个对应版本的t

eclipse启动tomcat报错

问题描述 eclipse启动tomcat报错 一下报错信息:FATAL ERROR in native method: JDWP No transports initialized jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)ERROR: transport error 202: gethostbyname: unknown hostERROR: JDWP Transport dt_socket failed to initialize TRANSPORT

myeclipse中启动tomcat报错

问题描述 myeclipse中启动tomcat报错 在myeclipse中启动tomcat时报错,不知道怎么解决,请网友指点:报错信息如下Deployment is out of date due to changes in the underlying project contents.You'll need to 'Redeploy' the project to update the deployed archive; 警告提示是:构建路径指定执行环境 JavaSE-1.6.工作空间中没有

eclipse中,使用tomcat插件启动tomcat报错

问题描述 eclipse中,使用tomcat插件启动tomcat报错 具体错误: SEVERE: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [/manager] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154) at org.apache.catalin