File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes Problem while deploying Web Service on Tomcat (in netbeans) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Problem while deploying Web Service on Tomcat (in netbeans)" Watch "Problem while deploying Web Service on Tomcat (in netbeans)" New topic
Author

Problem while deploying Web Service on Tomcat (in netbeans)

Shivani Monga
Greenhorn

Joined: Dec 16, 2008
Posts: 14
Hey..

I am new to SOA and have a fairly huge number of queries. But for now, I've created a simple web service (in netbeans) and I'm trying to deploy it on Tomcat 6.1. The build was successful but I'm getting the following error while deploying it :::::


init:
deps-module-jar:
deps-ear-jar:
deps-jar:
library-inclusion-in-archive:
library-inclusion-in-manifest:
wsgen-init:
wsgen-Hello_WS:
wsgen-service-compile:
Compiling 2 source files to C:\Documents and Settings\smonga\Desktop\personal\javaprojects\Hello WS\build\web\WEB-INF\classes
compile:
compile-jsps:
Starting Tomcat process...
Waiting for Tomcat...
Tomcat server started.
In-place deployment at C:\Documents and Settings\smonga\Desktop\personal\javaprojects\Hello WS\build\web
deploy?config=file:/C:/DOCUME~1/smonga/LOCALS~1/Temp/context403258097116802551.xml&path=/Hello_WS
http://localhost:8084/manager/deploy?config=file:/C:/DOCUME~1/smonga/LOCALS~1/Temp/context403258097116802551.xml&path=/Hello_WS
Deployment error:
The module has not been deployed.
See the server log for details.
at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:166)
at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:104)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor48.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:277)
at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:460)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:151)
Caused by: The module has not been deployed.
at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:160)
... 16 more
BUILD FAILED (total time: 45 seconds)


Earlier I thought it was due to a port conflict, I changed the port number but later realized that "Tomcat is starting properly" but the service is not getting deployed.

Any suggestions anyone ?
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9293
    
  17

This is the output produced by netbeans while deploying. Show us the output of tomcat when the application is deployed. The output window in netbeans has a tab to show tomcat's output of deployment or you can find the error in tomcat logs...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Shivani Monga
Greenhorn

Joined: Dec 16, 2008
Posts: 14
Thanks for the reply. Here are the Tomcat logs ::

Using CATALINA_BASE: C:\Documents and Settings\smonga\.netbeans\6.1\apache-tomcat-6.0.16_base
Using CATALINA_HOME: C:\Program Files\Apache Software Foundation\Apache Tomcat 6.0.16
Using CATALINA_TMPDIR: C:\Documents and Settings\smonga\.netbeans\6.1\apache-tomcat-6.0.16_base\temp
Using JRE_HOME: C:\Program Files\Java\jdk1.5.0_17
Sep 28, 2009 5:32:58 PM org.apache.catalina.startup.Embedded initDirs
SEVERE: Cannot find specified temporary folder at C:\Documents and Settings\smonga\.netbeans\6.1\apache-tomcat-6.0.16_base\temp
Sep 28, 2009 5:32:59 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.5.0_17\bin;.;C:\WINDOWS\system32;C:\WINDOWS;E:\oracle\ora90\bin;C:\Program Files\Oracle\jre\1.1.8\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\tibco\tibrv\BIN;C:\Program Files\Borland\StarTeam SDK 2005\Lib;C:\Program Files\Borland\StarTeam SDK 2005\Bin;C:\Program Files\AccuRev\bin;C:\Program Files\Windows Imaging\;C:\Sun\SDK\bin;C:\Program Files\Java\jdk1.5.0_17\bin;C:\Sun\SDK\lib\ant\bin
Sep 28, 2009 5:32:59 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8084
Sep 28, 2009 5:32:59 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1023 ms
Sep 28, 2009 5:32:59 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Sep 28, 2009 5:32:59 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.16
Sep 28, 2009 5:32:59 PM org.apache.catalina.core.StandardContext resourcesStart
SEVERE: Error starting static Resources
java.lang.IllegalArgumentException: Document base C:\Documents and Settings\smonga\Desktop\Desktop\javaprojects\calculator\build\web does not exist or is not a readable directory
at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:141)
at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:3957)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4126)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1147)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Sep 28, 2009 5:32:59 PM org.apache.catalina.core.StandardContext start
SEVERE: Error in resourceStart()
Sep 28, 2009 5:33:00 PM org.apache.catalina.core.StandardContext start
SEVERE: Error getConfigured
Sep 28, 2009 5:33:00 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/calculator] startup failed due to previous errors
Sep 28, 2009 5:33:00 PM org.apache.catalina.core.StandardContext stop
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/calculator] has not been started
Sep 28, 2009 5:33:00 PM org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter HTTPMonitorFilter
java.lang.ClassNotFoundException: org.netbeans.modules.web.monitor.server.MonitorFilter
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1360)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1206)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:249)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3709)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4356)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1147)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Sep 28, 2009 5:33:00 PM org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart
Sep 28, 2009 5:33:00 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/manager] startup failed due to previous errors
Sep 28, 2009 5:33:00 PM org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter HTTPMonitorFilter
java.lang.ClassNotFoundException: org.netbeans.modules.web.monitor.server.MonitorFilter
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1360)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1206)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:249)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3709)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4356)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1147)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Sep 28, 2009 5:33:00 PM org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart
Sep 28, 2009 5:33:00 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [] startup failed due to previous errors
Sep 28, 2009 5:33:00 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8084
Sep 28, 2009 5:33:00 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Sep 28, 2009 5:33:00 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/47 config=null
Sep 28, 2009 5:33:00 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1001 ms
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9293
    
  17

I can't see any errors related to the application whose deployment is failing. Can you deploy the war file generated by Netbeans by hand in tomcat. Checkout the admin console and undeploy the application if you find it in the list of applications (tomcat admin console would be found at http://localhost:8084/manager/html assuming that your tomcat is running at port 8084)...
Jer Deras
Greenhorn

Joined: Sep 29, 2009
Posts: 10
make sure you have your deployed war in the webapps directory of tomcat
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem while deploying Web Service on Tomcat (in netbeans)