struts2 Tomcat 部署失败

Log

/work/apache-tomcat-7.0.63/bin/catalina.sh run
Using CATALINA_BASE:   /home/user/.IntelliJIdea2016.1/system/tomcat/index_jsp_MyDemo_2
Using CATALINA_HOME:   /work/apache-tomcat-7.0.63
Using CATALINA_TMPDIR: /work/apache-tomcat-7.0.63/temp
Using JRE_HOME:        /opt/jdk1.7.0_75
Using CLASSPATH:       /work/apache-tomcat-7.0.63/bin/bootstrap.jar:/work/apache-tomcat-7.0.63/bin/tomcat-juli.jar
[2016-12-07 09:17:56,858] Artifact MyDemo:war exploded: Server is not connected. Deploy is not available.
十二月 07, 2016 9:17:57 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server version:        Apache Tomcat/7.0.63
十二月 07, 2016 9:17:57 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server built:          Jun 30 2015 08:08:33 UTC
十二月 07, 2016 9:17:57 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server number:         7.0.63.0
十二月 07, 2016 9:17:57 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Name:               Linux
十二月 07, 2016 9:17:57 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Version:            3.13.0-24-generic
十二月 07, 2016 9:17:57 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Architecture:          amd64
十二月 07, 2016 9:17:57 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Java Home:             /opt/jdk1.7.0_75/jre
十二月 07, 2016 9:17:57 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Version:           1.7.0_75-b13
十二月 07, 2016 9:17:57 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Vendor:            Oracle Corporation
十二月 07, 2016 9:17:57 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_BASE:         /home/user/.IntelliJIdea2016.1/system/tomcat/index_jsp_MyDemo_2
十二月 07, 2016 9:17:57 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_HOME:         /work/apache-tomcat-7.0.63
十二月 07, 2016 9:17:57 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.util.logging.config.file=/home/user/.IntelliJIdea2016.1/system/tomcat/index_jsp_MyDemo_2/conf/logging.properties
十二月 07, 2016 9:17:57 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
十二月 07, 2016 9:17:57 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcom.sun.management.jmxremote=
十二月 07, 2016 9:17:57 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcom.sun.management.jmxremote.port=1099
十二月 07, 2016 9:17:57 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcom.sun.management.jmxremote.ssl=false
十二月 07, 2016 9:17:57 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcom.sun.management.jmxremote.authenticate=false
十二月 07, 2016 9:17:57 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.rmi.server.hostname=127.0.0.1
十二月 07, 2016 9:17:57 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.endorsed.dirs=/work/apache-tomcat-7.0.63/endorsed
十二月 07, 2016 9:17:57 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.base=/home/user/.IntelliJIdea2016.1/system/tomcat/index_jsp_MyDemo_2
十二月 07, 2016 9:17:57 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.home=/work/apache-tomcat-7.0.63
十二月 07, 2016 9:17:57 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.io.tmpdir=/work/apache-tomcat-7.0.63/temp
十二月 07, 2016 9:17:57 上午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /work/idea-IU-145.1617.8/bin::/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
十二月 07, 2016 9:17:57 上午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["http-bio-8080"]
十二月 07, 2016 9:17:57 上午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["ajp-bio-8009"]
十二月 07, 2016 9:17:57 上午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 367 ms
十二月 07, 2016 9:17:57 上午 org.apache.catalina.core.StandardService startInternal
信息: Starting service Catalina
十二月 07, 2016 9:17:57 上午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/7.0.63
十二月 07, 2016 9:17:57 上午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-bio-8080"]
十二月 07, 2016 9:17:57 上午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-bio-8009"]
十二月 07, 2016 9:17:57 上午 org.apache.catalina.startup.Catalina start
信息: Server startup in 51 ms
Connected to server
[2016-12-07 09:17:57,428] Artifact MyDemo:war exploded: Artifact is being deployed, please wait...
十二月 07, 2016 9:17:57 上午 org.apache.catalina.deploy.WebXml setVersion
警告: Unknown version string [3.1]. Default version will be used.
十二月 07, 2016 9:17:57 上午 org.apache.catalina.core.StandardContext startInternal
严重: One or more Filters failed to start. Full details will be found in the appropriate container log file
十二月 07, 2016 9:17:57 上午 org.apache.catalina.core.StandardContext startInternal
严重: Context [] startup failed due to previous errors
[2016-12-07 09:17:57,795] Artifact MyDemo:war exploded: Error during artifact deployment. See server log for details.
十二月 07, 2016 9:18:07 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory /work/apache-tomcat-7.0.63/webapps/manager
十二月 07, 2016 9:18:07 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory /work/apache-tomcat-7.0.63/webapps/manager has finished in 59 ms

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_3_1.xsd"
         version="3.1">
    <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>

    <welcome-file-list>
        <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
</web-app>

就是启动不了,但是去掉对struts的过滤就可以了,菜鸟求教!

2个回答

错误日志没有
是不是没有把struts2所需要的包加到项目里面来

加了,放到WEB-INF下lib就好了!

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

Tomcat:Netbean运行struts2出现尚未部署问题

