tomcat启动报错

tomcat启动报错

"F:\Java\Java\Tomcat 1.8\apache-tomcat-8.0.30\bin\catalina.bat" run

[2018-04-17 05:46:00,424] Artifact shopmgr:war exploded: Waiting for server connection to start artifact deployment...

Using CATALINA_BASE:   "C:\Users\Administrator\.IntelliJIdea2017.3\system\tomcat\Unnamed_shopmgr_2"

Using CATALINA_HOME:   "F:\Java\Java\Tomcat 1.8\apache-tomcat-8.0.30"

Using CATALINA_TMPDIR: "F:\Java\Java\Tomcat 1.8\apache-tomcat-8.0.30\temp"

Using JRE_HOME:        "D:\JDK\8"

Using CLASSPATH:       "F:\Java\Java\Tomcat 1.8\apache-tomcat-8.0.30\bin\bootstrap.jar;F:\Java\Java\Tomcat 1.8\apache-tomcat-8.0.30\bin\tomcat-juli.jar"

17-Apr-2018 17:46:01.606 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version:        Apache Tomcat/8.0.30

17-Apr-2018 17:46:01.608 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Dec 1 2015 22:30:46 UTC

17-Apr-2018 17:46:01.608 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number:         8.0.30.0

17-Apr-2018 17:46:01.608 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Windows 7

17-Apr-2018 17:46:01.609 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            6.1

17-Apr-2018 17:46:01.609 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          amd64

17-Apr-2018 17:46:01.609 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             D:\JDK\8\jre

17-Apr-2018 17:46:01.609 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           1.8.0_162-b12

17-Apr-2018 17:46:01.609 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Oracle Corporation

17-Apr-2018 17:46:01.609 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         C:\Users\Administrator\.IntelliJIdea2017.3\system\tomcat\Unnamed_shopmgr_2

17-Apr-2018 17:46:01.610 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         F:\Java\Java\Tomcat 1.8\apache-tomcat-8.0.30

17-Apr-2018 17:46:01.610 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote=

17-Apr-2018 17:46:01.610 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.port=1099

17-Apr-2018 17:46:01.611 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.ssl=false

17-Apr-2018 17:46:01.611 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.authenticate=false

17-Apr-2018 17:46:01.611 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.rmi.server.hostname=127.0.0.1

17-Apr-2018 17:46:01.611 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=C:\Users\Administrator\.IntelliJIdea2017.3\system\tomcat\Unnamed_shopmgr_2\conf\logging.properties

17-Apr-2018 17:46:01.611 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager

17-Apr-2018 17:46:01.611 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.endorsed.dirs=F:\Java\Java\Tomcat 1.8\apache-tomcat-8.0.30\endorsed

17-Apr-2018 17:46:01.611 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=C:\Users\Administrator\.IntelliJIdea2017.3\system\tomcat\Unnamed_shopmgr_2

17-Apr-2018 17:46:01.612 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=F:\Java\Java\Tomcat 1.8\apache-tomcat-8.0.30

17-Apr-2018 17:46:01.612 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=F:\Java\Java\Tomcat 1.8\apache-tomcat-8.0.30\temp

17-Apr-2018 17:46:01.612 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library 1.1.33 using APR version 1.5.1.

17-Apr-2018 17:46:01.612 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].

17-Apr-2018 17:46:02.689 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized (OpenSSL 1.0.1m 19 Mar 2015)

17-Apr-2018 17:46:02.868 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-apr-8080"]

17-Apr-2018 17:46:02.879 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-apr-8009"]

17-Apr-2018 17:46:02.881 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 1740 ms

17-Apr-2018 17:46:02.920 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina

17-Apr-2018 17:46:02.921 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.30

17-Apr-2018 17:46:02.933 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-apr-8080"]

17-Apr-2018 17:46:02.943 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-apr-8009"]

17-Apr-2018 17:46:02.944 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 62 ms

Connected to server

