struts2中tomcat启动异常

tomcat一启动就报错,报错如下
2017-4-2 20:11:04 org.apache.catalina.core.AprLifecycleListener init
信息: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: E:\MyEclipse\Common\binary\com.sun.java.jdk.win32.x86_64_1.6.0.013\bin;E:\MyEclipse\Common\plugins\com.genuitec.eclipse.easie.tomcat.myeclipse_9.0.0.me201109141806\tomcat\bin
2017-4-2 20:11:04 org.apache.coyote.http11.Http11Protocol init
信息: Initializing Coyote HTTP/1.1 on http-8080
2017-4-2 20:11:05 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 783 ms
2017-4-2 20:11:05 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2017-4-2 20:11:05 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/6.0.13
2017-4-2 20:11:06 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter struts2
java.lang.ClassNotFoundException: org.apache.struts2.dispatcher.ng
.filter.StrutsPrepareAndExecuteFilter
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:249)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)
at org.apache.catalina.core.ApplicationFilterConfig.(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)
2017-4-2 20:11:06 org.apache.catalina.core.StandardContext start
严重: Error filterStart
2017-4-2 20:11:06 org.apache.catalina.core.StandardContext start
严重: Context [/Zx] startup failed due to previous errors
2017-4-2 20:11:06 org.apache.coyote.http11.Http11Protocol start
信息: Starting Coyote HTTP/1.1 on http-8080
2017-4-2 20:11:06 org.apache.jk.common.ChannelSocket init
信息: JK: ajp13 listening on /0.0.0.0:8009
2017-4-2 20:11:06 org.apache.jk.server.JkMain start
信息: Jk running ID=0 time=0/34 config=null
2017-4-2 20:11:06 org.apache.catalina.startup.Catalina start
信息: Server startup in 1738 ms


1个回答

java.lang.ClassNotFoundException: org.apache.struts2.dispatcher.ng
.filter.StrutsPrepareAndExecuteFilter