在Tomcat下webapps中发布运行正常的struts2框架JSP程序,在netbean中运行报错:正在取消部署... undeploy?path=/ch08 OK - Undeployed application at context path /ch08 就地在E:\ch08\build\web中部署 正在部署... deploy?config=file%3A%2FC%3A%2FUsers%2Fdls%2FAppData%2FLocal%2FTemp%2Fcontext1969127416416379533.xml&path=/ch08 FAIL - Deployed application at context path /ch08 but context failed to start E:\ch08\nbproject\build-impl.xml:1085: 尚未部署该模块。 有关详细信息, 请查看服务器日志。 构建失败 (总时间: 8 秒) 程序共两个,代码如下:1.login.jsp <%@page contentType="text/html" pageEncoding="UTF-8"%> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>基于Struts2的登录系统</title> </head> <body> <form method="post" action="login"> 用户名:<input name="userName" type="text" size="24"> <br> 密 码 :<input name="passWord" type="password" size="26"> <br> <input type="submit" value="登录"> </form> <hr> </body> </html> 2.success.jsp <%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>登录成功页面</title> </head> <body> <h1>你登录成功,欢迎你!</h1> </body> </html> 3.其他信息:tomcat7.0,文件完整;NetBeans的struts组件库配置完好,运行javabeans没问题。另,我是初学者,请大虾们指点详尽些,谢谢!

新手,使用Intellij Idea测试Struts2遇到的问题

Idea版本为2018.3,按照提示,Struts2版本为2.5.14,配置完毕,遇到了问题。 第一个问题就是log4j的错误,经过各种尝试,删除out-》artifact-》module-》web-inf-》web.xml,可以正常部署。 然后加入Struts2内容,跳转action时遇到404,请帮忙看看什么问题。 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.filter.StrutsPrepareAndExecuteFilter</filter-class> </filter> <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> </web-app> ``` struts.xml如下: ``` <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" "http://struts.apache.org/dtds/struts-2.5.dtd"> <struts> <package name="first" namespace="/" extends="struts-default"> <action name="test" class="com.opensymphony.xwork2.ActionSupport" method="execute"> <result name="success">/success.jsp</result> </action> </package> </struts> ``` index.jsp如下: ``` <%@ page contentType="text/html;charset=UTF-8" language="java" %> <html> <head> <title>$Title$</title> </head> <body> <form action="test.action" method="post"><input type="submit"/></form> </body> </html> ```

Web项目部署在tomcat上,当执行到访问数据库操作时会报JDBCUtil初始化失败!

本人在是刚入门的小白。。在学习中,一直在陆续的写这个练手的项目-ebook,前几天的时候运行的都很正常,突然今天一运行就报错。。这是在MyEclipse中将项目部署在tomcat上的不过不是自带的tomcat,自己加的插件。 异常如下: ``` HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: java.lang.NoClassDefFoundError: Could not initialize class com.itany.jdbc.util.JDBCUtil org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:294) org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:187) org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432) javax.servlet.http.HttpServlet.service(HttpServlet.java:637) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) root cause java.lang.NoClassDefFoundError: Could not initialize class com.itany.jdbc.util.JDBCUtil com.itany.jdbc.util.JDBCTemplate.query(JDBCTemplate.java:103) com.itany.ebook.dao.impl.ManagerDaoImpl.queryManagerById(ManagerDaoImpl.java:62) com.itany.ebook.service.impl.ManagerServiceImpl.queryManagerById(ManagerServiceImpl.java:44) com.itany.ebook.action.LoginAction.login(LoginAction.java:31) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:270) org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:187) org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432) javax.servlet.http.HttpServlet.service(HttpServlet.java:637) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) ``` 我的datasource.properties配置文件如下: driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://127.0.0.1:3306/ebook?useUnicode=true&characterEncoding=utf8 username=root password= maxActive=10 initialSize=10 maxWait=5000 这是我的jar包以及刚刚异常的截图: ![图片说明](https://img-ask.csdn.net/upload/201610/01/1475332054_242487.png) ![图片说明](https://img-ask.csdn.net/upload/201610/01/1475332143_619533.png) 求大神。。膜拜膜拜!~~~~~~~~

Quartz 定时器部署到Tomcat 只运行2、3个job,其他的不运行且不是固定的按配置运行

集成的Quartz在idea开发工具上不管配置几个JOB,就算配置在同一时间触发,也会正常的执行,而将项目部署到Tomcat,只执行2个或三个JOB且是不固定的,配置为相同 时间的JOB只执行一个,不知道是何原因,望精通Quartz定时器的前辈指点一二。非常感谢。。。 ``` cylceTime = timeValue + "小时"; //每几小时执行一次(从当前小时开始往后推如当前时间为10:50,下一次执行时间为12:00以此类推) scheduleJob.setCronExpression("0 " + defaultM + " " + defaultH + "/" + timeValue + " * * ?"); //scheduleJob.setCronExpression("0 4 16 1/1 * ?"); } else if (timeType.equals("2")) { cylceTime = timeValue + "天"; //每几天执行一次 scheduleJob.setCronExpression("0 " + defaultM + " " + defaultH + " " + timeValue + "/" + timeValue + " * ?"); } else { cylceTime = timeValue + "月"; //每几月执行一次0 0 0 1 * ? scheduleJob.setCronExpression("0 " + defaultM + " " + defaultH + " 0 " + timeValue + "/" + timeValue + " ?"); } scheduleJob.setSchemeNum(rbspDispatchInfo.getFollowedSchemeNum()); scheduleJob.setDispatchNum(rbspDispatchInfo.getDispatchNum()); // scheduleJob.setCronExpression("*/5 30 15 * * ?"); // scheduleJob.setCronExpression("*/5 * * * * ?"); scheduleJobService.add(scheduleJob); ``` ``` /** * 添加定时任务 * @param scheduleJob */ public void add(ScheduleJob scheduleJob){ @SuppressWarnings("rawtypes") Class job = null; try { job = Class.forName(scheduleJob.getClassName()); } catch (ClassNotFoundException e1) { log.error("任务类没找到"); e1.printStackTrace(); } @SuppressWarnings("unchecked") JobDetail jobDetail = JobBuilder.newJob(job).withIdentity(scheduleJob.getName(), scheduleJob.getGroup()).build(); jobDetail.getJobDataMap().put("scheduleJob", scheduleJob); //表达式调度构建器(可判断创建SimpleScheduleBuilder) CronScheduleBuilder scheduleBuilder = CronScheduleBuilder.cronSchedule(scheduleJob.getCronExpression()); //按新的cronExpression表达式构建一个新的trigger CronTrigger trigger = TriggerBuilder.newTrigger().withIdentity(scheduleJob.getName(), scheduleJob.getGroup()).withSchedule(scheduleBuilder).build(); try { scheduler.scheduleJob(jobDetail, trigger); log.info("定时任务添加成功["+scheduleJob.getDispatchNum()+"]"); } catch (SchedulerException e) { log.error("定时任务添加失败["+scheduleJob.getDispatchNum()+"]"); e.printStackTrace(); } } ```

weblogic12c使用struts2上传文件失败

使用struts2开发的文件上传功能,在Tomcat6、7以及weblogic10中使用都正常,但是在weblogic12c中部署时无法在后台获取到表单中的内容。 前台表单如下: <form id="file_upload_form" method="post" enctype="multipart/form-data" action="systemmanage/videoMng_uploadFile.action"> <table width="100%"> <tr> <td>上传文件</td> <td> <input type="file" name="form.uploadfile" id="uploadFile"/> <input type="hidden" name="form.tree_node_id" value="<%=rowid %>"> </td> </tr> </table> </form> 问题表现: 在后台使用request.getParameter("form.uploadfile")获取的内容为null

tomcat配置好ie打开出错。

![图片说明](https://img-ask.csdn.net/upload/201810/15/1539589717_882219.jpg) 打开IE出现以下问题:谁帮帮我 HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception java.lang.NullPointerException com.sangame.ds.ws.web.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:40) 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.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:164) org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:141) org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:90) org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:417) org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:233) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) note The full stack trace of the root cause is available in the Apache Tomcat/6.0.20 logs. Apache Tomcat/6.0.20

tomcat部署一个项目时一直失败 可能是spring或者hibernate配置的一些问题。。

tomcat部署一个项目时一直失败 可能是spring或者hibernate配置的一些问题。。 **catalina.2016-07-10.log** ``` 10-Jul-2016 10:42:22.759 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.0.32 10-Jul-2016 10:42:22.761 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Feb 2 2016 19:34:53 UTC 10-Jul-2016 10:42:22.761 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 8.0.32.0 10-Jul-2016 10:42:22.761 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Windows 10 10-Jul-2016 10:42:22.762 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 10.0 10-Jul-2016 10:42:22.762 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64 10-Jul-2016 10:42:22.762 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: D:\java\jdk1.8.0_73\jre 10-Jul-2016 10:42:22.763 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_73-b02 10-Jul-2016 10:42:22.763 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation 10-Jul-2016 10:42:22.763 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: D:\apache-tomcat-8.0.32 10-Jul-2016 10:42:22.763 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: D:\apache-tomcat-8.0.32 10-Jul-2016 10:42:22.764 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=D:\apache-tomcat-8.0.32\conf\logging.properties 10-Jul-2016 10:42:22.765 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager 10-Jul-2016 10:42:22.766 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.endorsed.dirs=D:\apache-tomcat-8.0.32\endorsed 10-Jul-2016 10:42:22.768 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=D:\apache-tomcat-8.0.32 10-Jul-2016 10:42:22.770 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=D:\apache-tomcat-8.0.32 10-Jul-2016 10:42:22.771 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=D:\apache-tomcat-8.0.32\temp 10-Jul-2016 10:42:22.773 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library 1.2.4 using APR version 1.5.1. 10-Jul-2016 10:42:22.774 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true]. 10-Jul-2016 10:42:23.810 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized (OpenSSL 1.0.2e 3 Dec 2015) 10-Jul-2016 10:42:24.034 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-apr-8888"] 10-Jul-2016 10:42:24.085 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-apr-8009"] 10-Jul-2016 10:42:24.088 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 1886 ms 10-Jul-2016 10:42:24.141 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina 10-Jul-2016 10:42:24.142 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.32 10-Jul-2016 10:42:27.906 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time. 10-Jul-2016 10:42:27.981 INFO [localhost-startStop-1] org.springframework.web.context.ContextLoader.initWebApplicationContext Root WebApplicationContext: initialization started 10-Jul-2016 10:42:28.162 INFO [localhost-startStop-1] org.springframework.web.context.support.XmlWebApplicationContext.prepareRefresh Refreshing Root WebApplicationContext: startup date [Sun Jul 10 10:42:28 CST 2016]; root of context hierarchy 10-Jul-2016 10:42:28.255 INFO [localhost-startStop-1] org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext.xml] 10-Jul-2016 10:42:29.266 INFO [localhost-startStop-1] org.hibernate.annotations.common.reflection.java.JavaReflectionManager.<clinit> HCANN000001: Hibernate Commons Annotations {4.0.4.Final} 10-Jul-2016 10:42:29.280 INFO [localhost-startStop-1] org.hibernate.Version.logVersion HHH000412: Hibernate Core {4.3.5.Final} 10-Jul-2016 10:42:29.290 INFO [localhost-startStop-1] org.hibernate.cfg.Environment.<clinit> HHH000206: hibernate.properties not found 10-Jul-2016 10:42:29.296 INFO [localhost-startStop-1] org.hibernate.cfg.Environment.buildBytecodeProvider HHH000021: Bytecode provider name : javassist 10-Jul-2016 10:42:29.392 SEVERE [localhost-startStop-1] org.springframework.web.context.ContextLoader.initWebApplicationContext Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.io.FileNotFoundException: class path resource [com/domain/Student.hbm.xml] cannot be opened because it does not exist at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1553) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:684) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482) at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4812) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5255) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.io.FileNotFoundException: class path resource [com/domain/Student.hbm.xml] cannot be opened because it does not exist at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:172) at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:337) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1612) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1549) ... 21 more ``` **localhost.2016-07-10.log** ``` 10-Jul-2016 10:42:27.940 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log No Spring WebApplicationInitializer types detected on classpath 10-Jul-2016 10:42:27.981 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log Initializing Spring root WebApplicationContext 10-Jul-2016 10:42:29.419 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.listenerStart 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/applicationContext.xml]: Invocation of init method failed; nested exception is java.io.FileNotFoundException: class path resource [com/domain/Student.hbm.xml] cannot be opened because it does not exist at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1553) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:684) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482) at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4812) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5255) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.io.FileNotFoundException: class path resource [com/domain/Student.hbm.xml] cannot be opened because it does not exist at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:172) at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:337) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1612) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1549) ... 21 more 10-Jul-2016 10:42:29.856 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log Closing Spring root WebApplicationContext 10-Jul-2016 10:42:30.585 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextInitialized() 10-Jul-2016 10:42:30.586 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextInitialized() ```

weblogic报错,但在tomcat上正常,调用webservice接口

------2017-08-10 11:31:22 [org.apache.struts.action.RequestProcessor]-[WARN] Unhandled Exception thrown: class com.sitech.ismp.util.exception.BaseException <2017-8-10 ??11?31·?2ī CST> <Error> <HTTP> <BEA-101017> <[weblogic.servlet.internal.WebAppServletContext@2b3700f - appName: 'zhidao', name: 'zhidao', context-path: ''] Root cause of ServletException. com.sitech.ismp.util.exception.BaseException: java.lang.NullPointerException at com.sitech.ismp.util.struts.BaseAction.execute(BaseAction.java:165) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) Truncated. see log file for complete stacktrace 在tomcat上webservice接口可以调通,在weblogic上就报错了

关于tomcat和mina联合使用的问题(比较难)

在以前公司的时候,看别人做过一个项目,是个监控系统,后来有个问题我百思不得其解。 那个项目是个监控系统。 用mina框架负责和被监控程序之间的通信。用tomcat下Struts等负责监控信息的展现等。当时我看了,他们的工程在eclipse下是2个不同的工程。 但后来部署的时候却是部署在一起的,而且两个工程之间要相互信息共享,数据量也比较大。 现在我就不明白是怎么弄的。如何让这两个工程同时部署,而且又能像在一个工程下那样对数据对象随意相互访问(似乎是只有一套pojo之类的) 我想了很久想不明白,也查不到资料,近天终于忍不住半夜起来发帖求问,顺带:我第一次在这里发帖,不大懂规矩,回帖的人可以提醒下 [b]问题补充:[/b] 非常感谢一楼的回答,在此谢过先 您说的第二种方法,把两个工程同时放以war包的形式部署,然后以servletContext的形式共享数据。可是据我所知,servletContext只是在同一个应用范围内共享数据啊

web项目打成war包在本地tomcat运行没有问题,在linux上报404错误!

