You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ro...@surecomp.com on 2011/02/01 01:12:59 UTC
Re: deploying a war file and starting the application
Christopher
I got everthing working
Sent from my iPhone
On Jan 31, 2011, at 5:03 PM, "Christopher Schultz" <ch...@christopherschultz.net> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Robert,
>
> On 1/31/2011 9:09 AM, Robert.Jenkin@surecomp.com wrote:
>> I am trying to figure out why my web services do not work in Tomcat.
>>
>> The following shows my web service code in eclipse
>>
>> package com.surecomp.allMATCH.client.webservices;
>>
>> import javax.jws.*;
>>
>> import com.surecomp.allMATCH.client.IReasonCode;
>> import com.surecomp.allMATCH.client.businesslogic.ReasonCode;
>>
>> @WebService(serviceName="ReasonCodeService")
>> public class ReasonCodeService implements IReasonCode {
>
> [snip]
>
>> <servlet>
>> <servlet-name>ReasonCodeServiceServlethttp</servlet-name>
>> <servlet-class>com.surecomp.allMATCH.client.webservices.ReasonCodeService</servlet-class>
>> <load-on-startup>0</load-on-startup>
>> </servlet>
>
> You are trying to deploy a class that is not a servlet. A servlet must
> inherit from javax.servlet.Servlet. Are these supposed to be web
> services that are deployed into some kind of web services container? If
> so, you don't want to configure them in web.xml. Instead, you have to
> configure them according to the web service container you are trying to use.
>
> What web service container are you trying to use? You mentioned earlier
> in the thread that WebSphere and WebLogic servers were working well.
> Perhaps that's because they provide their own web service containers
> while Tomcat does not?
>
>> When Tomcat starts each web service throws the following error. I understand that loadonstart value of zero is default and not needed. Again, the war/web.xml is generated by eclipse.
>>
>> INFO: Marking servlet ReasonCodeServiceServlethttp as unavailable
>> Jan 31, 2011 8:53:13 AM org.apache.catalina.core.StandardContext loadOnStartup
>> SEVERE: Servlet /allMATCHWeb threw load() exception
>> java.lang.ClassCastException: com.surecomp.allMATCH.client.webservices.ReasonCodeService cannot be cast to javax.servlet.Servlet
>> at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1048)
>
> That's because ReasonCodeService (and presumably all your other
> services) do not inherit from javax.servlet.Servlet.
>
>> Is it a requirement for tomcat that a web service implements Servlet?
>
> Tomcat does not provide any kind of web service container. For that,
> you'll need Apache Axis or any number of other fine web service containers.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk1HMWwACgkQ9CaO5/Lv0PCaagCglQvsqA/7dA+7tuuZe8f2BKDI
> d+UAn1gDeUruhgCcVjfdY07dxXDLsi48
> =EzXN
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
This mail was sent via Mail-SeCure System.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org