NetBeans在tomcat上部署应用程序时出现HTTP错误5

NetBeans在tomcat上部署应用程序时出现HTTP错误5

本文介绍了从NetBeans在tomcat上部署应用程序时出现HTTP错误503?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在MacBook上将NetBeans从7.3更新为7.4.
在更新之前,一切工作正常,但是在安装NetBeans 7.4之后,当我尝试在tomcat上部署Web应用程序时,出现了以下错误:

I updated NetBeans from 7.3 to 7.4 on my MacBook.
Before updating, everything was working fine, but after installing NetBeans 7.4, when i tried to deploy a web application on tomcat, it gave me following error:

ant -f "/Volumes/DEVELOPMENT/Projects/Order Mapper/Swan/Server/Swan" "-Dbrowser.context=/Volumes/DEVELOPMENT/Projects/Order Mapper/Swan/Server/Swan" -DforceRedeploy=false -Ddirectory.deployment.supported=true -Dnb.wait.for.caches=true -Dnb.internal.action.name=run run
init:
deps-module-jar:
deps-ear-jar:
deps-jar:
library-inclusion-in-archive:
library-inclusion-in-manifest:
compile:
compile-jsps:
Starting Tomcat process...
Waiting for Tomcat...
Tomcat server started.
In-place deployment at /Volumes/DEVELOPMENT/Projects/Order Mapper/Swan/Server/Swan/build/web
Deployment is in progress...
deploy?config=file%3A%2Fvar%2Ftmp%2Fcontext7415672549510654952.xml&path=/Swan
Server returned HTTP response code: 503 for URL: http://localhost:8084/manager/text/deploy?config=file%3A%2Fvar%2Ftmp%2Fcontext7415672549510654952.xml&path=/Swan
/Volumes/DEVELOPMENT/Projects/Order Mapper/Swan/Server/Swan/nbproject/build-impl.xml:1087: The module has not been deployed.
See the server log for details.

下面是build-impl.xmlline 1087处的代码:

<nbdeploy clientUrlPart="${client.urlPart}" debugmode="false" forceRedeploy="${forceRedeploy}"/>

当我看到服务器日志时,什么都没有!但是我在localhost_access_log文件中看到了以下内容:

When i saw the server log, nothing was available! But I see following in localhost_access_log file:

127.0.0.1 - - [15/Jan/2014:17:21:48 +0500] "HEAD /netbeans-tomcat-status-test HTTP/1.1" 404 -
127.0.0.1 - - [15/Jan/2014:17:21:48 +0500] "HEAD /netbeans-tomcat-status-test HTTP/1.1" 404 -
127.0.0.1 - - [15/Jan/2014:17:21:49 +0500] "HEAD /netbeans-tomcat-status-test HTTP/1.1" 404 -

任何帮助将不胜感激.提前致谢!

Any help will be appreciated. Thanks in advance!

修改:
以下是尝试在tomcat

Edit:
Below is the IDE Log when trying to deploy application on tomcat

INFO [org.netbeans.modules.tomcat5.TomcatManagerImpl]: TomcatManagerImpl connecting to: http://localhost:8084/manager/text/deploy?config=file%3A%2Fvar%2Ffolders%2Fvv%2Fdsk5zwq114j5hgp2k6hq9plr0000gn%2FT%2Fcontext4112527509427233412.xml&path=/Swan
java.io.IOException: Server returned HTTP response code: 503 for URL: http://localhost:8084/manager/text/deploy?config=file%3A%2Fvar%2Ffolders%2Fvv%2Fdsk5zwq114j5hgp2k6hq9plr0000gn%2FT%2Fcontext4112527509427233412.xml&path=/Swan
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1626)
    at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
    at org.netbeans.modules.tomcat5.TomcatManagerImpl.run(TomcatManagerImpl.java:561)
Caused: java.io.IOException: Server returned HTTP response code: 503 for URL: http://localhost:8084/manager/text/deploy?config=file%3A%2Fvar%2Ffolders%2Fvv%2Fdsk5zwq114j5hgp2k6hq9plr0000gn%2FT%2Fcontext4112527509427233412.xml&path=/Swan
    at sun.reflect.GeneratedConstructorAccessor81.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1675)
    at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1673)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1671)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1244)
[catch] at org.netbeans.modules.tomcat5.TomcatManagerImpl.run(TomcatManagerImpl.java:596)
    at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1432)
    at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2042)
INFO [org.netbeans.modules.j2ee.deployment.impl.TargetServer]: Cannot incrementally deploy to more than one target
INFO [org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment]
The module has not been deployed.
See the server log for details.
[catch] at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:238)
    at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:161)
    at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:111)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
    at sun.reflect.GeneratedMethodAccessor176.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:435)
    at org.apache.tools.ant.Target.performTasks(Target.java:456)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
    at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:283)
    at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:541)
    at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
INFO [org.netbeans.modules.tomcat5.TomcatManagerImpl]: TomcatManagerImpl connecting to: http://localhost:8084/manager/text/list
java.io.IOException: Server returned HTTP response code: 503 for URL: http://localhost:8084/manager/text/list
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1626)
    at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
    at org.netbeans.modules.tomcat5.TomcatManagerImpl.run(TomcatManagerImpl.java:561)
Caused: java.io.IOException: Server returned HTTP response code: 503 for URL: http://localhost:8084/manager/text/list
    at sun.reflect.GeneratedConstructorAccessor81.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1675)
    at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1673)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1671)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1244)