本地和linux用的tomcat和jdk都是同一版本。删除web.xml里面的类容后就没问题,以下是web.xml配置,求高手!!! <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0"> <display-name>ssh</display-name> <welcome-file-list> <welcome-file>index.do</welcome-file> <welcome-file>index.html</welcome-file> <welcome-file>index.jsp</welcome-file> </welcome-file-list> <context-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:applicationContext*.xml</param-value> </context-param> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <listener> <listener-class>com.tanie.fenxiao.listener.InitListener</listener-class> </listener> <filter> <filter-name>encodingFilter</filter-name> <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class> <init-param> <param-name>encoding</param-name> <param-value>UTF-8</param-value> </init-param> <init-param> <param-name>forceEncoding</param-name> <param-value>true</param-value> </init-param> </filter> <filter-mapping> <filter-name>encodingFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <filter> <filter-name>adminLogin</filter-name> <filter-class>com.tanie.fenxiao.filter.AdminLoginFilter</filter-class> </filter> <filter-mapping> <filter-name>adminLogin</filter-name> <url-pattern>/admin/*</url-pattern> </filter-mapping> <filter> <filter-name>userLogin</filter-name> <filter-class>com.tanie.fenxiao.filter.UserLoginFilter</filter-class> </filter> <filter-mapping> <filter-name>userLogin</filter-name> <url-pattern>/user/*</url-pattern> </filter-mapping> <filter> <filter-name>SetcharFilter</filter-name> <filter-class>com.tanie.fenxiao.filter.SetcharFilter</filter-class> </filter> <filter-mapping> <filter-name>SetcharFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <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> <filter> <filter-name>OpenSessionInViewFilter</filter-name> <filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class> <init-param> <param-name>sessionFactoryBeanName</param-name> <param-value>sessionFactory</param-value> </init-param> </filter> <session-config> <session-timeout>20</session-timeout> </session-config> <filter-mapping> <filter-name>OpenSessionInViewFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>*.do</url-pattern> <dispatcher>REQUEST</dispatcher> <dispatcher>FORWARD</dispatcher> </filter-mapping> </web-app>

图片上传 tomcat重新部署后图片被删除请问要如何解决

public class LedgerAdd extends BaseAction { protected ActionForward executeAction(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { DynaActionForm LedgerForm = (DynaActionForm) form; if (LedgerForm != null) { FormFile file = (FormFile) LedgerForm.get("photo"); if (file != null) { String contentType = file.getContentType(); String size = (file.getFileSize() + "bytes"); String fileUrl = file.getFileName(); int s_id = fileUrl.lastIndexOf("."); String ext = fileUrl.substring(s_id); String nuclideName = (String) LedgerForm.get("nuclideName") String ratify = "2"; if (nuclideName != null && !nuclideName.equals("") && fileUrl != null && !fileUrl.equals("")) { Date d = new Date(); java.text.SimpleDateFormat df = new java.text.SimpleDateFormat(); Calendar calendar = GregorianCalendar.getInstance(); df.applyPattern("yyyyMMddHHmmss"); InputStream stream = file.getInputStream();// 把文件读入 String path=request.getSession().getServletContext().getRealPath("/"); ByteArrayOutputStream baos = new ByteArrayOutputStream(); OutputStream bos = new FileOutputStream(path+ "/UploadFile/" + df.format(d) + ext); int bytesRead = 0; byte[] buffer = new byte[8192]; while ((bytesRead = stream.read(buffer, 0, 8192)) != -1) { bos.write(buffer, 0, bytesRead);// 将文件写入服务器 } bos.close();stream.close(); int addid = rs.addLedger(request.getContextPath()+ "/UploadFile/" + df.format(d) + ext,nuclideName, remark); if (addid > 0) { request.setAttribute("msg", "添加成功");} else { request.setAttribute("msg", "添加失败");}} else { request.setAttribute("msg", "带*的参数必须输入");}}} return mapping.findForward("success");}}

SVN导入Maven项目,Tomcat启动报错

![图片说明](https://img-ask.csdn.net/upload/201612/14/1481690572_682210.png) 别的人导入都可以,我怎么弄都不行。。。。

NetBeans 运行java web项目报错 build-impl.xml:1050: 尚未部署该模块

用的是Tomcat服务器,服务器日志如下: ![图片说明](https://img-ask.csdn.net/upload/201811/18/1542509700_965731.png) ![图片说明](https://img-ask.csdn.net/upload/201811/18/1542509719_432093.png) 在网上找了好多种方法试了都不行,请各位大神帮我看看好吗,急!

tomca项目共享jar后,strust出错

原本在tomcat里面的很多ssh开发的项目,在WEB-INF/lib中都有一份ssh的jar包。 这样方法区加载的类占了很多内存。 现在改成,在tomcat中设置一个共享jar包的地方,所用项目的ssh框架的jar包都从这里读出来。 现在有一个项目是用了struts,hibernate,但是没有用spring。 在tomcat启动的时候,struts加载失败,提示这个项目struts和spring整合了,我要为这个项目加入spring的监听器。可是这个项目我都没配置过spring,也没用到spring。 错误日志: ``` 06-Nov-2016 20:11:45.127 INFO [localhost-startStop-1] com.opensymphony.xwork2.util.logging.commons.CommonsLogger.info Initializing Struts-Spring integration... 06-Nov-2016 20:11:45.128 SEVERE [localhost-startStop-1] com.opensymphony.xwork2.util.logging.commons.CommonsLogger.fatal ********** FATAL ERROR STARTING UP STRUTS-SPRING INTEGRATION ********** Looks like the Spring listener was not configured for your web app! Nothing will work until WebApplicationContextUtils returns a valid ApplicationContext. You might need to add the following to web.xml: <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> 06-Nov-2016 20:11:45.154 SEVERE [localhost-startStop-1] com.opensymphony.xwork2.util.logging.commons.CommonsLogger.error Dispatcher initialization failed java.lang.NullPointerException at com.opensymphony.xwork2.spring.SpringObjectFactory.getClassInstance(SpringObjectFactory.java:245) at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.verifyResultType(XmlConfigurationProvider.java:608) at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addResultTypes(XmlConfigurationProvider.java:578) ``` 项目的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_3_1.xsd" id="WebApp_ID" version="3.1"> <display-name>WeMall4.0</display-name> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> <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> ```

windows下的web项目部署到linux下,报错了

报500的错,谁知道是怎么回事啊 java.lang.reflect.InvocationTargetException sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:483) com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:441) com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:280) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:243) com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:165) com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:252) org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68) com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195) com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195) com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:179) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:235) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:89) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:130) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:126) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:138) com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:165) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:179) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52) org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:488) org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77) org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91) org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)