[2018-04-17 05:46:03,135] Artifact shopmgr:war exploded: Artifact is being deployed, please wait...

17-Apr-2018 17:46:05.110 INFO [RMI TCP Connection(3)-127.0.0.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.

log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).

log4j:WARN Please initialize the log4j system properly.

log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

17-Apr-2018 17:46:05.879 SEVERE [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file

17-Apr-2018 17:46:05.882 SEVERE [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal Context [/shopmgr] startup failed due to previous errors

[2018-04-17 05:46:05,910] Artifact shopmgr:war exploded: Error during artifact deployment. See server log for details.

17-Apr-2018 17:46:12.936 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory F:\Java\Java\Tomcat 1.8\apache-tomcat-8.0.30\webapps\manager

17-Apr-2018 17:46:13.002 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory F:\Java\Java\Tomcat 1.8\apache-tomcat-8.0.30\webapps\manager has finished in 65 ms

"F:\Java\Java\Tomcat 1.8\apache-tomcat-8.0.30\bin\catalina.bat" stop

Using CATALINA_BASE:   "C:\Users\Administrator\.IntelliJIdea2017.3\system\tomcat\Unnamed_shopmgr_2"

Using CATALINA_HOME:   "F:\Java\Java\Tomcat 1.8\apache-tomcat-8.0.30"

Using CATALINA_TMPDIR: "F:\Java\Java\Tomcat 1.8\apache-tomcat-8.0.30\temp"

Using JRE_HOME:        "D:\JDK\8"

Using CLASSPATH:       "F:\Java\Java\Tomcat 1.8\apache-tomcat-8.0.30\bin\bootstrap.jar;F:\Java\Java\Tomcat 1.8\apache-tomcat-8.0.30\bin\tomcat-juli.jar"

17-Apr-2018 17:49:08.288 INFO [main] org.apache.catalina.core.StandardServer.await A valid shutdown command was received via the shutdown port. Stopping the Server instance.

17-Apr-2018 17:49:08.289 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-apr-8080"]

17-Apr-2018 17:49:08.346 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["ajp-apr-8009"]

17-Apr-2018 17:49:08.396 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service Catalina

17-Apr-2018 17:49:08.408 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-apr-8080"]

17-Apr-2018 17:49:08.458 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["ajp-apr-8009"]

17-Apr-2018 17:49:08.508 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-apr-8080"]

17-Apr-2018 17:49:08.509 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["ajp-apr-8009"]

Disconnected from server

怎么解决啊,开始单独运行可以正常显示默认页面

正在回答

登陆购买课程后可参与讨论,去登陆

3回答

同学,看你的日志信息也没有报错提示呀。你的问题是什么呢?

建议同学针对你的问题配合截图进行清晰的描述,方便帮助你解答问题。

祝学习愉快!

  • 奶茶三兄弟d 提问者 #1
    tomcat启动失败啊,
    2018-04-17 18:34:00
  • 一叶知秋519 回复 提问者 奶茶三兄弟d #2
    你检查一下IDEA界面右上角的Tomcat,看下是不是Tomcat内没有发布war包。
    2018-04-17 18:56:52
  • 奶茶三兄弟d 提问者 回复 一叶知秋519 #3
    解决了,麻烦老师了,还是我的配置文件不正确,mapper里面的映射文件的命名空间写错了,所以加载出现错误,
    2018-04-17 21:40:48
提问者 奶茶三兄弟d 2018-04-17 19:42:04

跟着老师的步骤.一开始是可以正常启动的,配置相关文件后,就不可以了,报这个错
http://img1.sycdn.imooc.com//climg/5ad5da6e0001ff4e08970215.jpg


配置文件也没有什么问题啊


<?xml version="1.0" encoding="utf-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:p="http://www.springframework.org/schema/p"
      xmlns:c="http://www.springframework.org/schema/c"
      xmlns:tx="http://www.springframework.org/schema/tx"
      xmlns:aop="http://www.springframework.org/schema/aop"
      xmlns:context="http://www.springframework.org/schema/context"
      xmlns:util="http://www.springframework.org/schema/util"
      xsi:schemaLocation="http://www.springframework.org/schema/beans
                 http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
                 http://www.springframework.org/schema/tx
                 http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
                 http://www.springframework.org/schema/context
                 http://www.springframework.org/schema/context/spring-context-4.0.xsd
                 ">

   <!-- 配置扫描器  帮助我们去扫描一些组件的标注的注解  开启注解-->
   <context:component-scan base-package="com.imooc.shop" />

   <!-- 配置数据源  C3p0为配置的数据源  这个数据源,需要加载C3P0的数据配置文件, 默认在classpath路径下s-->
   <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"></bean>
   <!-- 有了数据源后, 就需要配置链接工厂了
       那么这里的话是Spring+Mybatis的整合的
   -->
   <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
      <!-- 链接工厂的话需要数据源  引用数据源-->
       <property name="dataSource" ref="dataSource"></property>
       <!-- 扫描entity包 使用别名,一一对应数据库里面的表 -默认配置的别名就是类名 -->
       <property name="typeAliases" value="com.imooc.shop.bean"></property>
       
   </bean>

   <!-- 配置扫描数据访问层接口的路径 为数据库访问层接口的路径做实现类对象 这是Mybatis框架给我们的做的事情
      为数据访问层的接口去做实现类的对象
   -->

   <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">

       <!-- 映射扫描配置 :告诉接口在哪里 -->
     <property name="basePackage" value="com.imooc.shop.repository"/>
   </bean>

       <!-- 配置事务的管理 -->
       <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">

           <!-- 数据源交给事务管理器 -->
           <property name="dataSource" ref="dataSource"/>

           <!-- 声明式的事务,使用事务注解的方式去管理业务层的事务  表示使用的这个事务的管理器-->
           <tx:annotation-driven  transaction-manager="transactionManager"/>
       </bean>

</beans>


# 配置数据库的链接地址
# 配置数据库的驱动
# 所有的配置属性必须以c3p0开始,这样才可以加载
c3p0.driverClass=com.mysql.jdbc.Driver
c3p0.Url=jdbc:mysql://localhost:3306/imoocdb
c3p0.user=root
c3p0.password=root
c3p0.maxPoolSize=20
c3p0.minPoolSize=2
c3p0.initPoolSize=2
c3p0.maxIdleTime=60

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
       PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
       "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.imooc.shopping.mapper.ArticleTypeMapper">


</mapper>


<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd" >

<web-app>
 <display-name>Archetype Created Web Application</display-name>
 
 <!-- 配置spring的监听器   当容器加载的时候就可以监听到-->
 <!-- 提取spring 的配置文件 -->
 <context-param>
   <param-name>contextConfigLocation</param-name>
   <param-value>classpath:spring/application*.xml</param-value>
 </context-param>
 <listener>
   <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
 </listener>
</web-app>

喜欢做梦的鱼 2018-04-17 18:56:05

1、如果新建一个空项目,直接启动tomcat并部署启动,是否正常

2、如果1正常,检查一下,项目中各个配置文件的配置信息是否正常

问题已解决,确定采纳
还有疑问,暂不采纳

恭喜解决一个难题,获得1积分~

来为老师/同学的回答评分吧

0 星
SSM主流框架入门与综合项目实战2018版
  • 参与学习           人
  • 提交作业       205    份
  • 解答问题       4317    个

Java中非常实用的SSM整合开发内容,从Spring开始,到MyBaits的进阶内容,再到SpringMVC的应用,最后是SSM整合开发案例,逐步深入,助你成长为一名Java工程师!

了解课程
请稍等 ...
意见反馈 帮助中心 APP下载
官方微信

在线咨询

领取优惠

免费试听

领取大纲

扫描二维码,添加
你的专属老师