如何解决:失败-在上下文路径[/ PollingApp]上部署了应用程序,但是上下文未能在Netbeans / Tomcat中启动错误?

时间:2019-03-27 21:17:27

标签: tomcat netbeans context.xml

我正在尝试将我的投票应用程序实现为tomcat Web服务器,并且我将context.xml文件BUT更改为无效,那么context.xml的默认代码是什么?我试图删除该文件并重新启动NetBeans,但是也发生了相同的问题...这是我的context.xml错误的输出:

compile-jsps: 逐步删除

ploying http://localhost:8080/PollingApp
Completed incremental distribution of http://localhost:8080/PollingApp
Incrementally redeploying http://localhost:8080/PollingApp
Deploy is in progress...
deploy?config=file%3A%2Fvar%2Ffolders%2F0s%2Fy4my3bp16s98bg06fngwr4t40000gn%2FT%2Fcontext1962805577261409935.xml&path=/PollingApp
FAIL - Deployed application at context path [/PollingApp] but context failed to start
/Users/fabiovreede/NetBeansProjects/PollingApp/nbproject/build-impl.xml:1048: The module has not been deployed.
See the server log for details.
BUILD FAILED (total time: 0 seconds)

那我该怎么办??

这是给我的学校使用的,我正在为一个调查民意测验应用程序开发一个Web应用程序项目...我正在将Apache Tomcat 9,MySQL 8.0.15和Netbeans 8.2与JSP一起使用,并且在更改了META-INF之后带有context.xml的文件夹,添加Resources方法,我收到有关无法部署到Tomcat的错误。

编辑添加的异常堆栈跟踪:

29-Mar-2019 19:26:05.134 SEVERE [main] org.apache.catalina.core.StandardContext.startInternal One or more components marked the context as not correctly configured
29-Mar-2019 19:26:05.134 SEVERE [main] org.apache.catalina.core.StandardContext.startInternal Context [/PollingApp] startup failed due to previous errors
29-Mar-2019 19:26:05.135 INFO [main] org.apache.catalina.startup.HostConfig.deployDescriptor Deployment of deployment descriptor [/usr/local/tomcat v9.0.17/conf/Catalina/localhost/PollingApp.xml] has finished in [3,870] ms
29-Mar-2019 19:26:05.135 INFO [main] org.apache.catalina.startup.HostConfig.deployDescriptor Deploying deployment descriptor [/usr/local/tomcat v9.0.17/conf/Catalina/localhost/ROOT.xml]
29-Mar-2019 19:26:05.183 WARNING [main] org.apache.catalina.startup.HostConfig.deployDescriptor The path attribute with value [] in deployment descriptor [/usr/local/tomcat v9.0.17/conf/Catalina/localhost/ROOT.xml] has been ignored
29-Mar-2019 19:26:05.186 WARNING [main] org.apache.catalina.webresources.DirResourceSet.initInternal Failed to read manifest from [/Users/USERNAME/NetBeansProjects/PollingApp/build/web/META-INF/MANIFEST.MF]
  java.io.IOException: invalid header field
    at java.util.jar.Attributes.read(Attributes.java:410)
    at java.util.jar.Manifest.read(Manifest.java:199)
    at java.util.jar.Manifest.<init>(Manifest.java:69)
    at org.apache.catalina.webresources.DirResourceSet.initInternal(DirResourceSet.java:272)
    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:173)
    at org.apache.catalina.webresources.StandardRoot.startInternal(StandardRoot.java:714)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4797)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4932)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:713)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:695)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:631)
    at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1832)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
    at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112)
    at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:526)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:425)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1577)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309)
    at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
    at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:424)
    at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:367)
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:929)
    at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:831)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1377)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1367)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
    at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:902)
    at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.core.StandardService.startInternal(StandardService.java:423)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:928)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:634)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:350)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492)

0 个答案:

没有答案