idea连接远程tomcat报Error during artifact deployment. See server log for details.错误

idea连接远程tomcat报Error during artifact deployment. See server log for details.错误,远程tomcat能正常访问这个war包的内容,要怎么才能看到调试信息和日志。

我在lunix下部署了程序,发现上传时候报错了,看提示是权限问题

有谁能帮我一下 用的是struts2的上传 。我应该如何解决,我原来有个地方上传用户头像那块,就没有事,上传的固定的目录,今天写的是动态的创建的文件夹。不知道为甚报错了。 代码部分: String orginalFileName = this.getPicFileName(); String suffix =orginalFileName.substring(orginalFileName.lastIndexOf("."), orginalFileName.length());//获取扩展名 if (suffix.toLowerCase().equals(".jpg")|| suffix.toLowerCase().equals(".png")||suffix.toLowerCase().equals(".gif")|| suffix.toLowerCase().equals(".bmp")){ SimpleDateFormat sf=new SimpleDateFormat("yyyyMMddHHmmss"); SimpleDateFormat sdf =new SimpleDateFormat("yyyyMM"); String autoImageName = sf.format(new Date()); //设定存储新的名字 String yearAndMonth = sdf.format(new Date());//获取年和月 String newFileName = autoImageName+suffix; String path = ServletActionContext.getServletContext().getRealPath("/")+"images"+File.separator+"share"+File.separator+"uploadFiles"+File.separator+yearAndMonth;// 在tomcat中保存图片的实际路径 == "webRoot/images/share/uploadFiles/年月" String filePath = "images/share/uploadFiles/"+yearAndMonth+"/"+newFileName; File saveFile = new File(new File(path),newFileName); // 文件名为 当前时间戳 // 判断父目录是否存在 if (!saveFile.getParentFile().exists()) { saveFile.getParentFile().mkdirs(); } try { // 执行文件上传 fos = new FileOutputStream(saveFile); fis = new FileInputStream(getPic()); byte[] buffer = new byte[1024]; int len = 0; while ((len = fis.read(buffer)) > 0){ fos.write(buffer , 0 , len); } fos.close(); fos.flush(); jsonString="{\"filename\":\""+newFileName+"\","+" \"success\":\"true\",\"filePath\":\""+filePath+"\"}"; out.write(jsonString); out.flush(); out.close(); } catch (IOException e) { jsonString="{\"errorMsg\":\"上传失败!请刷新后重新上传!\",\"success\":\"false\"}"; out.write(jsonString); out.flush(); out.close(); e.printStackTrace(); } }else{ jsonString="{\"errorMsg\":\"您上传的图片不符合格式!请选择jpg,png,bmp,gif等后缀格式的!\",\"success\":\"false\"}"; out.write(jsonString); out.flush(); out.close(); }

ueditor编辑在服务器下不能上传,报错500,求指导

<span id="trace" style="display:none"> java.lang.NoSuchMethodError: org.apache.commons.fileupload.FileUploadBase.isMultipartContent(Lorg/apache/commons/fileupload/RequestContext;)Z at org.apache.commons.fileupload.servlet.ServletFileUpload.isMultipartContent(ServletFileUpload.java:71) at com.baidu.ueditor.upload.BinaryUploader.save(BinaryUploader.java:30) at com.baidu.ueditor.upload.Uploader.doExec(Uploader.java:24) at com.baidu.ueditor.ActionEnter.invoke(ActionEnter.java:80) at com.baidu.ueditor.ActionEnter.exec(ActionEnter.java:49) at _jsp._ueditor._jsp._controller__jsp._jspService(ueditor/jsp/controller.jsp:12) at com.caucho.jsp.JavaPage.service(JavaPage.java:61) at com.caucho.jsp.Page.pageservice(Page.java:578) at com.caucho.server.dispatch.PageFilterChain.doFilter(PageFilterChain.java:195) at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:187) at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:265) at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:273) at com.caucho.server.port.TcpConnection.run(TcpConnection.java:682) at com.caucho.util.ThreadPool$Item.runTasks(ThreadPool.java:730) at com.caucho.util.ThreadPool$Item.run(ThreadPool.java:649) at java.lang.Thread.run(Thread.java:662) </span> ``` 公司服务器centos 6.5,tomcat;前框架freemaker;实在找不出来毛病,在本地上传又可以,就是部署服务不行。服务器我是最高权限,可以直接上传图片 ```

在中国程序员是青春饭吗?

今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...

程序员请照顾好自己,周末病魔差点一套带走我。

程序员在一个周末的时间,得了重病,差点当场去世,还好及时挽救回来了。

Java基础知识面试题(2020最新版)

文章目录Java概述何为编程什么是Javajdk1.5之后的三大版本JVM、JRE和JDK的关系什么是跨平台性?原理是什么Java语言有哪些特点什么是字节码?采用字节码的最大好处是什么什么是Java程序的主类?应用程序和小程序的主类有何不同?Java应用程序与小程序之间有那些差别?Java和C++的区别Oracle JDK 和 OpenJDK 的对比基础语法数据类型Java有哪些数据类型switc...

