aspose file tools*
The moose likes Tomcat and the fly likes Module Cannot be Deployed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Module Cannot be Deployed" Watch "Module Cannot be Deployed" New topic
Author

Module Cannot be Deployed

Pratik D mehta
Ranch Hand

Joined: Jul 29, 2010
Posts: 121

Hello ,
I am using Netbeans 6.9.1 , Tomcat 6.0 , Ubuntu Linux .
I basically created a WebApplication project from the netbeans Ide By selecting New Project Command and took the workspace as /usr/local/WebApplication/
Also my Tomcat server is in /usr/local/tomcat
and than added Server from tools menu -- >Servers as Tomcat 6.0
Than i ran the application from the ide which should open the browser and display Hello World ! in the file named index.jsp which is the default file .

But I am getting
In-place deployment at /usr/local/WebApplication/EmailApplication/build/web
/usr/local/WebApplication/EmailApplication/build/web/META-INF/context.xml (No such file or directory)
/usr/local/WebApplication/EmailApplication/nbproject/build-impl.xml:683: The module has not been deployed.
BUILD FAILED

This is the the Tomcat 6.0 error
28 Jan, 2011 11:37:06 AM org.apache.catalina.session.StandardManager doUnload
SEVERE: IOException while saving persisted sessions: java.io.FileNotFoundException: /usr/local/tomcat/work/Catalina/localhost/EmailApp/SESSIONS.ser (Permission denied)
java.io.FileNotFoundException: /usr/local/tomcat/work/Catalina/localhost/EmailApp/SESSIONS.ser (Permission denied)

at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
at java.io.FileOutputStream.<init>(FileOutputStream.java:70)
at org.apache.catalina.session.StandardManager.doUnload(StandardManager.java:495)
at org.apache.catalina.session.StandardManager.unload(StandardManager.java:469)
at org.apache.catalina.session.StandardManager.stop(StandardManager.java:673)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4774)
at org.apache.catalina.manager.ManagerServlet.undeploy(ManagerServlet.java:1390)
at org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:382)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:563)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:662)
28 Jan, 2011 11:37:06 AM org.apache.catalina.session.StandardManager stop
SEVERE: Exception unloading sessions to persistent storage
java.io.FileNotFoundException: /usr/local/tomcat/work/Catalina/localhost/EmailApp/SESSIONS.ser (Permission denied)

at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
at java.io.FileOutputStream.<init>(FileOutputStream.java:70)
at org.apache.catalina.session.StandardManager.doUnload(StandardManager.java:495)
at org.apache.catalina.session.StandardManager.unload(StandardManager.java:469)
at org.apache.catalina.session.StandardManager.stop(StandardManager.java:673)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4774)
at org.apache.catalina.manager.ManagerServlet.undeploy(ManagerServlet.java:1390)
at org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:382)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:563)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:662)
java.io.FileNotFoundException: /usr/local/tomcat/conf/Catalina/localhost/EmailApp.xml (Permission denied)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
at org.apache.catalina.manager.ManagerServlet.copyInternal(ManagerServlet.java:1672)
at org.apache.catalina.manager.ManagerServlet.copy(ManagerServlet.java:1632)
at org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:836)
at org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:351)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:563)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:662)
28 Jan, 2011 11:37:06 AM org.apache.catalina.startup.HostConfig checkResources
INFO: Undeploying context [/EmailApp]
28 Jan, 2011 11:37:06 AM org.apache.catalina.startup.ExpandWar deleteDir
SEVERE: [/usr/local/tomcat/work/Catalina/localhost/EmailApp/org/apache/jsp] could not be completely deleted. The presence of the remaining files may cause problems
28 Jan, 2011 11:37:06 AM org.apache.catalina.startup.ExpandWar deleteDir
SEVERE: [/usr/local/tomcat/work/Catalina/localhost/EmailApp/org/apache] could not be completely deleted. The presence of the remaining files may cause problems
28 Jan, 2011 11:37:06 AM org.apache.catalina.startup.ExpandWar deleteDir
SEVERE: [/usr/local/tomcat/work/Catalina/localhost/EmailApp/org] could not be completely deleted. The presence of the remaining files may cause problems
28 Jan, 2011 11:37:06 AM org.apache.catalina.startup.ExpandWar deleteDir
SEVERE: [/usr/local/tomcat/work/Catalina/localhost/EmailApp] could not be completely deleted. The presence of the remaining files may cause problems
28 Jan, 2011 11:37:06 AM org.apache.catalina.startup.ExpandWar delete
SEVERE: [/usr/local/tomcat/work/Catalina/localhost/EmailApp] could not be completely deleted. The presence of the remaining files may cause problems
java.io.FileNotFoundException: /usr/local/tomcat/conf/Catalina/localhost/EmailApp.xml (Permission denied)

at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
at org.apache.catalina.manager.ManagerServlet.copyInternal(ManagerServlet.java:1672)
at org.apache.catalina.manager.ManagerServlet.copy(ManagerServlet.java:1632)
at org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:836)
at org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:351)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:563)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:662)
java.io.FileNotFoundException: /usr/local/tomcat/conf/Catalina/localhost/EmailApp.xml (Permission denied)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
at org.apache.catalina.manager.ManagerServlet.copyInternal(ManagerServlet.java:1672)
at org.apache.catalina.manager.ManagerServlet.copy(ManagerServlet.java:1632)
at org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:836)
at org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:351)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:563)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:662)
java.io.FileNotFoundException: /usr/local/tomcat/conf/Catalina/localhost/EmailApp.xml (Permission denied)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
at org.apache.catalina.manager.ManagerServlet.copyInternal(ManagerServlet.java:1672)
at org.apache.catalina.manager.ManagerServlet.copy(ManagerServlet.java:1632)
at org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:836)
at org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:351)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:563)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:662)

Awating Help .
Thanks

Understanding is Everything - Peter Lord
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16250
    
  21


SEVERE: [/usr/local/tomcat/work/Catalina/localhost/EmailApp] could not be completely deleted. The presence of the remaining files may cause problems
java.io.FileNotFoundException: /usr/local/tomcat/conf/Catalina/localhost/EmailApp.xml (Permission denied)


This sounds like you're attempting to run the Tomcat server under your user login. That's fine, but if you're using a copy of Tomcat that's under the /usr/local directory tree instead of one of your own directories, it's very likely that your user account doesn't have write access to critical Tomcat directories such as the work, temp, and log directories.

To avoid that problem, you either need your own copy of Tomcat or you need to run Tomcat under its proper user account, which is generally either root or (preferably) a dedicated Tomcat account.

To run Tomcat as root, the "sudo" command can be used to launch it. If you have an actual Tomcat account - and I think this is the standard approach in Ubuntu - you will probably also have a system initscript that manages things. The initscript itself, however, needs to be run under root privileges ("sudo /etc/init.d/tomcat start", for example).


Customer surveys are for companies who didn't pay proper attention to begin with.
Pratik D mehta
Ranch Hand

Joined: Jul 29, 2010
Posts: 121

Thank you Tim Holloway
Yes I logged in as root user and it worked.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Module Cannot be Deployed