我尝试将war文件部署到tomcat中。我尝试通过IDE IDEA和tomcat上的管理器进行部署,但它不起作用。在日志中我可以看到theese的行并没有错误:(请问你能帮忙吗?
catalina.out中
/home/user/OPT/tomcat/bin/catalina.sh run
Using CATALINA_BASE: /home/user/.IntelliJIdea14/system/tomcat/Unnamed_webapp
Using CATALINA_HOME: /home/user/OPT/tomcat
Using CATALINA_TMPDIR: /home/user/OPT/tomcat/temp
Using JRE_HOME: /usr/lib/jvm/java-7-oracle
Using CLASSPATH: /home/user/OPT/tomcat/bin/bootstrap.jar:/home/user/OPT/tomcat/bin/tomcat-juli.jar
[2015-05-13 08:28:48,166] Artifact core:war exploded: Server is not connected. Deploy is not available.
V 13, 2015 8:28:49 DOP. org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /opt/IDEA/bin::/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
V 13, 2015 8:28:50 DOP. org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
V 13, 2015 8:28:50 DOP. org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
V 13, 2015 8:28:50 DOP. org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1654 ms
V 13, 2015 8:28:50 DOP. org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
V 13, 2015 8:28:50 DOP. org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.47
V 13, 2015 8:28:50 DOP. org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
V 13, 2015 8:28:50 DOP. org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
V 13, 2015 8:28:50 DOP. org.apache.catalina.startup.Catalina start
INFO: Server startup in 131 ms
Connected to server
[2015-05-13 08:28:50,816] Artifact core:war exploded: Artifact is being deployed, please wait...
V 13, 2015 8:28:51 DOP. org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(/home/user/WORKSPACE/whatACore/target/core/WEB-INF/lib/tomcat-embed-core-7.0.54.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
V 13, 2015 8:28:51 DOP. org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(/home/user/WORKSPACE/whatACore/target/core/WEB-INF/lib/tomcat-embed-el-7.0.54.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/el/Expression.class
V 13, 2015 8:29:00 DOP. org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /home/user/OPT/tomcat/webapps/manager
问题在于MyBatis,当你在select子句中出错并使用resultType而不是resultMap时,你可以构建war文件,但是应用程序永远不会启动并且不会显示错误:/
答案 0 :(得分:0)
请参阅最佳方法是首先创建war文件,然后将其部署在Tomcat-> webapps文件夹中。您是否成功创建了war文件?