和黑客斗争的 6 天!

互联网公司工作,很难避免不和黑客们打交道,我呆过的两家互联网公司,几乎每月每天每分钟都有黑客在公司网站上扫描。有的是寻找 Sql 注入的缺口,有的是寻找线上服务器可能存在的漏洞,大部分都...

Intellij IDEA 实用插件安利

1. 前言从2020 年 JVM 生态报告解读 可以看出Intellij IDEA 目前已经稳坐 Java IDE 头把交椅。而且统计得出付费用户已经超过了八成(国外统计)。IDEA 的...

搜狗输入法也在挑战国人的智商!

故事总是一个接着一个到来...上周写完《鲁大师已经彻底沦为一款垃圾流氓软件!》这篇文章之后,鲁大师的市场工作人员就找到了我,希望把这篇文章删除掉。经过一番沟通我先把这篇文章从公号中删除了...

总结了 150 余个神奇网站,你不来瞅瞅吗?

原博客再更新,可能就没了,之后将持续更新本篇博客。

副业收入是我做程序媛的3倍,工作外的B面人生是怎样的?

提到“程序员”,多数人脑海里首先想到的大约是:为人木讷、薪水超高、工作枯燥…… 然而,当离开工作岗位,撕去层层标签,脱下“程序员”这身外套,有的人生动又有趣,马上展现出了完全不同的A/B面人生! 不论是简单的爱好,还是正经的副业,他们都干得同样出色。偶尔,还能和程序员的特质结合,产生奇妙的“化学反应”。 @Charlotte:平日素颜示人,周末美妆博主 大家都以为程序媛也个个不修边幅,但我们也许...

MySQL数据库面试题(2020最新版)

文章目录数据库基础知识为什么要使用数据库什么是SQL?什么是MySQL?数据库三大范式是什么mysql有关权限的表都有哪几个MySQL的binlog有有几种录入格式?分别有什么区别?数据类型mysql有哪些数据类型引擎MySQL存储引擎MyISAM与InnoDB区别MyISAM索引与InnoDB索引的区别?InnoDB引擎的4大特性存储引擎选择索引什么是索引?索引有哪些优缺点?索引使用场景(重点)...

如果你是老板,你会不会踢了这样的员工?

有个好朋友ZS,是技术总监,昨天问我:“有一个老下属,跟了我很多年,做事勤勤恳恳,主动性也很好。但随着公司的发展,他的进步速度,跟不上团队的步伐了,有点...

我入职阿里后,才知道原来简历这么写

私下里,有不少读者问我:“二哥,如何才能写出一份专业的技术简历呢?我总感觉自己写的简历太烂了,所以投了无数份,都石沉大海了。”说实话,我自己好多年没有写过简历了,但我认识的一个同行,他在阿里,给我说了一些他当年写简历的方法论,我感觉太牛逼了,实在是忍不住,就分享了出来,希望能够帮助到你。 01、简历的本质 作为简历的撰写者,你必须要搞清楚一点,简历的本质是什么,它就是为了来销售你的价值主张的。往深...

魂迁光刻,梦绕芯片,中芯国际终获ASML大型光刻机

据羊城晚报报道,近日中芯国际从荷兰进口的一台大型光刻机,顺利通过深圳出口加工区场站两道闸口进入厂区,中芯国际发表公告称该光刻机并非此前盛传的EUV光刻机,主要用于企业复工复产后的生产线扩容。 我们知道EUV主要用于7nm及以下制程的芯片制造,光刻机作为集成电路制造中最关键的设备,对芯片制作工艺有着决定性的影响,被誉为“超精密制造技术皇冠上的明珠”,根据之前中芯国际的公报,目...

优雅的替换if-else语句

场景 日常开发,if-else语句写的不少吧??当逻辑分支非常多的时候,if-else套了一层又一层,虽然业务功能倒是实现了,但是看起来是真的很不优雅,尤其是对于我这种有强迫症的程序"猿",看到这么多if-else,脑袋瓜子就嗡嗡的,总想着解锁新姿势:干掉过多的if-else!!!本文将介绍三板斧手段: 优先判断条件,条件不满足的,逻辑及时中断返回; 采用策略模式+工厂模式; 结合注解,锦...

离职半年了,老东家又发 offer,回不回?

有小伙伴问松哥这个问题,他在上海某公司,在离职了几个月后,前公司的领导联系到他,希望他能够返聘回去,他很纠结要不要回去? 俗话说好马不吃回头草,但是这个小伙伴既然感到纠结了,我觉得至少说明了两个问题:1.曾经的公司还不错;2.现在的日子也不是很如意。否则应该就不会纠结了。 老实说,松哥之前也有过类似的经历,今天就来和小伙伴们聊聊回头草到底吃不吃。 首先一个基本观点,就是离职了也没必要和老东家弄的苦...

2020阿里全球数学大赛:3万名高手、4道题、2天2夜未交卷

