无法在Netbeans中的Tomcat服务器上部署webapp

时间:2015-06-22 04:33:08

标签: java tomcat netbeans localhost

server.xml中

<Connector URIEncoding="utf-8" connectionTimeout="20000" port="8084" protocol="HTTP/1.1"
 redirectPort="8443"/>

每当我试图运行我的项目时,它会将其重定向到我的lan ip地址,从而导致部署失败。请参阅下文。

enter image description here

服务器日志

The system cannot find the file specified.
The system cannot find the file specified.
Using CATALINA_BASE:   "C:\Users\xxxxxx\AppData\Roaming\NetBeans\8.0.2\apache-tomcat-8.0.15.0_base"
Using CATALINA_HOME:   "C:\Program Files\Apache Software Foundation\Apache Tomcat 8.0.15"
Using CATALINA_TMPDIR: "C:\Users\xxxxxx\AppData\Roaming\NetBeans\8.0.2\apache-tomcat-8.0.15.0_base\temp"
Using JRE_HOME:        "C:\Program Files\Java\jdk1.8.0_45"
Using CLASSPATH:       "C:\Program Files\Apache Software Foundation\Apache Tomcat 8.0.15\bin\bootstrap.jar;C:\Program Files\Apache Software Foundation\Apache Tomcat 8.0.15\bin\tomcat-juli.jar"
Jun 22, 2015 9:49:11 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server version:        Apache Tomcat/8.0.15
Jun 22, 2015 9:49:11 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server built:          Nov 2 2014 19:25:20 UTC
Jun 22, 2015 9:49:11 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server number:         8.0.15.0
Jun 22, 2015 9:49:11 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Name:               Windows 7
Jun 22, 2015 9:49:11 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Version:            6.1
Jun 22, 2015 9:49:11 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Architecture:          amd64
Jun 22, 2015 9:49:11 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: JAVA_HOME:             C:\Program Files\Java\jdk1.8.0_45\jre
Jun 22, 2015 9:49:11 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Version:           1.8.0_45-b15
Jun 22, 2015 9:49:11 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Vendor:            Oracle Corporation
Jun 22, 2015 9:49:11 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_BASE:         C:\Users\xxxxxxx\AppData\Roaming\NetBeans\8.0.2\apache-tomcat-8.0.15.0_base
Jun 22, 2015 9:49:11 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_HOME:         C:\Program Files\Apache Software Foundation\Apache Tomcat 8.0.15
Jun 22, 2015 9:49:11 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dhttp.proxyHost=internet.xxx.xxx
Jun 22, 2015 9:49:11 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dhttp.proxyPort=80
Jun 22, 2015 9:49:11 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dhttp.nonProxyHosts=<local>
Jun 22, 2015 9:49:11 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dhttps.proxyHost=internet.xxxx.xxx
Jun 22, 2015 9:49:11 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dhttps.proxyPort=80
Jun 22, 2015 9:49:11 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.endorsed.dirs=C:\Program Files\Apache Software Foundation\Apache Tomcat 8.0.15\endorsed
Jun 22, 2015 9:49:11 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.base=C:\Users\xxxxxxx\AppData\Roaming\NetBeans\8.0.2\apache-tomcat-8.0.15.0_base
Jun 22, 2015 9:49:11 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.home=C:\Program Files\Apache Software Foundation\Apache Tomcat 8.0.15
Jun 22, 2015 9:49:11 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.io.tmpdir=C:\Users\xxxxxx\AppData\Roaming\NetBeans\8.0.2\apache-tomcat-8.0.15.0_base\temp
Jun 22, 2015 9:49:11 AM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.8.0_45\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\oraclexe\app\oracle\product\11.2.0\server\bin;;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\1E\NomadBranch\;C:\Program Files\Dell\Dell Data Protection\Encryption\;.
Jun 22, 2015 9:49:11 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-nio-127.0.0.1-8084"]
Jun 22, 2015 9:49:11 AM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
Jun 22, 2015 9:49:11 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-nio-8009"]
Jun 22, 2015 9:49:11 AM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
Jun 22, 2015 9:49:11 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 847 ms
Jun 22, 2015 9:49:11 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Jun 22, 2015 9:49:11 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/8.0.15
Jun 22, 2015 9:49:11 AM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor C:\Users\xxxxxxxxxx\AppData\Roaming\NetBeans\8.0.2\apache-tomcat-8.0.15.0_base\conf\Catalina\localhost\manager.xml
Jun 22, 2015 9:49:12 AM org.apache.jasper.servlet.TldScanner scanJars
INFO: 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.
Jun 22, 2015 9:49:12 AM org.apache.catalina.util.SessionIdGeneratorBase createSecureRandom
INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [203] milliseconds.
Jun 22, 2015 9:49:12 AM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deployment of configuration descriptor C:\Users\xxxxxxxxxxxx\AppData\Roaming\NetBeans\8.0.2\apache-tomcat-8.0.15.0_base\conf\Catalina\localhost\manager.xml has finished in 702 ms
Jun 22, 2015 9:49:12 AM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor C:\Users\xxxxxxxxxxx\AppData\Roaming\NetBeans\8.0.2\apache-tomcat-8.0.15.0_base\conf\Catalina\localhost\ROOT.xml
Jun 22, 2015 9:49:12 AM org.apache.jasper.servlet.TldScanner scanJars
INFO: 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.
Jun 22, 2015 9:49:12 AM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deployment of configuration descriptor C:\Users\xxxxxxxxxxx\AppData\Roaming\NetBeans\8.0.2\apache-tomcat-8.0.15.0_base\conf\Catalina\localhost\ROOT.xml has finished in 157 ms
Jun 22, 2015 9:49:12 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-nio-127.0.0.1-8084"]
Jun 22, 2015 9:49:12 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-nio-8009"]
Jun 22, 2015 9:49:12 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 934 ms

2 个答案:

答案 0 :(得分:3)

禁用Netbeans中的代理设置并重新启动Tomcat。

转到工具 - &gt;选项 - &gt;在“常规”下,选择 No Proxy - &gt;申请 - &gt;确定。

答案 1 :(得分:1)

如果您使用代理服务器,那么您可以在下面尝试,它适用于我。:)

Tools --> Options --> General

enter image description here

如果您不想使用,请选择无代理