Я пытаюсь реализовать свое приложение для голосования на веб-сервере tomcat и изменил свой файл context.xml, но безрезультатно, так какой же код по умолчанию для context.xml? Я попытался удалить файл и перезапустить NetBeans, но возникла та же проблема ... Вот вывод моей ошибки context.xml:
компилировать-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)
Так что мне делать ??
Это для моей школы, я работаю над проектом веб-приложения для опроса опросов ... Я работаю с 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)