阿里巴巴全球数学竞赛( Alibaba Global Mathematics Competition)由马云发起,由中国科学技术协会、阿里巴巴基金会、阿里巴巴达摩院共同举办。大赛不设报名门槛,全世界爱好数学的人都可参与,不论是否出身数学专业、是否投身数学研究。 2020年阿里巴巴达摩院邀请北京大学、剑桥大学、浙江大学等高校的顶尖数学教师组建了出题组。中科院院士、美国艺术与科学院院士、北京国际数学...

为什么你不想学习?只想玩?人是如何一步一步废掉的

不知道是不是只有我这样子,还是你们也有过类似的经历。 上学的时候总有很多光辉历史,学年名列前茅,或者单科目大佬,但是虽然慢慢地长大了,你开始懈怠了,开始废掉了。。。 什么?你说不知道具体的情况是怎么样的? 我来告诉你: 你常常潜意识里或者心理觉得,自己真正的生活或者奋斗还没有开始。总是幻想着自己还拥有大把时间,还有无限的可能,自己还能逆风翻盘,只不是自己还没开始罢了,自己以后肯定会变得特别厉害...

百度工程师,获利10万,判刑3年!

所有一夜暴富的方法都写在刑法中,但总有人心存侥幸。这些年互联网犯罪高发,一些工程师高技术犯罪更是引发关注。这两天,一个百度运维工程师的案例传遍朋友圈。1...

程序员为什么千万不要瞎努力?

本文作者用对比非常鲜明的两个开发团队的故事,讲解了敏捷开发之道 —— 如果你的团队缺乏统一标准的环境,那么即使勤劳努力,不仅会极其耗时而且成果甚微,使用...

为什么程序员做外包会被瞧不起?

二哥,有个事想询问下您的意见,您觉得应届生值得去外包吗?公司虽然挺大的,中xx,但待遇感觉挺低,马上要报到,挺纠结的。

当HR压你价,说你只值7K,你该怎么回答?

当HR压你价,说你只值7K时,你可以流畅地回答,记住,是流畅,不能犹豫。 礼貌地说:“7K是吗?了解了。嗯~其实我对贵司的面试官印象很好。只不过,现在我的手头上已经有一份11K的offer。来面试,主要也是自己对贵司挺有兴趣的,所以过来看看……”(未完) 这段话主要是陪HR互诈的同时,从公司兴趣,公司职员印象上,都给予对方正面的肯定,既能提升HR的好感度,又能让谈判气氛融洽,为后面的发挥留足空间。...

面试:第十六章:Java中级开发

HashMap底层实现原理,红黑树,B+树,B树的结构原理 Spring的AOP和IOC是什么?它们常见的使用场景有哪些?Spring事务,事务的属性,传播行为,数据库隔离级别 Spring和SpringMVC,MyBatis以及SpringBoot的注解分别有哪些?SpringMVC的工作原理,SpringBoot框架的优点,MyBatis框架的优点 SpringCould组件有哪些,他们...

面试阿里p7,被按在地上摩擦,鬼知道我经历了什么?

面试阿里p7被问到的问题(当时我只知道第一个):@Conditional是做什么的?@Conditional多个条件是什么逻辑关系?条件判断在什么时候执...

无代码时代来临,程序员如何保住饭碗?

编程语言层出不穷,从最初的机器语言到如今2500种以上的高级语言,程序员们大呼“学到头秃”。程序员一边面临编程语言不断推陈出新,一边面临由于许多代码已存在,程序员编写新应用程序时存在重复“搬砖”的现象。 无代码/低代码编程应运而生。无代码/低代码是一种创建应用的方法,它可以让开发者使用最少的编码知识来快速开发应用程序。开发者通过图形界面中,可视化建模来组装和配置应用程序。这样一来,开发者直...

面试了一个 31 岁程序员,让我有所触动,30岁以上的程序员该何去何从?

最近面试了一个31岁8年经验的程序猿,让我有点感慨,大龄程序猿该何去何从。

大三实习生,字节跳动面经分享,已拿Offer

说实话,自己的算法,我一个不会,太难了吧

程序员垃圾简历长什么样?

已经连续五年参加大厂校招、社招的技术面试工作,简历看的不下于万份 这篇文章会用实例告诉你,什么是差的程序员简历! 疫情快要结束了,各个公司也都开始春招了,作为即将红遍大江南北的新晋UP主,那当然要为小伙伴们做点事(手动狗头)。 就在公众号里公开征简历,义务帮大家看,并一一点评。《启舰:春招在即,义务帮大家看看简历吧》 一石激起千层浪,三天收到两百多封简历。 花光了两个星期的所有空闲时...

《Oracle Java SE编程自学与面试指南》最佳学习路线图2020年最新版(进大厂必备)

正确选择比瞎努力更重要!

字节跳动面试官竟然问了我JDBC?

轻松等回家通知

面试官:你连SSO都不懂,就别来面试了

大厂竟然要考我SSO,卧槽。

实时更新:计算机编程语言排行榜—TIOBE世界编程语言排行榜(2020年6月份最新版)

内容导航: 1、TIOBE排行榜 2、总榜(2020年6月份) 3、本月前三名 3.1、C 3.2、Java 3.3、Python 4、学习路线图 5、参考地址 1、TIOBE排行榜 TIOBE排行榜是根据全世界互联网上有经验的程序员、课程和第三方厂商的数量,并使用搜索引擎(如Google、Bing、Yahoo!)以及Wikipedia、Amazon、YouTube统计出排名数据。

立即提问
相关内容推荐