很明显啊,少jar包,或者是jar包冲突了

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
IDEA Struts2项目 启动tomcat失败
## **项目是通过勾选web application 和Struts2生成的,lib是Struts2自动下载的。** ## **尝试了通过本地使用从官网下载的Struts2 jar文件也不行** ## **把jar依赖文件添加到WEB-INF/lib中也不行** ## ## **希望大佬解答** 下面是错误信息 D:\Software\apache-tomcat-9.0.27\bin\catalina.bat run [2019-11-19 08:13:32,924] Artifact newtest3:war exploded: Waiting for server connection to start artifact deployment... Using CATALINA_BASE: "C:\Users\zouha\.IntelliJIdea2019.1\system\tomcat\Unnamed_newtest3" Using CATALINA_HOME: "D:\Software\apache-tomcat-9.0.27" Using CATALINA_TMPDIR: "D:\Software\apache-tomcat-9.0.27\temp" Using JRE_HOME: "C:\Program Files\Java\jdk1.8.0_221" Using CLASSPATH: "D:\Software\apache-tomcat-9.0.27\bin\bootstrap.jar;D:\Software\apache-tomcat-9.0.27\bin\tomcat-juli.jar" 19-Nov-2019 20:13:34.763 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server.服务器版本: Apache Tomcat/9.0.27 19-Nov-2019 20:13:34.763 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 服务器构建: Oct 7 2019 09:57:22 UTC 19-Nov-2019 20:13:34.763 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 9.0.27.0 19-Nov-2019 20:13:34.763 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Windows 10 19-Nov-2019 20:13:34.763 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log OS.版本: 10.0 19-Nov-2019 20:13:34.763 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 架构: amd64 19-Nov-2019 20:13:34.763 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Java 环境变量: C:\Program Files\Java\jdk1.8.0_221\jre 19-Nov-2019 20:13:34.763 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM 版本: 1.8.0_221-b11 19-Nov-2019 20:13:34.763 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM.供应商: Oracle Corporation 19-Nov-2019 20:13:34.763 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: C:\Users\zouha\.IntelliJIdea2019.1\system\tomcat\Unnamed_newtest3 19-Nov-2019 20:13:34.763 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: D:\Software\apache-tomcat-9.0.27 19-Nov-2019 20:13:34.763 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=C:\Users\zouha\.IntelliJIdea2019.1\system\tomcat\Unnamed_newtest3\conf\logging.properties 19-Nov-2019 20:13:34.763 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager 19-Nov-2019 20:13:34.763 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote= 19-Nov-2019 20:13:34.763 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.port=1099 19-Nov-2019 20:13:34.763 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.ssl=false 19-Nov-2019 20:13:34.763 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.password.file=C:\Users\zouha\.IntelliJIdea2019.1\system\tomcat\Unnamed_newtest3\jmxremote.password 19-Nov-2019 20:13:34.763 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.access.file=C:\Users\zouha\.IntelliJIdea2019.1\system\tomcat\Unnamed_newtest3\jmxremote.access 19-Nov-2019 20:13:34.763 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.rmi.server.hostname=127.0.0.1 19-Nov-2019 20:13:34.763 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048 19-Nov-2019 20:13:34.763 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources 19-Nov-2019 20:13:34.763 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs= 19-Nov-2019 20:13:34.763 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=C:\Users\zouha\.IntelliJIdea2019.1\system\tomcat\Unnamed_newtest3 19-Nov-2019 20:13:34.763 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=D:\Software\apache-tomcat-9.0.27 19-Nov-2019 20:13:34.763 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=D:\Software\apache-tomcat-9.0.27\temp 19-Nov-2019 20:13:34.763 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library [1.2.23] using APR version [1.7.0]. 19-Nov-2019 20:13:34.778 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true]. 19-Nov-2019 20:13:34.778 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true] 19-Nov-2019 20:13:34.794 信息 [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.1.1c 28 May 2019] 19-Nov-2019 20:13:34.997 信息 [main] org.apache.coyote.AbstractProtocol.init 初始化协议处理器 ["http-nio-8080"] 19-Nov-2019 20:13:35.028 信息 [main] org.apache.coyote.AbstractProtocol.init 初始化协议处理器 ["ajp-nio-8009"] 19-Nov-2019 20:13:35.028 信息 [main] org.apache.catalina.startup.Catalina.load 服务器在[465]毫秒内初始化 19-Nov-2019 20:13:35.059 信息 [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina] 19-Nov-2019 20:13:35.059 信息 [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.27] 19-Nov-2019 20:13:35.075 信息 [main] org.apache.coyote.AbstractProtocol.start 开始协议处理句柄["http-nio-8080"] 19-Nov-2019 20:13:35.075 信息 [main] org.apache.coyote.AbstractProtocol.start 开始协议处理句柄["ajp-nio-8009"] 19-Nov-2019 20:13:35.075 信息 [main] org.apache.catalina.startup.Catalina.start Server startup in [56] milliseconds Connected to server [2019-11-19 08:13:35,564] Artifact newtest3:war exploded: Artifact is being deployed, please wait... ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console... ERROR Dispatcher Dispatcher initialization failed java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.inject(ContainerImpl.java:289) at com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.construct(ContainerImpl.java:422) at com.opensymphony.xwork2.inject.ContainerBuilder$5.create(ContainerBuilder.java:231) at com.opensymphony.xwork2.inject.Scope$2$1.create(Scope.java:52) at com.opensymphony.xwork2.inject.ContainerBuilder$3.create(ContainerBuilder.java:106) at com.opensymphony.xwork2.inject.ContainerBuilder$7.call(ContainerBuilder.java:584) at com.opensymphony.xwork2.inject.ContainerBuilder$7.call(ContainerBuilder.java:581) at com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.java:560) at com.opensymphony.xwork2.inject.ContainerBuilder.create(ContainerBuilder.java:581) at com.opensymphony.xwork2.config.impl.DefaultConfiguration.createBootstrapContainer(DefaultConfiguration.java:287) at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:162) at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66) at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:957) at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:463) at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:496) at org.apache.struts2.dispatcher.InitOperations.initDispatcher(InitOperations.java:73) at org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:61) at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:270) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:251) at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:102) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4533) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5172) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705) at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1728) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:289) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:456) at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:405) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:289) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) at com.sun.jmx.remote.security.MBeanServerAccessController.invoke(MBeanServerAccessController.java:468) at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468) at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76) at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309) at java.security.AccessController.doPrivileged(Native Method) at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1408) at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357) at sun.rmi.transport.Transport$1.run(Transport.java:200) at sun.rmi.transport.Transport$1.run(Transport.java:197) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:196) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:573) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:834) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:688) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:687) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.inject(ContainerImpl.java:287) ... 66 more Caused by: java.lang.ExceptionInInitializerError at com.opensymphony.xwork2.ognl.OgnlValueStackFactory.setContainer(OgnlValueStackFactory.java:88) ... 71 more Caused by: java.lang.IllegalArgumentException: Javassist library is missing in classpath! Please add missed dependency! at ognl.OgnlRuntime.<clinit>(OgnlRuntime.java:169) ... 72 more Caused by: java.lang.ClassNotFoundException: javassist.ClassPool at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1365) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1188) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:264) at ognl.OgnlRuntime.<clinit>(OgnlRuntime.java:166) ... 72 more 19-Nov-2019 20:13:36.564 严重 [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.StandardContext.filterStart 启动过滤器异常 java.lang.reflect.InvocationTargetException - Class: com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector File: ContainerImpl.java [2019-11-19 08:13:36,595] Artifact newtest3:war exploded: Error during artifact deployment. See server log for details. Method: inject Line: 289 - com/opensymphony/xwork2/inject/ContainerImpl.java:289:-1 at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:509) at org.apache.struts2.dispatcher.InitOperations.initDispatcher(InitOperations.java:73) at org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:61) at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:270) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:251) at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:102) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4533) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5172) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705) at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1728) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:289) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:456) at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:405) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:289) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) at com.sun.jmx.remote.security.MBeanServerAccessController.invoke(MBeanServerAccessController.java:468) at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468) at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76) at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309) at java.security.AccessController.doPrivileged(Native Method) at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1408) at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357) at sun.rmi.transport.Transport$1.run(Transport.java:200) at sun.rmi.transport.Transport$1.run(Transport.java:197) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:196) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:573) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:834) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:688) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:687) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.inject(ContainerImpl.java:289) at com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.construct(ContainerImpl.java:422) at com.opensymphony.xwork2.inject.ContainerBuilder$5.create(ContainerBuilder.java:231) at com.opensymphony.xwork2.inject.Scope$2$1.create(Scope.java:52) at com.opensymphony.xwork2.inject.ContainerBuilder$3.create(ContainerBuilder.java:106) at com.opensymphony.xwork2.inject.ContainerBuilder$7.call(ContainerBuilder.java:584) at com.opensymphony.xwork2.inject.ContainerBuilder$7.call(ContainerBuilder.java:581) at com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.java:560) at com.opensymphony.xwork2.inject.ContainerBuilder.create(ContainerBuilder.java:581) at com.opensymphony.xwork2.config.impl.DefaultConfiguration.createBootstrapContainer(DefaultConfiguration.java:287) at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:162) at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66) at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:957) at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:463) at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:496) ... 52 more Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.inject(ContainerImpl.java:287) ... 66 more Caused by: java.lang.ExceptionInInitializerError at com.opensymphony.xwork2.ognl.OgnlValueStackFactory.setContainer(OgnlValueStackFactory.java:88) ... 71 more Caused by: java.lang.IllegalArgumentException: Javassist library is missing in classpath! Please add missed dependency! at ognl.OgnlRuntime.<clinit>(OgnlRuntime.java:169) ... 72 more Caused by: java.lang.ClassNotFoundException: javassist.ClassPool at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1365) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1188) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:264) at ognl.OgnlRuntime.<clinit>(OgnlRuntime.java:166) ... 72 more 19-Nov-2019 20:13:36.579 严重 [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal One or more Filters failed to start. Full details will be found in the appropriate container log file 19-Nov-2019 20:13:36.579 严重 [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal Context [] startup failed due to previous errors 19-Nov-2019 20:13:45.090 信息 [Catalina-utility-2] org.apache.catalina.startup.HostConfig.deployDirectory 把web 应用程序部署到目录 [D:\Software\apache-tomcat-9.0.27\webapps\manager] 19-Nov-2019 20:13:45.153 信息 [Catalina-utility-2] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [D:\Software\apache-tomcat-9.0.27\webapps\manager] has finished in [63] ms
java开发使用struts2框架后,启动tomcat会出现异常,希望大家帮帮忙。
comcat版本 6.0.30 struts2 jar包 struts2-core-2.1.8.1.jar org.xml.sax.SAXParseException: The element type "servlet-class" must be terminated by the matching end-tag "</servlet-class>". at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1231) atcom.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522) at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1642) at org.apache.catalina.startup.ContextConfig.applicationWebConfig(ContextConfig.java:365) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:1076) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:261) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4578) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1041) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:964) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061) at org.apache.catalina.core.StandardHost.start(StandardHost.java:785) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463) at org.apache.catalina.core.StandardService.start(StandardService.java:525) at org.apache.catalina.core.StandardServer.start(StandardServer.java:701) at org.apache.catalina.startup.Catalina.start(Catalina.java:585) 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:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
IntelliJ IDEA Struts2-2.3 启动过滤器异常
并不是2.5和2.3 ng的问题,我在MyEclipse上就可以启动成功,但是换用IDEA就出现这种情况,不知道哪里有错 # tomcat报错: ``` java.lang.ClassNotFoundException: org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1363) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1186) at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:540) at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:521) at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:150) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:249) at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:102) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4516) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5162) ``` # web.xml ``` <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd" version="4.0"> <filter> <filter-name>struts2</filter-name> <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class> </filter> <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> </web-app> ``` # 导入的struts2 jar包 ![图片说明](https://img-ask.csdn.net/upload/201905/16/1557992098_188577.png) **而且我下面也有这个文件啊、** ![图片说明](https://img-ask.csdn.net/upload/201905/16/1557992708_377327.png)
用IDEA跑spring+struts2+ibates的项目,tomcat启动报异常,但是能启动成功,就是不能执行sql语句
代码是没问题的,之前怀疑是IDEA的编码格式的问题,但是修改了也没有,没辙了,求助大神们,给个建议 ``` (SYS)[2019-03-28 23:55:09,533] -3751 [RMI TCP Connection(2)-127.0.0.1] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory(AbstractAutowireCapableBeanFactory.java:459) : Eagerly caching bean 'weeklyAccessReport' to allow for resolving potential circular references (SYS)[2019-03-28 23:55:09,608] -3826 [RMI TCP Connection(2)-127.0.0.1] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory(AbstractBeanFactory.java:214) : Returning cached instance of singleton bean 'org.springframework.transaction.config.internalTransactionAdvisor' (SYS)[2019-03-28 23:55:09,611] -3829 [RMI TCP Connection(2)-127.0.0.1] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory(AbstractAutowireCapableBeanFactory.java:411) : Finished creating instance of bean 'weeklyAccessReport' (SYS)[2019-03-28 23:55:09,612] -3830 [RMI TCP Connection(2)-127.0.0.1] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory(DefaultSingletonBeanRegistry.java:214) : Creating shared instance of singleton bean 'luckyDrawPhaseAction' (SYS)[2019-03-28 23:55:09,612] -3830 [RMI TCP Connection(2)-127.0.0.1] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory(AbstractAutowireCapableBeanFactory.java:383) : Creating instance of bean 'luckyDrawPhaseAction' (SYS)[2019-03-28 23:55:09,637] -3855 [RMI TCP Connection(2)-127.0.0.1] DEBUG com.anyplex.service.util.SqlMapClientUtil(SqlMapClientUtil.java:47) : build reader ok java.lang.RuntimeException: Error occurred. Cause: com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'. Cause: com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMap/insert'. Cause: java.util.NoSuchElementException (SYS)[2019-03-28 23:55:09,955] -4173 [RMI TCP Connection(2)-127.0.0.1] FATAL com.anyplex.service.util.SqlMapClientUtil(SqlMapClientUtil.java:58) : initialize ibatis config failure at com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:49) at com.ibatis.sqlmap.client.SqlMapClientBuilder.buildSqlMapClient(SqlMapClientBuilder.java:63) at com.anyplex.service.util.SqlMapClientUtil.getSqlMapClient(SqlMapClientUtil.java:48) at com.anyplex.service.util.SqlMapClientUtil.getSqlMapClient(SqlMapClientUtil.java:29) at com.anyplex.service.util.OSCacheUtil.<clinit>(OSCacheUtil.java:35) at com.anyplex.service.AnyplexConfigure.getInstance(AnyplexConfigure.java:23) at com.anyplex.service.AnyplexServer.<clinit>(AnyplexServer.java:76) at com.anyplex.common.web.AnyplexActionSupport.<init>(AnyplexActionSupport.java:110) at com.anyplex.crm.auto.luckyDraw.LuckyDrawPhaseAction.<init>(LuckyDrawPhaseAction.java:14) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:100) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:61) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:877) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:839) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5099) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5615) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652) at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1863) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:618) at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:565) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) at com.sun.jmx.remote.security.MBeanServerAccessController.invoke(MBeanServerAccessController.java:468) at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1487) at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:97) at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1328) at java.security.AccessController.doPrivileged(Native Method) at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1427) at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:848) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322) at sun.rmi.transport.Transport$2.run(Transport.java:202) at sun.rmi.transport.Transport$2.run(Transport.java:199) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:198) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:567) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:828) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.access$400(TCPTransport.java:619) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler$1.run(TCPTransport.java:684) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler$1.run(TCPTransport.java:681) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:681) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'. Cause: com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMap/insert'. Cause: java.util.NoSuchElementException at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:53) at com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:46) ... 80 more Caused by: java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'. Cause: com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMap/insert'. Cause: java.util.NoSuchElementException at com.ibatis.common.xml.NodeletParser.processNodelet(NodeletParser.java:123) at com.ibatis.common.xml.NodeletParser.process(NodeletParser.java:84) at com.ibatis.common.xml.NodeletParser.process(NodeletParser.java:102) at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:72) at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:51) ... 81 more Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMap/insert'. Cause: java.util.NoSuchElementException at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:53) at com.ibatis.sqlmap.engine.builder.xml.SqlMapParser.parse(SqlMapParser.java:40) at com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser$10.process(SqlMapConfigParser.java:270) at com.ibatis.common.xml.NodeletParser.processNodelet(NodeletParser.java:121) ... 85 more Caused by: java.lang.RuntimeException: Error parsing XPath '/sqlMap/insert'. Cause: java.util.NoSuchElementException at com.ibatis.common.xml.NodeletParser.processNodelet(NodeletParser.java:123) at com.ibatis.common.xml.NodeletParser.process(NodeletParser.java:84) at com.ibatis.common.xml.NodeletParser.process(NodeletParser.java:102) at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:72) at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:51) ... 88 more Caused by: java.util.NoSuchElementException at java.util.StringTokenizer.nextToken(StringTokenizer.java:349) at com.ibatis.sqlmap.engine.mapping.parameter.InlineParameterMapParser.parseInlineParameterMap(InlineParameterMapParser.java:55) at com.ibatis.sqlmap.engine.builder.xml.XMLSqlSource.parseDynamicTags(XMLSqlSource.java:62) at com.ibatis.sqlmap.engine.builder.xml.XMLSqlSource.getSql(XMLSqlSource.java:33) at com.ibatis.sqlmap.engine.config.MappedStatementConfig.<init>(MappedStatementConfig.java:79) at com.ibatis.sqlmap.engine.config.SqlMapConfiguration.newMappedStatementConfig(SqlMapConfiguration.java:159) at com.ibatis.sqlmap.engine.builder.xml.SqlStatementParser.parseGeneralStatement(SqlStatementParser.java:73) at com.ibatis.sqlmap.engine.builder.xml.SqlMapParser$18.process(SqlMapParser.java:347) at com.ibatis.common.xml.NodeletParser.processNodelet(NodeletParser.java:121) ... 92 more ``` 麻烦大佬们看看,给点意见,参考参考
s2sh整合问题 tomcat启动没异常 访问.jsp 和action失败 单独测试struts2成功 hibernate+spring成功
<p>web.xml:</p> <p> </p> <p> </p> <p>&lt;?xml version="1.0" encoding="UTF-8"?&gt;</p> <p>&lt;web-app id="WebApp_9" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"</p> <p><span style="white-space: pre;"> </span>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"</p> <p><span style="white-space: pre;"> </span>xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"&gt;</p> <p> </p> <p> </p> <p><span style="white-space: pre;"> </span>&lt;listener&gt;</p> <p><span style="white-space: pre;"> </span>&lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt;</p> <p><span style="white-space: pre;"> </span>&lt;/listener&gt;</p> <p> </p> <p><span style="white-space: pre;"> </span>&lt;context-param&gt;</p> <p><span style="white-space: pre;"> </span>&lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;</p> <p><span style="white-space: pre;"> </span>&lt;param-value&gt;classpath:beans.xml&lt;/param-value&gt;</p> <p><span style="white-space: pre;"> </span>&lt;/context-param&gt;</p> <p><span style="white-space: pre;"> </span>&lt;!--</p> <p><span style="white-space: pre;"> </span>&lt;filter&gt; &lt;filter-name&gt;struts2&lt;/filter-name&gt;</p> <p><span style="white-space: pre;"> </span>&lt;filter-class&gt;org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter&lt;/filter-class&gt;</p> <p><span style="white-space: pre;"> </span>&lt;/filter&gt; &lt;filter-mapping&gt; &lt;filter-name&gt;struts2&lt;/filter-name&gt;</p> <p><span style="white-space: pre;"> </span>&lt;url-pattern&gt;/*&lt;/url-pattern&gt; &lt;/filter-mapping&gt;</p> <p><span style="white-space: pre;"> </span>--&gt;</p> <p><span style="white-space: pre;"> </span>&lt;filter&gt;</p> <p><span style="white-space: pre;"> </span>&lt;filter-name&gt;struts2&lt;/filter-name&gt;</p> <p><span style="white-space: pre;"> </span>&lt;filter-class&gt;org.apache.struts2.dispatcher.FilterDispatcher&lt;/filter-class&gt;</p> <p><span style="white-space: pre;"> </span>&lt;/filter&gt;</p> <p><span style="white-space: pre;"> </span>&lt;filter-mapping&gt;</p> <p><span style="white-space: pre;"> </span>&lt;filter-name&gt;struts2&lt;/filter-name&gt;</p> <p><span style="white-space: pre;"> </span>&lt;url-pattern&gt;/*&lt;/url-pattern&gt;</p> <p><span style="white-space: pre;"> </span>&lt;/filter-mapping&gt;</p> <p>&lt;/web-app&gt;</p> <p> </p> <p>struts2.xml</p> <p> </p> <p> </p> <p>&lt;?xml version="1.0" encoding="UTF-8" ?&gt;</p> <p>&lt;!DOCTYPE struts PUBLIC</p> <p>    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"</p> <p>    "http://struts.apache.org/dtds/struts-2.0.dtd"&gt;</p> <p> </p> <p>&lt;struts&gt;</p> <p> </p> <p><span style="white-space: pre;"> </span>&lt;constant name="struts.enable.DynamicMethodInvocation" value="true" /&gt;</p> <p><span style="white-space: pre;"> </span>&lt;constant name="struts.devMode" value="true" /&gt;</p> <p><span style="white-space: pre;"> </span></p> <p><span style="white-space: pre;"> </span>&lt;package name="useraction" namespace="/user" extends="struts-default"&gt;</p> <p><span style="white-space: pre;"> </span>&lt;action name="userAction" class="userAction"&gt;</p> <p><span style="white-space: pre;"> </span>&lt;result name="success"&gt;/index.jsp&lt;/result&gt;</p> <p><span style="white-space: pre;"> </span>&lt;/action&gt;</p> <p><span style="white-space: pre;"> </span>&lt;/package&gt;</p> <p><span style="white-space: pre;"> </span>&lt;!-- Add packages here --&gt;</p> <p> </p> <p>&lt;/struts&gt;</p> <p> </p> <p>beans.xml</p> <p> </p> <p>&lt;?xml version="1.0" encoding="UTF-8"?&gt;</p> <p>&lt;beans xmlns="http://www.springframework.org/schema/beans"</p> <p><span style="white-space: pre;"> </span>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"</p> <p><span style="white-space: pre;"> </span>xmlns:context="http://www.springframework.org/schema/context"</p> <p><span style="white-space: pre;"> </span>xmlns:aop="http://www.springframework.org/schema/aop"</p> <p><span style="white-space: pre;"> </span>xmlns:tx="http://www.springframework.org/schema/tx"</p> <p><span style="white-space: pre;"> </span>xsi:schemaLocation="http://www.springframework.org/schema/beans </p> <p>           http://www.springframework.org/schema/beans/spring-beans-2.5.xsd</p> <p>           http://www.springframework.org/schema/context</p> <p>           http://www.springframework.org/schema/context/spring-context-2.5.xsd</p> <p>           http://www.springframework.org/schema/aop</p> <p>           http://www.springframework.org/schema/aop/spring-aop-2.5.xsd</p> <p>           http://www.springframework.org/schema/tx </p> <p>           http://www.springframework.org/schema/tx/spring-tx-2.5.xsd"&gt;</p> <p> </p> <p><span style="white-space: pre;"> </span>&lt;context:annotation-config /&gt;</p> <p><span style="white-space: pre;"> </span>&lt;context:component-scan base-package="com.kettas"&gt;&lt;/context:component-scan&gt;</p> <p> </p> <p><span style="white-space: pre;"> </span>&lt;!-- datasource --&gt;</p> <p><span style="white-space: pre;"> </span>&lt;bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"</p> <p><span style="white-space: pre;"> </span>destroy-method="close"&gt;</p> <p><span style="white-space: pre;"> </span>&lt;!-- results in a setDriverClassName(String) call --&gt;</p> <p><span style="white-space: pre;"> </span>&lt;property name="driverClassName" value="oracle.jdbc.driver.OracleDriver" /&gt;</p> <p><span style="white-space: pre;"> </span>&lt;property name="url" value="jdbc:oracle:thin:@localhost:1521:xe" /&gt;</p> <p><span style="white-space: pre;"> </span>&lt;property name="username" value="spc" /&gt;</p> <p><span style="white-space: pre;"> </span>&lt;property name="password" value="spc" /&gt;</p> <p><span style="white-space: pre;"> </span>&lt;/bean&gt;</p> <p><span style="white-space: pre;"> </span>&lt;!-- sessionfactory --&gt;</p> <p><span style="white-space: pre;"> </span>&lt;bean id="sessionFactory"</p> <p><span style="white-space: pre;"> </span>class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"&gt;</p> <p><span style="white-space: pre;"> </span>&lt;property name="dataSource" ref="dataSource" /&gt;</p> <p><span style="white-space: pre;"> </span>&lt;property name="annotatedClasses"&gt;</p> <p><span style="white-space: pre;"> </span>&lt;list&gt;</p> <p><span style="white-space: pre;"> </span>&lt;value&gt;com.kettas.entity.Product&lt;/value&gt;</p> <p><span style="white-space: pre;"> </span>&lt;value&gt;com.kettas.entity.User&lt;/value&gt;</p> <p><span style="white-space: pre;"> </span>&lt;value&gt;com.kettas.entity.Order&lt;/value&gt;</p> <p><span style="white-space: pre;"> </span>&lt;value&gt;com.kettas.entity.Item&lt;/value&gt;</p> <p><span style="white-space: pre;"> </span>&lt;/list&gt;</p> <p><span style="white-space: pre;"> </span>&lt;/property&gt;</p> <p> </p> <p><span style="white-space: pre;"> </span>&lt;property name="hibernateProperties"&gt;</p> <p><span style="white-space: pre;"> </span>&lt;props&gt;</p> <p><span style="white-space: pre;"> </span>&lt;prop key="hibernate.dialect"&gt;org.hibernate.dialect.Oracle9Dialect&lt;/prop&gt;</p> <p><span style="white-space: pre;"> </span>&lt;prop key="hibernate.show_sql"&gt;true&lt;/prop&gt;</p> <p><span style="white-space: pre;"> </span>&lt;prop key="hibernate.format_sql"&gt;true&lt;/prop&gt;</p> <p><span style="white-space: pre;"> </span>&lt;prop key="current_session_context_class"&gt;thread&lt;/prop&gt;</p> <p><span style="white-space: pre;"> </span>&lt;/props&gt;</p> <p><span style="white-space: pre;"> </span>&lt;/property&gt;</p> <p><span style="white-space: pre;"> </span>&lt;/bean&gt;</p> <p> </p> <p><span style="white-space: pre;"> </span>&lt;bean id="hibernateTemplate" class="org.springframework.orm.hibernate3.HibernateTemplate"&gt;</p> <p><span style="white-space: pre;"> </span>&lt;property name="sessionFactory" ref="sessionFactory" /&gt;</p> <p><span style="white-space: pre;"> </span>&lt;/bean&gt;</p> <p><span style="white-space: pre;"> </span>&lt;bean id="txManager"</p> <p><span style="white-space: pre;"> </span>class="org.springframework.orm.hibernate3.HibernateTransactionManager"&gt;</p> <p><span style="white-space: pre;"> </span>&lt;property name="sessionFactory" ref="sessionFactory" /&gt;</p> <p><span style="white-space: pre;"> </span>&lt;/bean&gt;</p> <p><span style="white-space: pre;"> </span>&lt;aop:config&gt;</p> <p><span style="white-space: pre;"> </span>&lt;aop:pointcut id="bussinessService"</p> <p><span style="white-space: pre;"> </span>expression="execution(public * com.biz..*.*(..))" /&gt;</p> <p><span style="white-space: pre;"> </span>&lt;aop:advisor pointcut-ref="bussinessService"</p> <p><span style="white-space: pre;"> </span>advice-ref="txAdvice" /&gt;</p> <p><span style="white-space: pre;"> </span>&lt;/aop:config&gt;</p> <p> </p> <p><span style="white-space: pre;"> </span>&lt;tx:advice id="txAdvice" transaction-manager="txManager"&gt;</p> <p><span style="white-space: pre;"> </span>&lt;tx:attributes&gt;</p> <p><span style="white-space: pre;"> </span>&lt;tx:method name="login" read-only="true" /&gt;</p> <p><span style="white-space: pre;"> </span>&lt;tx:method name="select*" read-only="true" /&gt;</p> <p><span style="white-space: pre;"> </span>&lt;tx:method name="insert" propagation="REQUIRED"/&gt;</p> <p><span style="white-space: pre;"> </span>&lt;tx:method name="update" propagation="REQUIRED"/&gt;</p> <p><span style="white-space: pre;"> </span>&lt;tx:method name="delete" propagation="REQUIRED"/&gt;</p> <p><span style="white-space: pre;"> </span>&lt;/tx:attributes&gt;</p> <p><span style="white-space: pre;"> </span>&lt;/tx:advice&gt;</p> <p>&lt;/beans&gt;</p> <p> </p> <p>action:</p> <p> </p> <p>@Controller("userAction")</p> <p>@Scope("prototype")</p> <p>public class UserAction extends ActionSupport {</p> <p><span style="white-space: pre;"> </span>private User user;</p> <p><span style="white-space: pre;"> </span> private UserBiz userBiz;</p> <p><span style="white-space: pre;"> </span>private Map&lt;String, Object&gt; session;</p> <p> </p> <p><span style="white-space: pre;"> </span>public Map&lt;String, Object&gt; getSession() {</p> <p><span style="white-space: pre;"> </span>return session;</p> <p><span style="white-space: pre;"> </span>}</p> <p> </p> <p><span style="white-space: pre;"> </span>public void setSession(Map&lt;String, Object&gt; session) {</p> <p><span style="white-space: pre;"> </span>this.session = session;</p> <p><span style="white-space: pre;"> </span>}</p> <p> </p> <p><span style="white-space: pre;"> </span>public User getUser() {</p> <p><span style="white-space: pre;"> </span>return user;</p> <p><span style="white-space: pre;"> </span>}</p> <p> </p> <p><span style="white-space: pre;"> </span>public void setUser(User user) {</p> <p><span style="white-space: pre;"> </span>this.user = user;</p> <p><span style="white-space: pre;"> </span>}</p> <p> </p> <p><span style="white-space: pre;"> </span> public UserBiz getUserBiz() {</p> <p><span style="white-space: pre;"> </span> return userBiz;</p> <p><span style="white-space: pre;"> </span> }</p> <p><span style="white-space: pre;"> </span></p> <p><span style="white-space: pre;"> </span> @Resource(name = "userBiz")</p> <p><span style="white-space: pre;"> </span> public void setUserBiz(UserBiz userBiz) {</p> <p><span style="white-space: pre;"> </span> this.userBiz = userBiz;</p> <p><span style="white-space: pre;"> </span> }</p> <p> </p> <p><span style="white-space: pre;"> </span>public String login() {</p> <p><span style="white-space: pre;"> </span> User userLogin = userBiz.login(user.getName(), user.getPassword());</p> <p><span style="white-space: pre;"> </span> if (userLogin != null) {</p> <p><span style="white-space: pre;"> </span> session.put("login", userLogin);</p> <p><span style="white-space: pre;"> </span>System.out.println("aaaaaaa");</p> <p><span style="white-space: pre;"> </span> return "success";</p> <p><span style="white-space: pre;"> </span> } else {</p> <p><span style="white-space: pre;"> </span> addActionError("用户名密码错误");</p> <p><span style="white-space: pre;"> </span> return "error";</p> <p><span style="white-space: pre;"> </span> }</p> <p><span style="white-space: pre;"> </span>}</p> <p>}</p> <p> </p>
大神,求救.在Spring整合Struts2时启动tomcat出错
三月 27, 2017 8:39:19 下午 org.apache.catalina.startup.ContextConfig processAnnotationsJar 严重: Unable to process Jar entry [org/springframework/core/type/filter/AssignableTypeFilter.class] from Jar [jar:file:/E:/eclipse/apache-tomcat-7.0.67/wtpwebapps/ssh2/WEB-INF/lib/spring-core-3.0.5.RELEASE.jar!/] for annotations java.util.zip.ZipException: invalid LOC header (bad signature) at java.util.zip.ZipFile.read(Native Method) at java.util.zip.ZipFile.access$1400(Unknown Source) at java.util.zip.ZipFile$ZipFileInputStream.read(Unknown Source) at java.util.zip.ZipFile$ZipFileInflaterInputStream.fill(Unknown Source) at java.util.zip.InflaterInputStream.read(Unknown Source) at java.io.BufferedInputStream.fill(Unknown Source) at java.io.BufferedInputStream.read(Unknown Source) at java.io.DataInputStream.readInt(Unknown Source) at org.apache.tomcat.util.bcel.classfile.ClassParser.readID(ClassParser.java:201) at org.apache.tomcat.util.bcel.classfile.ClassParser.parse(ClassParser.java:80) at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2104) at org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:1980) at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1946) at org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1931) at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1330) at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:889) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:386) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5479) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1574) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1564) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) 三月 27, 2017 8:39:19 下午 org.apache.catalina.startup.ContextConfig processAnnotationsJar 严重: Unable to process Jar entry [org/springframework/core/type/filter/RegexPatternTypeFilter.class] from Jar [jar:file:/E:/eclipse/apache-tomcat-7.0.67/wtpwebapps/ssh2/WEB-INF/lib/spring-core-3.0.5.RELEASE.jar!/] for annotations java.util.zip.ZipException: invalid LOC header (bad signature) at java.util.zip.ZipFile.read(Native Method) at java.util.zip.ZipFile.access$1400(Unknown Source) at java.util.zip.ZipFile$ZipFileInputStream.read(Unknown Source) at java.util.zip.ZipFile$ZipFileInflaterInputStream.fill(Unknown Source) at java.util.zip.InflaterInputStream.read(Unknown Source) at java.io.BufferedInputStream.fill(Unknown Source) at java.io.BufferedInputStream.read(Unknown Source) at java.io.DataInputStream.readInt(Unknown Source) at org.apache.tomcat.util.bcel.classfile.ClassParser.readID(ClassParser.java:201) at org.apache.tomcat.util.bcel.classfile.ClassParser.parse(ClassParser.java:80) at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2104) at org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:1980) at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1946) at org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1931) at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1330) at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:889) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:386) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5479) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1574) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1564) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) 报了很多这样的异常
关于struts-2.1.6的struts.xml配置出现异常
struts.xml文件: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd"> <struts> <constant name="struts.i18n.encoding" value="GBK"/> <constant name="struts.configuration.xml.reload" value="true"/> <package name="simple" namespace="/simple" extends="struts-default"> <action name="hello" class="com.bjsxt.crm.web.struts2.test.VerySimpleAction" method="hello" > <result name="success">/struts2/test/index.jsp </result> </action> <action name="paramstest" class="com.bjsxt.crm.web.struts2.test.ParamsAction" > <result name="success">/struts2/test/params_success.jsp </result> <result name="input">/struts2/test/params_input.jsp </result> </action> </package> </struts> tomcat6.0启动就出现了下面的异常: 严重: Exception starting filter struts2 java.lang.NullPointerException at com.opensymphony.xwork2.util.FileManager$FileRevision.needsReloading(FileManager.java:209) at com.opensymphony.xwork2.util.FileManager.fileNeedsReloading(FileManager.java:60) at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.needsReload(XmlConfigurationProvider.java:325) at org.apache.struts2.config.StrutsXmlConfigurationProvider.needsReload(StrutsXmlConfigurationProvider.java:168) at com.opensymphony.xwork2.config.ConfigurationManager.conditionalReload(ConfigurationManager.java:220) at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:61) at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:774) at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:191) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4356) 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:924) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:887) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1147) 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:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) 2009-4-2 11:55:48 org.apache.catalina.core.StandardContext start 严重: Error filterStart 如果把 <constant name="struts.configuration.xml.reload" value="true"/> 删除,则启动不会报异常,请问,不删除这句,异常如何解决? [b]问题补充:[/b] 工程还没有开始,测试就出现这个问题了!还有一个问题就是,从JSP向Action传中文,变乱码! [b]问题补充:[/b] 就这行配置文件,没有什么其它的了哟@! [b]问题补充:[/b] web.xml: <?xml version="1.0" encoding="UTF-8"?> <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> <context-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/applicationContext-*.xml,classpath*:applicationContext-*.xml</param-value> </context-param> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <filter> <filter-name>struts2</filter-name> <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class> </filter> <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> </web-app> [b]问题补充:[/b] 乱码的问题解决了 就在struts.xml加入这句就行了! <constant name="struts.i18n.encoding" value="GBK"/> 不过最开始的异常没有解决哦!
tomcat启动数据库异常
我配置了struts文件,新建一个数据库wesoft,里面两个表,一个username,一个password。可是启动的是提示我 Cannot create PoolableConnectionFactory (Table 'wesoft.user' doesn't exist) Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'wesoft.user' doesn't exist 严重: Servlet /WeSoft threw load() exception javax.servlet.UnavailableException: Initializing application data source org.apache.struts.action.DATA_SOURCE 这个错误 我的xml配置 data-sources> <data-source type="org.apache.commons.dbcp.BasicDataSource"> <set-property property="driverClassName" value="com.mysql.jdbc.Driver"/> <set-property property="url" value="jdbc:mysql://localhost:3306/wesoft"/> <set-property property="username" value="root"/> <set-property property="password" value="wesoft"/> <set-property property="maxActive" value="10"/> <set-property property="maxWait" value="5000"/> <set-property property="defauleAutocommit" value="false"/> <set-property property="defauleReadonly" value="false"/> <set-property property="validationQuery" value="select count(*) from user"/> </data-source> </data-sources>
Tomcat启动报错
[b]异常信息:[/b] 2010-6-21 17:58:20 org.apache.catalina.core.AprLifecycleListener init 信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre6\bin;C:\tomcat\bin 2010-6-21 17:58:20 org.apache.coyote.http11.Http11Protocol init 信息: Initializing Coyote HTTP/1.1 on http-8080 2010-6-21 17:58:20 org.apache.catalina.startup.Catalina load 信息: Initialization processed in 559 ms 2010-6-21 17:58:21 org.apache.catalina.core.StandardService start 信息: Starting service Catalina 2010-6-21 17:58:21 org.apache.catalina.core.StandardEngine start 信息: Starting Servlet Engine: Apache Tomcat/6.0.18 2010-6-21 17:58:21 org.apache.catalina.core.ApplicationContext log 信息: ContextListener: contextInitialized() 2010-6-21 17:58:21 org.apache.catalina.core.ApplicationContext log 信息: SessionListener: contextInitialized() 2010-6-21 17:58:23 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info 信息: Parsing configuration file [struts-default.xml] 2010-6-21 17:58:23 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info 信息: Unable to locate configuration files of the name struts-plugin.xml, skipping 2010-6-21 17:58:23 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info 信息: Parsing configuration file [struts-plugin.xml] 2010-6-21 17:58:23 com.opensymphony.xwork2.util.logging.commons.CommonsLogger error 严重: Element type "packgage" must be declared. at (null:7:49) org.xml.sax.SAXParseException: Element type "packgage" must be declared. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.handleStartElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.startElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at javax.xml.parsers.SAXParser.parse(Unknown Source) at com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:113) at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:893) at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments(XmlConfigurationProvider.java:143) at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(XmlConfigurationProvider.java:110) at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:168) at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55) at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:374) at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:418) at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:190) 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(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) 2010-6-21 17:58:23 com.opensymphony.xwork2.util.logging.commons.CommonsLogger error 严重: Dispatcher initialization failed Unable to load configuration. - file:/C:/tomcat/webapps/Struts2Test/WEB-INF/classes/struts.xml:7:49 at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58) at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:374) at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:418) at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:190) 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(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) 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 file:/C:/tomcat/webapps/Struts2Test/WEB-INF/classes/struts.xml - file:/C:/tomcat/webapps/Struts2Test/WEB-INF/classes/struts.xml:7:49 at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:898) at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments(XmlConfigurationProvider.java:143) at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(XmlConfigurationProvider.java:110) at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:168) at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55) ... 30 more Caused by: Element type "packgage" must be declared. - file:/C:/tomcat/webapps/Struts2Test/WEB-INF/classes/struts.xml:7:49 at com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:115) at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:893) ... 34 more Caused by: org.xml.sax.SAXParseException: Element type "packgage" must be declared. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.handleStartElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.startElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at javax.xml.parsers.SAXParser.parse(Unknown Source) at com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:113) ... 35 more 2010-6-21 17:58:23 org.apache.catalina.core.StandardContext filterStart 严重: Exception starting filter struts2 Unable to load configuration. - file:/C:/tomcat/webapps/Struts2Test/WEB-INF/classes/struts.xml:7:49 at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:431) at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:190) 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(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) 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 configuration. - file:/C:/tomcat/webapps/Struts2Test/WEB-INF/classes/struts.xml:7:49 at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58) at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:374) at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:418) ... 28 more Caused by: Unable to load file:/C:/tomcat/webapps/Struts2Test/WEB-INF/classes/struts.xml - file:/C:/tomcat/webapps/Struts2Test/WEB-INF/classes/struts.xml:7:49 at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:898) at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments(XmlConfigurationProvider.java:143) at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(XmlConfigurationProvider.java:110) at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:168) at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55) ... 30 more Caused by: Element type "packgage" must be declared. - file:/C:/tomcat/webapps/Struts2Test/WEB-INF/classes/struts.xml:7:49 at com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:115) at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:893) ... 34 more Caused by: org.xml.sax.SAXParseException: Element type "packgage" must be declared. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.handleStartElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.startElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at javax.xml.parsers.SAXParser.parse(Unknown Source) at com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:113) ... 35 more 2010-6-21 17:58:23 org.apache.catalina.core.StandardContext start 严重: Error filterStart 2010-6-21 17:58:23 org.apache.catalina.core.StandardContext start 严重: Context [/Struts2Test] startup failed due to previous errors 2010-6-21 17:58:23 org.apache.coyote.http11.Http11Protocol start 信息: Starting Coyote HTTP/1.1 on http-8080 2010-6-21 17:58:24 org.apache.jk.common.ChannelSocket init 信息: JK: ajp13 listening on /0.0.0.0:8099 2010-6-21 17:58:24 org.apache.jk.server.JkMain start 信息: Jk running ID=0 time=0/30 config=null 2010-6-21 17:58:24 org.apache.catalina.startup.Catalina start 信息: Server startup in 3105 ms [b]struts.xml配置文件[/b] <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd"> <struts> <package name="Test" extends="struts-default"> <action name="login" class="Test001.LoginAction"> <result name="error">/error.jsp</result> <reuslt name="success">/welcome.jsp</reuslt> </action> </package> </struts> [b]LoginAction.java[/b] package Test001; import com.opensymphony.xwork2.Action; public class LoginAction implements Action{ private String username; private String password; public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String execute() { if(getUsername().equals("test") && getPassword().equals("welcome")) { return "SUCCESS"; } else { return "ERROR"; } } } [b]login.jsp[/b] <form action="login.action" method="post"> <table align="center"> <tr><td>用户名:<input name="username" type="text"/></td></tr> <tr><td>密&nbsp;&nbsp;码:<input name="password" type="password"/></td></tr> <tr><td><input type="submit" value="登录" /><input type="reset" value="重填"/></td></tr> </table> </form> 麻烦各位帮忙看看,谢谢啦!
新发布了一个项目,在tomcat启动时报下面的错误,求解
``` 五月 10, 2019 9:01:50 下午 org.apache.catalina.core.StandardContext filterStart 严重: 启动过滤器异常 java.lang.ExceptionInInitializerError at org.apache.logging.log4j.core.impl.Log4jLogEvent.createContextData(Log4jLogEvent.java:472) at org.apache.logging.log4j.core.impl.Log4jLogEvent.<init>(Log4jLogEvent.java:331) at org.apache.logging.log4j.core.impl.DefaultLogEventFactory.createEvent(DefaultLogEventFactory.java:54) at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:401) at org.apache.logging.log4j.core.config.AwaitCompletionReliabilityStrategy.log(AwaitCompletionReliabilityStrategy.java:63) at org.apache.logging.log4j.core.Logger.logMessage(Logger.java:146) at org.apache.logging.log4j.spi.AbstractLogger.tryLogMessage(AbstractLogger.java:2163) at org.apache.logging.log4j.spi.AbstractLogger.logMessageTrackRecursion(AbstractLogger.java:2118) at org.apache.logging.log4j.spi.AbstractLogger.logMessageSafely(AbstractLogger.java:2101) at org.apache.logging.log4j.spi.AbstractLogger.logMessage(AbstractLogger.java:2036) at org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled(AbstractLogger.java:1915) at org.apache.logging.log4j.spi.AbstractLogger.error(AbstractLogger.java:877) at com.opensymphony.xwork2.util.DomHelper$StartHandler.error(DomHelper.java:366) at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(Unknown Source) at com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:118) at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:1060) at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments(XmlConfigurationProvider.java:198) at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(XmlConfigurationProvider.java:165) at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:166) at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66) at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:957) at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:463) at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:496) at org.apache.struts2.dispatcher.InitOperations.initDispatcher(InitOperations.java:73) at org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:61) at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:270) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:251) at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:102) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4511) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5157) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1382) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1372) at java.util.concurrent.FutureTask.run(Unknown Source) at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) at java.util.concurrent.AbstractExecutorService.submit(Unknown Source) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:907) at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:831) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1382) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1372) at java.util.concurrent.FutureTask.run(Unknown Source) at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) at java.util.concurrent.AbstractExecutorService.submit(Unknown Source) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:907) at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.StandardService.startInternal(StandardService.java:423) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:933) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.startup.Catalina.start(Catalina.java:637) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:350) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492) Caused by: java.lang.IllegalArgumentException: Initial capacity must be at least one but was 0 at org.apache.logging.log4j.util.SortedArrayStringMap.<init>(SortedArrayStringMap.java:102) at org.apache.logging.log4j.core.impl.ContextDataFactory.createContextData(ContextDataFactory.java:109) at org.apache.logging.log4j.core.impl.ContextDataFactory.<clinit>(ContextDataFactory.java:57) ... 74 more ``` 这是我的web.xml ``` <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd" id="WebApp_ID" version="4.0"> <display-name>StrutsForum</display-name> <welcome-file-list> <welcome-file>index.html</welcome-file> <welcome-file>index.htm</welcome-file> <welcome-file>index.jsp</welcome-file> <welcome-file>default.html</welcome-file> <welcome-file>default.htm</welcome-file> <welcome-file>default.jsp</welcome-file> </welcome-file-list> <filter> <filter-name>struts</filter-name> <filter-class>org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter</filter-class> <init-param> <param-name>encoding</param-name> <param-value>UTF-8</param-value> </init-param> </filter> <filter-mapping> <filter-name>struts</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> </web-app> ``` 这是我的struts.xml ``` <?xml version="1.0" encoding="UTF-8"?> <struts> <constant name="struts.devMode" value="false" /> <constant name="strits.enableDynamicMethodInvocation" value="true"></constant> <package name="fourm" namespace="/" extends="struts-default"> <global-allowed-methods>regex:.*</global-allowed-methods> <action name="UserAction_*" class="com.jiayuewen.web.UserAction" method="{1}"> <result name="index" type="redirect">index.html</result> <result name="login">login.jsp</result> </action> </package> </struts> ``` 不甚感激
struts2工程不联网启动报错!
原来使用的struts1.3,后来升级到struts2+jdk6。tomcat6联网情况下使用正常,不联网时,启动就报异常: [code="java"]Caused by: java.net.UnknownHostException: struts.apache.org at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177) at java.net.Socket.connect(Socket.java:519) at java.net.Socket.connect(Socket.java:469) at sun.net.NetworkClient.doConnect(NetworkClient.java:157) at sun.net.www.http.HttpClient.openServer(HttpClient.java:388) at sun.net.www.http.HttpClient.openServer(HttpClient.java:500) at sun.net.www.http.HttpClient.<init>(HttpClient.java:233) at sun.net.www.http.HttpClient.New(HttpClient.java:306) at sun.net.www.http.HttpClient.New(HttpClient.java:318) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:792) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:733) at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:658) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:981) at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:677) at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(XMLEntityManager.java:1316) at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEntity(XMLEntityManager.java:1283) at com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.setInputSource(XMLDTDScannerImpl.java:283) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.dispatch(XMLDocumentScannerImpl.java:1168) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.next(XMLDocumentScannerImpl.java:1068) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:988) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:645) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:508) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107) at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:225) at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:283) at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:78) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:361) ... 27 more[/code] 上网搜索了,看到有人说要使用本地加载DTD文件,于是修改struts.xml文件,为 [code="java"]<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "struts-2.0.dtd">[/code] struts-2.0.dtd文件放在和struts.xml相同的路径,启动却报了这样一个异常: [code="java"]Caused by: java.io.FileNotFoundException: Could not open ServletContext resource [/struts-2.0.dtd][/code] 重建工程也是一样,请教是什么问题,多谢了!
tomcat 启动内存溢出 !!!
WARN 2016-05-25 18:18:36,714 com.gbc.sapphire.action.BusyInterceptor < java.lang.OutOfMemoryError > PermGen space java.lang.ClassLoader.defineClass1(Native Method) java.lang.ClassLoader.defineClass(ClassLoader.java:800) java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2957) org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1210) org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1690) org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571) freemarker.template.Template.<init>(Template.java:166) freemarker.cache.TemplateCache.loadTemplate(TemplateCache.java:447) freemarker.cache.TemplateCache.getTemplate(TemplateCache.java:360) freemarker.cache.TemplateCache.getTemplate(TemplateCache.java:235) freemarker.template.Configuration.getTemplate(Configuration.java:578) freemarker.template.Configuration.getTemplate(Configuration.java:550) org.apache.struts2.views.freemarker.FreemarkerResult.doExecute(FreemarkerResult.java:173) com.gbc.sapphire.action.FreeMarkerResult.doExecute(FreeMarkerResult.java:31) org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186) com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:371) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:275) com.gbc.sapphire.action.BusyInterceptor.intercept(BusyInterceptor.java:61) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54) org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:563) org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77) org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) com.gbc.sapphire.dao.DaoFilter.doFilter(DaoFilter.java:34) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) com.gbc.diamond.util.HeaderFilter.doFilter(HeaderFilter.java:44) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) 执行BusyInterceptor时发生异常! WARN 2016-05-25 18:18:36,714 com.gbc.sapphire.action.BusyInterceptor < java.lang.OutOfMemoryError > PermGen space java.lang.ClassLoader.defineClass1(Native Method) java.lang.ClassLoader.defineClass(ClassLoader.java:800) java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2957) org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1210) org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1690) org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571) freemarker.template.Template.<init>(Template.java:166) freemarker.cache.TemplateCache.loadTemplate(TemplateCache.java:447) freemarker.cache.TemplateCache.getTemplate(TemplateCache.java:360) freemarker.cache.TemplateCache.getTemplate(TemplateCache.java:235) freemarker.template.Configuration.getTemplate(Configuration.java:578) freemarker.template.Configuration.getTemplate(Configuration.java:550) org.apache.struts2.views.freemarker.FreemarkerResult.doExecute(FreemarkerResult.java:173) com.gbc.sapphire.action.FreeMarkerResult.doExecute(FreeMarkerResult.java:31) org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186) com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:371) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:275) com.gbc.sapphire.action.BusyInterceptor.intercept(BusyInterceptor.java:61) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54) org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:563) org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77) org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) com.gbc.sapphire.dao.DaoFilter.doFilter(DaoFilter.java:34) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) com.gbc.diamond.util.HeaderFilter.doFilter(HeaderFilter.java:44) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) 执行BusyInterceptor时发生异常! 跑两个项目会报错
我整合SSH2的时候启动时候tomcat6.0出现异常
2009-3-19 21:23:34 org.apache.catalina.core.AprLifecycleListener init 信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\Program Files\MyEclipse 6.5\bin;D:\Program Files\apache-tomcat-6.0.18\bin 2009-3-19 21:23:34 org.apache.coyote.http11.Http11Protocol init 信息: Initializing Coyote HTTP/1.1 on http-8080 2009-3-19 21:23:34 org.apache.catalina.startup.Catalina load 信息: Initialization processed in 1718 ms 2009-3-19 21:23:35 org.apache.catalina.core.StandardService start 信息: Starting service Catalina 2009-3-19 21:23:35 org.apache.catalina.core.StandardEngine start 信息: Starting Servlet Engine: Apache Tomcat/6.0.18 2009-3-19 21:23:43 org.apache.catalina.core.ApplicationContext log 信息: Initializing Spring root WebApplicationContext 2009-03-19 21:23:43,125 [org.springframework.web.context.ContextLoader]-[INFO] Root WebApplicationContext: initialization started 2009-03-19 21:23:43,343 [org.springframework.web.context.support.XmlWebApplicationContext]-[INFO] Refreshing org.springframework.web.context.support.XmlWebApplicationContext@6bd9e0: display name [Root WebApplicationContext]; startup date [Thu Mar 19 21:23:43 CST 2009]; root of context hierarchy 2009-03-19 21:23:43,625 [org.springframework.beans.factory.xml.XmlBeanDefinitionReader]-[INFO] Loading XML bean definitions from ServletContext resource [/WEB-INF/classes/applicationContext.xml] 2009-03-19 21:23:45,031 [org.springframework.web.context.support.XmlWebApplicationContext]-[INFO] Bean factory for application context [org.springframework.web.context.support.XmlWebApplicationContext@6bd9e0]: org.springframework.beans.factory.support.DefaultListableBeanFactory@5539d8 2009-03-19 21:23:45,484 [org.springframework.beans.factory.support.DefaultListableBeanFactory]-[INFO] Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@5539d8: defining beans [dataSource,sessionFactory,baseDAO,userDAO,userService,userAction]; root of factory hierarchy 2009-03-19 21:23:45,968 [org.hibernate.cfg.Environment]-[INFO] Hibernate 3.2.2 2009-03-19 21:23:45,984 [org.hibernate.cfg.Environment]-[INFO] hibernate.properties not found 2009-03-19 21:23:45,984 [org.hibernate.cfg.Environment]-[INFO] Bytecode provider name : cglib 2009-03-19 21:23:46,015 [org.hibernate.cfg.Environment]-[INFO] using JDK 1.4 java.sql.Timestamp handling 2009-03-19 21:23:46,875 [org.hibernate.cfg.HbmBinder]-[INFO] Mapping class: com.softeem.structs2.pojo.UserInfo -> userinfo 2009-03-19 21:23:46,953 [org.springframework.orm.hibernate3.LocalSessionFactoryBean]-[INFO] Building new Hibernate SessionFactory 2009-03-19 21:23:47,250 [org.hibernate.connection.ConnectionProviderFactory]-[INFO] Initializing connection provider: org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider 2009-03-19 21:23:47,984 [org.hibernate.cfg.SettingsFactory]-[INFO] RDBMS: Microsoft SQL Server, version: 9.00.1399 2009-03-19 21:23:47,984 [org.hibernate.cfg.SettingsFactory]-[INFO] JDBC driver: Microsoft SQL Server 2005 JDBC Driver, version: 1.1.1501.101 2009-03-19 21:23:48,062 [org.hibernate.dialect.Dialect]-[INFO] Using dialect: org.hibernate.dialect.SQLServerDialect 2009-03-19 21:23:48,109 [org.hibernate.transaction.TransactionFactoryFactory]-[INFO] Transaction strategy: org.springframework.orm.hibernate3.SpringTransactionFactory 2009-03-19 21:23:48,109 [org.hibernate.transaction.TransactionManagerLookupFactory]-[INFO] No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended) 2009-03-19 21:23:48,109 [org.hibernate.cfg.SettingsFactory]-[INFO] Automatic flush during beforeCompletion(): disabled 2009-03-19 21:23:48,109 [org.hibernate.cfg.SettingsFactory]-[INFO] Automatic session close at end of transaction: disabled 2009-03-19 21:23:48,109 [org.hibernate.cfg.SettingsFactory]-[INFO] Scrollable result sets: enabled 2009-03-19 21:23:48,109 [org.hibernate.cfg.SettingsFactory]-[INFO] JDBC3 getGeneratedKeys(): enabled 2009-03-19 21:23:48,109 [org.hibernate.cfg.SettingsFactory]-[INFO] Connection release mode: auto 2009-03-19 21:23:48,109 [org.hibernate.cfg.SettingsFactory]-[INFO] Default batch fetch size: 1 2009-03-19 21:23:48,109 [org.hibernate.cfg.SettingsFactory]-[INFO] Generate SQL with comments: disabled 2009-03-19 21:23:48,109 [org.hibernate.cfg.SettingsFactory]-[INFO] Order SQL updates by primary key: disabled 2009-03-19 21:23:48,109 [org.hibernate.cfg.SettingsFactory]-[INFO] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory 2009-03-19 21:23:48,125 [org.hibernate.hql.ast.ASTQueryTranslatorFactory]-[INFO] Using ASTQueryTranslatorFactory 2009-03-19 21:23:48,125 [org.hibernate.cfg.SettingsFactory]-[INFO] Query language substitutions: {} 2009-03-19 21:23:48,125 [org.hibernate.cfg.SettingsFactory]-[INFO] JPA-QL strict compliance: disabled 2009-03-19 21:23:48,125 [org.hibernate.cfg.SettingsFactory]-[INFO] Second-level cache: enabled 2009-03-19 21:23:48,125 [org.hibernate.cfg.SettingsFactory]-[INFO] Query cache: disabled 2009-03-19 21:23:48,125 [org.hibernate.cfg.SettingsFactory]-[INFO] Cache provider: org.hibernate.cache.NoCacheProvider 2009-03-19 21:23:48,125 [org.hibernate.cfg.SettingsFactory]-[INFO] Optimize cache for minimal puts: disabled 2009-03-19 21:23:48,140 [org.hibernate.cfg.SettingsFactory]-[INFO] Structured second-level cache entries: disabled 2009-03-19 21:23:48,156 [org.hibernate.cfg.SettingsFactory]-[INFO] Statistics: disabled 2009-03-19 21:23:48,156 [org.hibernate.cfg.SettingsFactory]-[INFO] Deleted entity synthetic identifier rollback: disabled 2009-03-19 21:23:48,156 [org.hibernate.cfg.SettingsFactory]-[INFO] Default entity-mode: pojo 2009-03-19 21:23:48,156 [org.hibernate.cfg.SettingsFactory]-[INFO] Named query checking : enabled 2009-03-19 21:23:48,281 [org.hibernate.impl.SessionFactoryImpl]-[INFO] building session factory 2009-03-19 21:23:49,437 [org.hibernate.impl.SessionFactoryObjectFactory]-[INFO] Not binding factory to JNDI, no JNDI name configured 2009-03-19 21:23:49,578 [org.springframework.web.context.ContextLoader]-[INFO] Root WebApplicationContext: initialization completed in 6453 ms 2009-03-19 21:23:50,171 [com.opensymphony.xwork2.config.providers.XmlConfigurationProvider]-[INFO] Parsing configuration file [struts-default.xml] 2009-03-19 21:23:50,765 [com.opensymphony.xwork2.config.providers.XmlConfigurationProvider]-[INFO] Parsing configuration file [struts-plugin.xml] 2009-03-19 21:23:50,796 [com.opensymphony.xwork2.config.providers.XmlConfigurationProvider]-[INFO] Parsing configuration file [struts.xml] 2009-3-19 21:23:50 org.apache.catalina.core.StandardContext filterStart 严重: Exception starting filter struts2 Unable to load configuration. - [unknown location] at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58) at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:360) at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:403) at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:190) 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(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Caused by: Cannot locate the chosen ObjectFactory implementation: spring - [unknown location] at org.apache.struts2.config.BeanSelectionProvider.alias(BeanSelectionProvider.java:287) at org.apache.struts2.config.BeanSelectionProvider.alias(BeanSelectionProvider.java:258) at org.apache.struts2.config.BeanSelectionProvider.register(BeanSelectionProvider.java:203) at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:165) at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55) ... 30 more 2009-3-19 21:23:50 org.apache.catalina.core.StandardContext start 严重: Error filterStart 2009-3-19 21:23:50 org.apache.catalina.core.StandardContext start 严重: Context [/loginStruct2] startup failed due to previous errors 2009-3-19 21:23:50 org.apache.catalina.core.ApplicationContext log 信息: Closing Spring root WebApplicationContext 2009-03-19 21:23:50,843 [org.springframework.web.context.support.XmlWebApplicationContext]-[INFO] Closing org.springframework.web.context.support.XmlWebApplicationContext@6bd9e0: display name [Root WebApplicationContext]; startup date [Thu Mar 19 21:23:43 CST 2009]; root of context hierarchy 2009-03-19 21:23:50,843 [org.springframework.beans.factory.support.DefaultListableBeanFactory]-[INFO] Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@5539d8: defining beans [dataSource,sessionFactory,baseDAO,userDAO,userService,userAction]; root of factory hierarchy 2009-03-19 21:23:50,843 [org.springframework.orm.hibernate3.LocalSessionFactoryBean]-[INFO] Closing Hibernate SessionFactory 2009-03-19 21:23:50,843 [org.hibernate.impl.SessionFactoryImpl]-[INFO] closing 2009-3-19 21:23:51 org.apache.coyote.http11.Http11Protocol start 信息: Starting Coyote HTTP/1.1 on http-8080 2009-3-19 21:23:52 org.apache.jk.common.ChannelSocket init 信息: JK: ajp13 listening on /0.0.0.0:8009 2009-3-19 21:23:52 org.apache.jk.server.JkMain start 信息: Jk running ID=0 time=0/47 config=null 2009-3-19 21:23:52 org.apache.catalina.startup.Catalina start 信息: Server startup in 17210 ms ------我选择刚刚接触SSH2,不知道是那个地方出了问题,请各位大哥帮帮我,不胜感激!!!!!! 下面是我上传的 工程图和架包图 applicationContext.xml ,struts.xml,web.xml的配置文件 希望能够有所帮助! 我在这里等这各位大哥的答复 [b]问题补充:[/b] 上面有我上传的配置文件 我看了半天都不知道那里不对,因为我刚刚接触SSH2,还有许多都不太明白,希望您能不能够说详细点,谢谢了 :arrow: [b]问题补充:[/b] 我把WEB.XML文件里面的 <!-- struts2 filter --> <filter> <filter-name>struts2</filter-name> <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class> </filter> <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> 去掉发布就没有错误,好郁闷啊,这个问题困了我2天了,解决不鸟,心里好不爽,所以我一定要解决他,还麻烦各位大哥,大姐的帮助我啊
求助!tomcat启动正常,访问javaweb时控制台报错
访问javaweb项目时报错,在myeclise6.0上无该异常,在myeclise10上报如下异常: org.apache.catalina.core.StandardWrapperValve invoke 严重: Servlet.service() for servlet jsp threw exception javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.DocumentBuilderFactoryImpl not found at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:129) at org.apache.jasper.xmlparser.ParserUtils.parseXMLDocument(ParserUtils.java:128) at org.apache.jasper.compiler.JspConfig.processWebDotXml(JspConfig.java:103) at org.apache.jasper.compiler.JspConfig.init(JspConfig.java:238) at org.apache.jasper.compiler.JspConfig.findJspProperty(JspConfig.java:294) at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:112) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:354) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:334) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:321) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:592) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) at javax.servlet.http.HttpServlet.service(HttpServlet.java:723) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:389) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:620) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:662)
启动tomcat报奇怪的错误,求拯救,在线等
eclipse做SSH集成中,刚写Struts2,还没写几笔呢,代码都是没错的,然后启动了下tomcat就不行了,报这个异常java.lang.NoClassDefFoundError: org/apache/commons/io/FileUtils,百度了半天找不到什么解决办法,很多回答说是jar有问题,我于是把jar都删除了,去官网上新下载了一份热气腾腾的新jar,拷回去再启动tomcat依旧是这个报错,这是为什么啊? ![图片说明](https://img-ask.csdn.net/upload/201604/30/1462016950_221812.png) ![图片说明](https://img-ask.csdn.net/upload/201604/30/1462016959_178242.png) 上图提示有个jar启动不了,之前的老jar包也是这样,官网上刚下的又这样....
Myeclipse2014安装struts的问题
![图片说明](https://img-ask.csdn.net/upload/201504/19/1429419811_891390.png) 就是这个异常,为什么报类找不到的异常呢,我百度了很久也没找到解决方案。而且奇怪的是,这个异常并不影响tomcat的启动,我是在MyEclipse中启动tomcat服务器的时候发现能启动,网页打开无问题,部署项目的话也会出现此问题,但不影响正常网页的显示。不知道大家能不能帮我解决这个问题,小弟初学三大框架。由于第一次在CSDN发帖还没金币悬赏,望大家包涵。。
java.lang.OutOfMemoryError: PermGen space
项目是用:Spring+Struts2+Mybatis开发的, 服务器:Tomcat7.x IDE:MyEclipse10 在项目启动时报内存溢出异常(java.lang.OutOfMemoryError: PermGen space)
Struts+Hibernate+Spring整合异常问题,查找多个方案无法解决
初学Struts+Hibernate+Spring整合 eclipse 7 struts 1.3 spring 2.5 hibernate 3.2 作了个练习 启动tomcat时: 严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/classes/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit(IILjava/lang/String;Ljava/lang/String; 搜了很多网页,看了不少方案,都无法解决。 [b]问题补充:[/b] 查的时候都说是jar 文件发生了版本冲突,主要试了下面三种方法。都没有作用 1. 移除asm.jar或asm-2.2.3.jar 2. 去掉类路径上的关于Hibernate的3个lib asm.jar asm-attrs.jar cglib-2.1.3.jar 加入Spring中的以下4个lib asm-2.2.2.jar asm-commons-2.2.3.jar asm-util-2.2.3.jar cglib-nodep-2.1_3.jar 3. 删除 asm-*.jar (asm-2.2.3.jar、asm.jar、asm-attrs.jar、asm-commons-2.2.3.jar、asm-util-2.2.3.jar) 删除 cglib-2.1.3.jar 添加 asm-all-3.0.jar
struts2+spring+hibernate整合,spring出现问题.
<p>先看看我的配置文件:</p> <pre name="code" class="web.xml">&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"&gt; &lt;welcome-file-list&gt; &lt;welcome-file&gt;find.jsp&lt;/welcome-file&gt; &lt;/welcome-file-list&gt; &lt;filter&gt; &lt;filter-name&gt;struts2&lt;/filter-name&gt; &lt;filter-class&gt; org.apache.struts2.dispatcher.FilterDispatcher &lt;/filter-class&gt; &lt;/filter&gt; &lt;filter-mapping&gt; &lt;filter-name&gt;struts2&lt;/filter-name&gt; &lt;url-pattern&gt;/*&lt;/url-pattern&gt; &lt;/filter-mapping&gt; &lt;listener&gt; &lt;listener-class&gt; org.springframework.web.context.ContextLoaderListener &lt;/listener-class&gt; &lt;/listener&gt; &lt;context-param&gt; &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt; &lt;param-value&gt; classpath:applicationContext*.xml &lt;/param-value&gt; &lt;/context-param&gt; &lt;/web-app&gt;</pre> <p> </p> <pre name="code" class="struts.xml">&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd"&gt; &lt;struts&gt; &lt;package name="eden" extends="struts-default"&gt; &lt;action name="selectBook" class="com.action.BookAction"&gt; &lt;result name="success"&gt;/index.jsp&lt;/result&gt; &lt;/action&gt; &lt;/package&gt; &lt;/struts&gt;</pre> <p> </p> <pre name="code" class="applicationContext.xml">&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"&gt; &lt;bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"&gt; &lt;property name="configLocation" value="classpath:hibernate.cfg.xml"&gt; &lt;/property&gt; &lt;/bean&gt; &lt;bean id="BookDAO" class="com.dao.impl.BookDAO"&gt; &lt;property name="sessionFactory"&gt; &lt;ref bean="sessionFactory" /&gt; &lt;/property&gt; &lt;/bean&gt; &lt;bean id="BookService" class="com.service.impl.BookService"&gt; &lt;property name="bookDAO" ref="BookDAO"&gt;&lt;/property&gt; &lt;/bean&gt; &lt;bean id="BookAction" class="com.action.BookAction"&gt; &lt;property name="bookService" ref="BookService"&gt;&lt;/property&gt; &lt;/bean&gt; &lt;/beans&gt;</pre> <p> </p> <pre name="code" class="action类">package com.action; import java.util.List; import javax.servlet.http.HttpServletRequest; import org.apache.struts2.ServletActionContext; import com.entity.Book; import com.opensymphony.xwork2.ActionSupport; import com.service.IBookService; public class BookAction extends ActionSupport{ private IBookService BookService; private Book book; @Override public String execute() throws Exception { HttpServletRequest request = ServletActionContext.getRequest(); List&lt;Book&gt; bookItem = BookService.selectBookAll();//这行报空指针异常 System.out.println("List Size:" + bookItem.size()); request.setAttribute("bookItem", bookItem); return SUCCESS; } public Book getBook() { return book; } public void setBook(Book book) { this.book = book; } public IBookService getBookService() { return BookService; } public void setBookService(IBookService bookService) { BookService = bookService; } }</pre> <p> </p> <pre name="code" class="异常代码">2010-9-11 12:08:30 org.apache.catalina.core.StandardWrapperValve invoke 严重: Servlet.service() for servlet default threw exception java.lang.NullPointerException at com.action.BookAction.execute(BookAction.java:22) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:404) at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:267) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:229) at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:221) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:150) at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:48) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:123) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:167) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:105) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:83) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:207) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:74) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:127) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) at org.apache.struts2.interceptor.ProfilingActivationInterceptor.intercept(ProfilingActivationInterceptor.java:107) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:206) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:115) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:143) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:121) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:170) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:123) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:50) at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:504) at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Unknown Source)</pre> <p> </p> <p>服务器启动时不会抛异常,在执行Action的时候,报空指针异常。说明在Action中的Service类没有注入成功。不知道是什么原因?</p>
终于明白阿里百度这样的大公司,为什么面试经常拿ThreadLocal考验求职者了
点击上面↑「爱开发」关注我们每晚10点,捕获技术思考和创业资源洞察什么是ThreadLocalThreadLocal是一个本地线程副本变量工具类,各个线程都拥有一份线程私有的数
《奇巧淫技》系列-python!!每天早上八点自动发送天气预报邮件到QQ邮箱
此博客仅为我业余记录文章所用,发布到此,仅供网友阅读参考,如有侵权,请通知我,我会删掉。 补充 有不少读者留言说本文章没有用,因为天气预报直接打开手机就可以收到了,为何要多此一举发送到邮箱呢!!!那我在这里只能说:因为你没用,所以你没用!!! 这里主要介绍的是思路,不是天气预报!不是天气预报!!不是天气预报!!!天气预报只是用于举例。请各位不要再刚了!!! 下面是我会用到的两个场景: 每日下
面试官问我:什么是消息队列?什么场景需要他?用了会出现什么问题?
你知道的越多,你不知道的越多 点赞再看,养成习惯 GitHub上已经开源 https://github.com/JavaFamily 有一线大厂面试点脑图、个人联系方式,欢迎Star和完善 前言 消息队列在互联网技术存储方面使用如此广泛,几乎所有的后端技术面试官都要在消息队列的使用和原理方面对小伙伴们进行360°的刁难。 作为一个在互联网公司面一次拿一次Offer的面霸,打败了无数
8年经验面试官详解 Java 面试秘诀
    作者 | 胡书敏 责编 | 刘静 出品 | CSDN(ID:CSDNnews) 本人目前在一家知名外企担任架构师,而且最近八年来,在多家外企和互联网公司担任Java技术面试官,前后累计面试了有两三百位候选人。在本文里,就将结合本人的面试经验,针对Java初学者、Java初级开发和Java开发,给出若干准备简历和准备面试的建议。   Java程序员准备和投递简历的实
究竟你适不适合买Mac?
我清晰的记得,刚买的macbook pro回到家,开机后第一件事情,就是上了淘宝网,花了500元钱,找了一个上门维修电脑的师傅,上门给我装了一个windows系统。。。。。。 表砍我。。。 当时买mac的初衷,只是想要个固态硬盘的笔记本,用来运行一些复杂的扑克软件。而看了当时所有的SSD笔记本后,最终决定,还是买个好(xiong)看(da)的。 已经有好几个朋友问我mba怎么样了,所以今天尽量客观
MyBatis研习录(01)——MyBatis概述与入门
C语言自学完备手册(33篇) Android多分辨率适配框架 JavaWeb核心技术系列教程 HTML5前端开发实战系列教程 MySQL数据库实操教程(35篇图文版) 推翻自己和过往——自定义View系列教程(10篇) 走出思维困境,踏上精进之路——Android开发进阶精华录 讲给Android程序员看的前端系列教程(40集免费视频教程+源码) 版权声明 本文原创作者:谷哥的小弟 作者博客
程序员一般通过什么途径接私活?
二哥,你好,我想知道一般程序猿都如何接私活,我也想接,能告诉我一些方法吗? 上面是一个读者“烦不烦”问我的一个问题。其实不止是“烦不烦”,还有很多读者问过我类似这样的问题。 我接的私活不算多,挣到的钱也没有多少,加起来不到 20W。说实话,这个数目说出来我是有点心虚的,毕竟太少了,大家轻喷。但我想,恰好配得上“一般程序员”这个称号啊。毕竟苍蝇再小也是肉,我也算是有经验的人了。 唾弃接私活、做外
Python爬虫爬取淘宝,京东商品信息
小编是一个理科生,不善长说一些废话。简单介绍下原理然后直接上代码。 使用的工具(Python+pycharm2019.3+selenium+xpath+chromedriver)其中要使用pycharm也可以私聊我selenium是一个框架可以通过pip下载 pip install selenium -i https://pypi.tuna.tsinghua.edu.cn/simple/ 
阿里程序员写了一个新手都写不出的低级bug,被骂惨了。
你知道的越多,你不知道的越多 点赞再看,养成习惯 本文 GitHub https://github.com/JavaFamily 已收录,有一线大厂面试点思维导图,也整理了很多我的文档,欢迎Star和完善,大家面试可以参照考点复习,希望我们一起有点东西。 前前言 为啥今天有个前前言呢? 因为你们的丙丙啊,昨天有牌面了哟,直接被微信官方推荐,知乎推荐,也就仅仅是还行吧(心里乐开花)
Java工作4年来应聘要16K最后没要,细节如下。。。
前奏: 今天2B哥和大家分享一位前几天面试的一位应聘者,工作4年26岁,统招本科。 以下就是他的简历和面试情况。 基本情况: 专业技能: 1、&nbsp;熟悉Sping了解SpringMVC、SpringBoot、Mybatis等框架、了解SpringCloud微服务 2、&nbsp;熟悉常用项目管理工具:SVN、GIT、MAVEN、Jenkins 3、&nbsp;熟悉Nginx、tomca
Python爬虫精简步骤1 获取数据
爬虫的工作分为四步: 1.获取数据。爬虫程序会根据我们提供的网址,向服务器发起请求,然后返回数据。 2.解析数据。爬虫程序会把服务器返回的数据解析成我们能读懂的格式。 3.提取数据。爬虫程序再从中提取出我们需要的数据。 4.储存数据。爬虫程序把这些有用的数据保存起来,便于你日后的使用和分析。 这一篇的内容就是:获取数据。 首先,我们将会利用一个强大的库——requests来获取数据。 在电脑上安装
Python绘图,圣诞树,花,爱心 | Turtle篇
1.画圣诞树 import turtle screen = turtle.Screen() screen.setup(800,600) circle = turtle.Turtle() circle.shape('circle') circle.color('red') circle.speed('fastest') circle.up() square = turtle.Turtle()
作为一个程序员,CPU的这些硬核知识你必须会!
CPU对每个程序员来说,是个既熟悉又陌生的东西? 如果你只知道CPU是中央处理器的话,那可能对你并没有什么用,那么作为程序员的我们,必须要搞懂的就是CPU这家伙是如何运行的,尤其要搞懂它里面的寄存器是怎么一回事,因为这将让你从底层明白程序的运行机制。 随我一起,来好好认识下CPU这货吧 把CPU掰开来看 对于CPU来说,我们首先就要搞明白它是怎么回事,也就是它的内部构造,当然,CPU那么牛的一个东
破14亿,Python分析我国存在哪些人口危机!
2020年1月17日,国家统计局发布了2019年国民经济报告,报告中指出我国人口突破14亿。 猪哥的朋友圈被14亿人口刷屏,但是很多人并没有看到我国复杂的人口问题:老龄化、男女比例失衡、生育率下降、人口红利下降等。 今天我们就来分析一下我们国家的人口数据吧! 更多有趣分析教程,扫描下方二维码关注vx公号「裸睡的猪」 即可查看! 一、背景 1.人口突破14亿 2020年1月17日,国家统计局发布
web前端javascript+jquery知识点总结
Javascript javascript 在前端网页中占有非常重要的地位,可以用于验证表单,制作特效等功能,它是一种描述语言,也是一种基于对象(Object)和事件驱动并具有安全性的脚本语言 ,语法同java类似,是一种解释性语言,边执行边解释。 JavaScript的组成: ECMAScipt 用于描述: 语法,变量和数据类型,运算符,逻辑控制语句,关键字保留字,对象。 浏览器对象模型(Br
Python实战:抓肺炎疫情实时数据,画2019-nCoV疫情地图
文章目录1. 前言2. 数据下载3. 数据处理4. 数据可视化 1. 前言 今天,群里白垩老师问如何用python画武汉肺炎疫情地图。白垩老师是研究海洋生态与地球生物的学者,国家重点实验室成员,于不惑之年学习python,实为我等学习楷模。先前我并没有关注武汉肺炎的具体数据,也没有画过类似的数据分布图。于是就拿了两个小时,专门研究了一下,遂成此文。 2月6日追记:本文发布后,腾讯的数据源多次变更u
听说想当黑客的都玩过这个Monyer游戏(1~14攻略)
第零关 进入传送门开始第0关(游戏链接) 请点击链接进入第1关: 连接在左边→ ←连接在右边 看不到啊。。。。(只能看到一堆大佬做完的留名,也能看到菜鸡的我,在后面~~) 直接fn+f12吧 &lt;span&gt;连接在左边→&lt;/span&gt; &lt;a href="first.php"&gt;&lt;/a&gt; &lt;span&gt;←连接在右边&lt;/span&gt; o
在家远程办公效率低?那你一定要收好这个「在家办公」神器!
相信大家都已经收到国务院延长春节假期的消息,接下来,在家远程办公可能将会持续一段时间。 但是问题来了。远程办公不是人在电脑前就当坐班了,相反,对于沟通效率,文件协作,以及信息安全都有着极高的要求。有着非常多的挑战,比如: 1在异地互相不见面的会议上,如何提高沟通效率? 2文件之间的来往反馈如何做到及时性?如何保证信息安全? 3如何规划安排每天工作,以及如何进行成果验收? ......
作为一个程序员,内存和磁盘的这些事情,你不得不知道啊!!!
截止目前,我已经分享了如下几篇文章: 一个程序在计算机中是如何运行的?超级干货!!! 作为一个程序员,CPU的这些硬核知识你必须会! 作为一个程序员,内存的这些硬核知识你必须懂! 这些知识可以说是我们之前都不太重视的基础知识,可能大家在上大学的时候都学习过了,但是嘞,当时由于老师讲解的没那么有趣,又加上这些知识本身就比较枯燥,所以嘞,大家当初几乎等于没学。 再说啦,学习这些,也看不出来有什么用啊!
渗透测试-灰鸽子远控木马
木马概述 灰鸽子( Huigezi),原本该软件适用于公司和家庭管理,其功能十分强大,不但能监视摄像头、键盘记录、监控桌面、文件操作等。还提供了黑客专用功能,如:伪装系统图标、随意更换启动项名称和表述、随意更换端口、运行后自删除、毫无提示安装等,并采用反弹链接这种缺陷设计,使得使用者拥有最高权限,一经破解即无法控制。最终导致被黑客恶意使用。原作者的灰鸽子被定义为是一款集多种控制方式于一体的木马程序
Python:爬取疫情每日数据
前言 有部分同学留言说为什么412,这是因为我代码里全国的cookies需要你自己打开浏览器更新好后替换,而且这个cookies大概只能持续20秒左右! 另外全国卫健委的数据格式一直在变,也有可能会导致爬取失败! 我现在已根据2月14日最新通报稿的格式修正了! 目前每天各大平台,如腾讯、今日头条都会更新疫情每日数据,他们的数据源都是一样的,主要都是通过各地的卫健委官网通报。 为什么已经有大量平台做
这个世界上人真的分三六九等,你信吗?
偶然间,在知乎上看到一个问题 一时间,勾起了我深深的回忆。 以前在厂里打过两次工,做过家教,干过辅导班,做过中介。零下几度的晚上,贴过广告,满脸、满手地长冻疮。   再回首那段岁月,虽然苦,但让我学会了坚持和忍耐。让我明白了,在这个世界上,无论环境多么的恶劣,只要心存希望,星星之火,亦可燎原。   下文是原回答,希望能对你能有所启发。   如果我说,这个世界上人真的分三六九等,
B 站上有哪些很好的学习资源?
哇说起B站,在小九眼里就是宝藏般的存在,放年假宅在家时一天刷6、7个小时不在话下,更别提今年的跨年晚会,我简直是跪着看完的!! 最早大家聚在在B站是为了追番,再后来我在上面刷欧美新歌和漂亮小姐姐的舞蹈视频,最近两年我和周围的朋友们已经把B站当作学习教室了,而且学习成本还免费,真是个励志的好平台ヽ(.◕ฺˇд ˇ◕ฺ;)ノ 下面我们就来盘点一下B站上优质的学习资源: 综合类 Oeasy: 综合
雷火神山直播超两亿,Web播放器事件监听是怎么实现的?
Web播放器解决了在手机浏览器和PC浏览器上播放音视频数据的问题,让视音频内容可以不依赖用户安装App,就能进行播放以及在社交平台进行传播。在视频业务大数据平台中,播放数据的统计分析非常重要,所以Web播放器在使用过程中,需要对其内部的数据进行收集并上报至服务端,此时,就需要对发生在其内部的一些播放行为进行事件监听。 那么Web播放器事件监听是怎么实现的呢? 01 监听事件明细表 名
3万字总结,Mysql优化之精髓
本文知识点较多,篇幅较长,请耐心学习 MySQL已经成为时下关系型数据库产品的中坚力量,备受互联网大厂的青睐,出门面试想进BAT,想拿高工资,不会点MySQL优化知识,拿offer的成功率会大大下降。 为什么要优化 系统的吞吐量瓶颈往往出现在数据库的访问速度上 随着应用程序的运行,数据库的中的数据会越来越多,处理时间会相应变慢 数据是存放在磁盘上的,读写速度无法和内存相比 如何优化 设计
Python新型冠状病毒疫情数据自动爬取+统计+发送报告+数据屏幕(三)发送篇
今天介绍的项目是使用 Itchat 发送统计报告 项目功能设计: 定时爬取疫情数据存入Mysql 进行数据分析制作疫情报告 使用itchat给亲人朋友发送分析报告(本文) 基于Django做数据屏幕 使用Tableau做数据分析 来看看最终效果 目前已经完成,预计2月12日前更新 使用 itchat 发送数据统计报告 itchat 是一个基于 web微信的一个框架,但微信官方并不允
作为程序员的我,大学四年一直自学,全靠这些实用工具和学习网站!
我本人因为高中沉迷于爱情,导致学业荒废,后来高考,毫无疑问进入了一所普普通通的大学,实在惭愧...... 我又是那么好强,现在学历不行,没办法改变的事情了,所以,进入大学开始,我就下定决心,一定要让自己掌握更多的技能,尤其选择了计算机这个行业,一定要多学习技术。 在进入大学学习不久后,我就认清了一个现实:我这个大学的整体教学质量和学习风气,真的一言难尽,懂的人自然知道怎么回事? 怎么办?我该如何更好的提升
粒子群算法求解物流配送路线问题(python)
粒子群算法求解物流配送路线问题(python) 1.查找论文文献 找一篇物流配送路径优化+粒子群算法求解的论文 参考文献:基于混沌粒子群算法的物流配送路径优化 2.了解粒子群算法的原理 讲解通俗易懂,有数学实例的博文:https://blog.csdn.net/daaikuaichuan/article/details/81382794 3.确定编码方式和解码策略 3.1编码方式 物流配送路线的
教你如何编写第一个简单的爬虫
很多人知道爬虫,也很想利用爬虫去爬取自己想要的数据,那么爬虫到底怎么用呢?今天就教大家编写一个简单的爬虫。 下面以爬取笔者的个人博客网站为例获取第一篇文章的标题名称,教大家学会一个简单的爬虫。 第一步:获取页面 #!/usr/bin/python # coding: utf-8 import requests #引入包requests link = "http://www.santostang.
前端JS初级面试题二 (。•ˇ‸ˇ•。)老铁们!快来瞧瞧自己都会了么
1. 传统事件绑定和符合W3C标准的事件绑定有什么区别? 传统事件绑定 &lt;div onclick=""&gt;123&lt;/div&gt; div1.onclick = function(){}; &lt;button onmouseover=""&gt;&lt;/button&gt; 注意: 如果给同一个元素绑定了两次或多次相同类型的事件,那么后面的绑定会覆盖前面的绑定 (不支持DOM事...
相关热词 c# 识别回车 c#生成条形码ean13 c#子控制器调用父控制器 c# 写大文件 c# 浏览pdf c#获取桌面图标的句柄 c# list反射 c# 句柄 进程 c# 倒计时 线程 c# 窗体背景色
立即提问