[catch] at org.netbeans.modules.tomcat5.TomcatManagerImpl.run(TomcatManagerImpl.java:596)
    at org.netbeans.modules.tomcat5.TomcatManagerImpl.list(TomcatManagerImpl.java:394)
    at org.netbeans.modules.tomcat5.TomcatManager.modules(TomcatManager.java:649)
    at org.netbeans.modules.tomcat5.TomcatManager.getAvailableModules(TomcatManager.java:460)
    at org.netbeans.modules.j2ee.deployment.impl.TargetServer.getAvailableTMIDsMap(TargetServer.java:420)
    at org.netbeans.modules.j2ee.deployment.impl.TargetServer.processLastTargetModules(TargetServer.java:457)
    at org.netbeans.modules.j2ee.deployment.impl.TargetServer.init(TargetServer.java:172)
    at org.netbeans.modules.j2ee.deployment.impl.TargetServer.deploy(TargetServer.java:607)
    at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:225)
    at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:161)
    at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:111)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
    at sun.reflect.GeneratedMethodAccessor176.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:435)
    at org.apache.tools.ant.Target.performTasks(Target.java:456)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
    at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:283)
    at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:541)
    at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
INFO [org.netbeans.modules.tomcat5.TomcatManagerImpl]: TomcatManagerImpl connecting to: http://localhost:8084/manager/text/list
java.io.IOException: Server returned HTTP response code: 503 for URL: http://localhost:8084/manager/text/list
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1626)
    at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
    at org.netbeans.modules.tomcat5.TomcatManagerImpl.run(TomcatManagerImpl.java:561)
Caused: java.io.IOException: Server returned HTTP response code: 503 for URL: http://localhost:8084/manager/text/list
    at sun.reflect.GeneratedConstructorAccessor81.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1675)
    at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1673)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1671)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1244)
[catch] at org.netbeans.modules.tomcat5.TomcatManagerImpl.run(TomcatManagerImpl.java:596)
    at org.netbeans.modules.tomcat5.TomcatManagerImpl.list(TomcatManagerImpl.java:394)
    at org.netbeans.modules.tomcat5.TomcatManager.modules(TomcatManager.java:649)
    at org.netbeans.modules.tomcat5.TomcatManager.getAvailableModules(TomcatManager.java:460)
    at org.netbeans.modules.tomcat5.ide.TMIDResolver.lookupTargetModuleID(TMIDResolver.java:81)
    at org.netbeans.modules.j2ee.deployment.impl.TargetServer.checkUndeployForSharedReferences(TargetServer.java:351)
    at org.netbeans.modules.j2ee.deployment.impl.TargetServer.checkUndeployForSharedReferences(TargetServer.java:324)
    at org.netbeans.modules.j2ee.deployment.impl.TargetServer.processLastTargetModules(TargetServer.java:496)
    at org.netbeans.modules.j2ee.deployment.impl.TargetServer.init(TargetServer.java:172)
    at org.netbeans.modules.j2ee.deployment.impl.TargetServer.deploy(TargetServer.java:607)
    at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:225)
    at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:161)
    at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:111)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
    at sun.reflect.GeneratedMethodAccessor176.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:435)
    at org.apache.tools.ant.Target.performTasks(Target.java:456)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
    at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:283)
    at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:541)
    at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
INFO [org.netbeans.modules.tomcat5.TomcatManagerImpl]: TomcatManagerImpl connecting to: http://localhost:8084/manager/text/deploy?config=file%3A%2Fvar%2Ffolders%2Fvv%2Fdsk5zwq114j5hgp2k6hq9plr0000gn%2FT%2Fcontext4761508169495242621.xml&path=/Swan
java.io.IOException: Server returned HTTP response code: 503 for URL: http://localhost:8084/manager/text/deploy?config=file%3A%2Fvar%2Ffolders%2Fvv%2Fdsk5zwq114j5hgp2k6hq9plr0000gn%2FT%2Fcontext4761508169495242621.xml&path=/Swan
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1626)
    at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
    at org.netbeans.modules.tomcat5.TomcatManagerImpl.run(TomcatManagerImpl.java:561)
Caused: java.io.IOException: Server returned HTTP response code: 503 for URL: http://localhost:8084/manager/text/deploy?config=file%3A%2Fvar%2Ffolders%2Fvv%2Fdsk5zwq114j5hgp2k6hq9plr0000gn%2FT%2Fcontext4761508169495242621.xml&path=/Swan
    at sun.reflect.GeneratedConstructorAccessor81.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1675)
    at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1673)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1671)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1244)
[catch] at org.netbeans.modules.tomcat5.TomcatManagerImpl.run(TomcatManagerImpl.java:596)
    at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1432)
    at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2042)
INFO [org.netbeans.modules.j2ee.deployment.impl.TargetServer]: Cannot incrementally deploy to more than one target
INFO [org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment]
The module has not been deployed.
See the server log for details.
[catch] at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:238)
    at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:161)
    at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:111)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
    at sun.reflect.GeneratedMethodAccessor176.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:435)
    at org.apache.tools.ant.Target.performTasks(Target.java:456)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
    at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:283)
    at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:541)
    at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)

推荐答案

经过将近2天的研究,我终于使它正常工作了!
我似乎是由于代理设置而引起的问题!
我的办公室网络已被代理,并且Netbeans'代理设置设置为:Use System Proxy Settings
但是,当我将其设置为No Proxy时,它便开始正常工作,并且我能够直接从NetBeanstomcat上部署Web应用程序!

After almost 2 days of research, i finally get it working!
I seems like the problem was due to the proxy settings!
My office network is proxied and Netbeans' proxy settings were set to: Use System Proxy Settings
But when i set it to No Proxy, it started working normally and i was able to deploy web applications on tomcat directly from NetBeans!

这篇关于从NetBeans在tomcat上部署应用程序时出现HTTP错误503?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-27 09:55