views:

132

answers:

1

I have developed a simple Apache-Axis java web service using Eclipse IDE and now it works successfully. I have generated test client also which provide by the IDE automatically. I can see that deployed web service is in the IDE server node when I expand it. (I have already added the tomcat 6.0 server to the Eclipse).

But the problem is that web service is up, only if I open the Eclipse and start the server from the Eclipse server tab. If I exit from the Eclipse, web service will be down. I want to know that how can I publish my web service permanently into the tomcat server and make it always up without opening the Eclipse IDE all the time?

thank you all in advance.

note: I just figure out the prob. when I deploy the war file, it has a different name comparing to actual web service project name in eclipse. I just open up the wsdl and get the actual url from it and type it on the address bar. then its worked !. thank u very much for your help. sorry for any inconvenience...

tomcat log file:

Sep 16, 2010 7:33:46 PM org.apache.catalina.core.AprLifecycleListener 
init
INFO: Loaded APR based Apache Tomcat Native library 1.1.20.
Sep 16, 2010 7:33:46 PM org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
Sep 16, 2010 7:33:47 PM org.apache.coyote.http11.Http11AprProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Sep 16, 2010 7:33:47 PM org.apache.coyote.ajp.AjpAprProtocol init
INFO: Initializing Coyote AJP/1.3 on ajp-8009
Sep 16, 2010 7:33:47 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1403 ms
Sep 16, 2010 7:33:48 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Sep 16, 2010 7:33:48 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.26
Sep 16, 2010 7:33:48 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor host-manager.xml
Sep 16, 2010 7:33:48 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor manager.xml
Sep 16, 2010 7:33:49 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory beerV1
Sep 16, 2010 7:33:49 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory docs
Sep 16, 2010 7:33:49 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory examples
Sep 16, 2010 7:33:50 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT
Sep 16, 2010 7:33:51 PM org.apache.coyote.http11.Http11AprProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Sep 16, 2010 7:33:51 PM org.apache.coyote.ajp.AjpAprProtocol start
INFO: Starting Coyote AJP/1.3 on ajp-8009
Sep 16, 2010 7:33:51 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3259 ms
Sep 16, 2010 7:34:05 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive Server.war
Sep 16, 2010 7:34:06 PM org.apache.axis.utils.JavaUtils isAttachmentSupported
WARNING: Unable to find required classes (javax.activation.DataHandler and javax.mail.internet.MimeMultipart). Attachment support is disabled.
+1  A: 

Currently you are using Tomcat from Eclipse which will ofcourse shutdown as you close the eclipse.

Copy your war file in your tomcat/webapps/

and start tomcat /tomcat/bin/tomcat.exe [or .sh ]without depending on the eclipse

  • Stop Tomcat.

  • Delete existing deployment. If you have previously deployed "foo.war" in TOMCAT_HOME/webapps, then it has been unpacked into webapps/foo/... You must delete this directory and all its contents. On Unix, this can be done with rm -r $TOMCAT_HOME/webapps/foo

  • Copy WAR file to TOMCAT_HOME/webapps/.

  • Start Tomcat.

org.life.java
yes, I have already done it. But didn't work. I manually deploy the war file using tomcat manager and start the tomcat server using startup.bat file after I exit from the Eclipse. But it didn't show the wsdl file when I type the web service URL specify in the wsdl.
arlahiru
ok goto your tomcat application manager and try to launch application from there. from eclipse you might have different context root.
org.life.java
After I launch it from the manager, it gives HTTP Status 404 error. The requested resource (/TesttServer/) is not available.
arlahiru
Make sure that the Tomcat Service isn't running.
The Elite Gentleman
ok try /TestServer/<YOUR WSDL FILENAME>.wsdl
org.life.java
no, i got the same error for this one also. HTTP Status 404 error. http://localhost:8080/TestServer/Service.wsdl
arlahiru
can you please check log or post it overhere.there might be some exception.
org.life.java
INFO: Deploying web application archive Server.warSep 16, 2010 4:21:02 PM org.apache.axis.utils.JavaUtils isAttachmentSupportedWARNING: Unable to find required classes (javax.activation.DataHandler and javax.mail.internet.MimeMultipart). Attachment support is disabled.
arlahiru
INFO: Undeploying context [/Server]Sep 16, 2010 4:28:53 PM org.apache.catalina.startup.HostConfig checkResourcesWARNING: Error while removing context [/Server]java.lang.NoClassDefFoundError: org/apache/axis/utils/XMLUtils$1 at java.lang.Class.getDeclaringClass(Native Method) at java.lang.Class.getEnclosingClass(Class.java:1085) at java.lang.Class.getCanonicalName(Class.java:1169) at org.apache.catalina.loader.WebappClassLoader.clearThreadLocalMap(WebappClassLoader.java:2188)......................... exception goes like this several lines. cant post all
arlahiru
@arhlahiru, please make sure that the java activation jar and the axis jars are found **inside** the WAR file that you generated. Also, you can add axis jar and activation jar in `TOMCAT_HOME/bin/` folder and deploy you application WAR in Tomcat.
The Elite Gentleman
How do i put those jar files into the war file when I generate war file from the Eclipse? Is it enough to put those jars only into the TOMCAT_HOME/bin/ ?
arlahiru
you can edit your question to put stackTrace
org.life.java
You can add axis-1.4.jar in your tomcat 'lib' folder temporarily to make it available for webapplication.
org.life.java
ok, I added that two jar files( java activation jar and the axis jars) into the tomcat lib folder and redeploy the .war file gain. But it didn't work. Still getting 404 error.
arlahiru
ok, I have attached my server log info to the question. please check it.
arlahiru
This time is there any exception ? and try loading app from tomac manager only
org.life.java
Full log is expected.
org.life.java
I just figure out the prob. when I deploy the war file, it has a different name comparing to actual web service project name in eclipse. I just open up the wsdl and get the actual url from it and type it on the address bar. then its worked !. thank u verymuch for your help. sorry for any inconvenience...
arlahiru