IDEA 运行 tomcat 报错,求帮助

来源:5-5 jdk、tomcat、maven配置及初始化web空白项目

慕勒2424959

2018-08-18

在命令行运行 tomcat 能正常打开: localhost:8080 ;

在IDEA 上报错:

/Library/ApacheTomcat/bin/catalina.sh run
NOTE: Picked up JDK_JAVA_OPTIONS:  --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
[2018-08-18 09:38:19,265] Artifact mmall: Waiting for server connection to start artifact deployment...
18-Aug-2018 09:38:20.768 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server version:        Apache Tomcat/8.5.32
18-Aug-2018 09:38:20.773 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Jun 20 2018 19:50:35 UTC
18-Aug-2018 09:38:20.774 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server number:         8.5.32.0
18-Aug-2018 09:38:20.774 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Mac OS X
18-Aug-2018 09:38:20.774 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            10.13.6
18-Aug-2018 09:38:20.774 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          x86_64
18-Aug-2018 09:38:20.775 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             /Library/Java/JavaVirtualMachines/jdk-10.0.2.jdk/Contents/Home
18-Aug-2018 09:38:20.775 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           10.0.2+13
18-Aug-2018 09:38:20.775 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            "Oracle Corporation"
18-Aug-2018 09:38:20.775 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         /Users/jssmac/Library/Caches/IntelliJIdea2017.3/tomcat/Unnamed_mmall
18-Aug-2018 09:38:20.775 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         /Library/ApacheTomcat
18-Aug-2018 09:38:20.778 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.lang=ALL-UNNAMED
18-Aug-2018 09:38:20.779 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.io=ALL-UNNAMED
18-Aug-2018 09:38:20.779 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
18-Aug-2018 09:38:20.779 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/Users/jssmac/Library/Caches/IntelliJIdea2017.3/tomcat/Unnamed_mmall/conf/logging.properties
18-Aug-2018 09:38:20.779 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
18-Aug-2018 09:38:20.779 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote=
18-Aug-2018 09:38:20.779 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.port=1099
18-Aug-2018 09:38:20.779 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.ssl=false
18-Aug-2018 09:38:20.780 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.authenticate=false
18-Aug-2018 09:38:20.780 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.rmi.server.hostname=127.0.0.1
18-Aug-2018 09:38:20.781 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
18-Aug-2018 09:38:20.781 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
18-Aug-2018 09:38:20.781 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
18-Aug-2018 09:38:20.781 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
18-Aug-2018 09:38:20.781 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/Users/jssmac/Library/Caches/IntelliJIdea2017.3/tomcat/Unnamed_mmall
18-Aug-2018 09:38:20.781 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/Library/ApacheTomcat
18-Aug-2018 09:38:20.781 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/Library/ApacheTomcat/temp
18-Aug-2018 09:38:20.781 信息 [main] 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: [/Users/jssmac/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.]
18-Aug-2018 09:38:20.828 信息 [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
18-Aug-2018 09:38:20.846 信息 [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
18-Aug-2018 09:38:20.853 信息 [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
18-Aug-2018 09:38:20.854 信息 [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
18-Aug-2018 09:38:20.855 信息 [main] org.apache.catalina.startup.Catalina.load Initialization processed in 624 ms
18-Aug-2018 09:38:20.912 信息 [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
18-Aug-2018 09:38:20.912 信息 [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.32
18-Aug-2018 09:38:20.923 信息 [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
18-Aug-2018 09:38:20.932 信息 [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
18-Aug-2018 09:38:20.934 信息 [main] org.apache.catalina.startup.Catalina.start Server startup in 78 ms
Connected to server
[2018-08-18 09:38:21,027] Artifact mmall: Artifact is being deployed, please wait...
[2018-08-18 09:38:21,042] Artifact mmall: Error during artifact deployment. See server log for details.
[2018-08-18 09:38:21,044] Artifact mmall: com.intellij.javaee.oss.admin.jmx.JmxAdminException: com.intellij.execution.ExecutionException: /Users/jssmac/IdeaProjects/mmall/out/artifacts/mmall/mmall.war not found for the web module.
18-Aug-2018 09:38:30.935 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/Library/ApacheTomcat/webapps/manager]
18-Aug-2018 09:38:31.187 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/Library/ApacheTomcat/webapps/manager] has finished in [252] ms


写回答

1回答

慕勒2424959

提问者

2018-08-18

搞定了!是我Artifacts 配置错了,详细步骤请见课程提供的【关于idea的tomcat没有artifact以及测试tomcat报404错误】:http://learning.happymmall.com/QQ%E5%AD%A6%E4%B9%A0%E7%BE%A4%E5%A4%A7%E5%AE%B6%E5%85%B1%E4%BA%AB%E7%9A%84useful%E6%96%87%E6%A1%A3/%E5%85%B3%E4%BA%8Eidea%E7%9A%84tomcat%E6%B2%A1%E6%9C%89artifact%E4%BB%A5%E5%8F%8A%E6%B5%8B%E8%AF%95tomcat%E6%8A%A5404%E9%94%99%E8%AF%AF.docx

1
0

从0开始 独立完成企业级Java电商网站服务端开发

前后端分离,数据库接口设计,架构设计,功能开发,上线运维

9476 学习 · 8804 问题

查看课程