简体   繁体   中英

application deployment fails in tomcat server

When I try to Run my war file in netbeans with tomcat server, I get this error.

Tomcat server started.
In-place deployment at C:\Users\saeed\Documents\NetBeansProjects\GomrokProject\PoliceSmsCenter\target\PoliceSmsCenter-2.0-SNAPSHOT deploy?config=file%3A%2FC%3A%2FUsers%2Fsaeed%2FAppData%2FLocal%2FTemp%2Fcontext6847039033559451727.xml&path=/PoliceSmsCenter<br> http://localhost:8084/manager/text/deploy?config=file%3A%2FC%3A%2FUsers%2Fsaeed%2FAppData%2FLocal%2FTemp%2Fcontext6847039033559451727.xml&path=/PoliceSmsCenter"<br> The module has not been deployed.<br> See the server log for details.
at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:210)
at org.netbeans.modules.maven.j2ee.ExecutionChecker.performDeploy(ExecutionChecker.java:179)
at org.netbeans.modules.maven.j2ee.ExecutionChecker.executionResult(ExecutionChecker.java:131)
at org.netbeans.modules.maven.execute.MavenCommandLineExecutor.run(MavenCommandLineExecutor.java:211)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)

What could be the reason?

Try including following dependency in your pom file. Use <scope>provided</scope> to indicate that you need the artifact to compile, but not to have it in your war.

<dependency>
    <groupId>javax</groupId>
    <artifactId>javaee-api</artifactId>
    <version>6.0</version>
    <scope>provided</scope>
</dependency>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM