8 Replies Latest reply on Nov 28, 2007 3:49 AM by asoldano

    Webservice not starting in AS 4.2.2

    isthisusernameavailable

      Hello,

      I have a simple clustered webservice that I created using AS 4.2.1 annotated with some basic annotations:

      @Stateless
      @Clustered(partition="DefaultPartition")
      @WebService(serviceName="Request")
      public class RequestManager extends IRemote {
       ...
      }


      with a few methods annotated with plain @WebMethod annotations.

      When I deploy this bean in AS 4.2.1 I get this line in my server.log:
      [org.jboss.ws.core.server.ServiceEndpointManager] WebService started: http://127.0.0.1:8080/RequestManagerService/RequestManager


      and everything works great. When I upgraded to AS 4.2.2, this same web service is no longer started in my log file and is not available.

      Can anyone offer some insight why this web service fails to deploy in 4.2.2 and what a solution might be?

      Thanks,
      John

        • 1. Re: Webservice not starting in AS 4.2.2
          ropalka

          Hi,

          try to check your web.xml file, if you're using original or modified one. I think you're problem could be caused by this issue: http://jira.jboss.org/jira/browse/JBWS-1762

          Richard

          • 2. Re: Webservice not starting in AS 4.2.2
            isthisusernameavailable

             

            "richard.opalka@jboss.com" wrote:
            Hi,

            try to check your web.xml file, if you're using original or modified one. I think you're problem could be caused by this issue: http://jira.jboss.org/jira/browse/JBWS-1762

            Richard


            Hi Richard,

            I don't have a web.xml in my deployment. I'm only annotating the class with @WebService (as above), and I'm able to make SOAP calls to my server and receive a response under 4.2.1, but not in 4.2.2. I'm a newbie to JBoss -- should I be using a web.xml file, and if so, where would I look for information about it?

            Thanks,
            John

            • 3. Re: Webservice not starting in AS 4.2.2
              ropalka

              Hi,

              which version of JBossWS are you using? Just FYI there will be a new version of JBossWS 2.0.2 downloadable soon which is well tested on JBossAS 4.2.2. I suggest you to upgrade.

              Richard

              • 4. Re: Webservice not starting in AS 4.2.2
                isthisusernameavailable

                 

                "richard.opalka@jboss.com" wrote:
                Hi,

                which version of JBossWS are you using? Just FYI there will be a new version of JBossWS 2.0.2 downloadable soon which is well tested on JBossAS 4.2.2. I suggest you to upgrade.

                Richard


                Hi Richard,

                I've upgraded to JBoss 4.2.2 and JbossWS 2.0.2, but I'm still seeing the same problem. Here's sample code that I'm using.

                @Remote
                public interface IHelloWorld {
                 public String hello();
                }
                
                @Stateless
                @Clustered(partition="DefaultPartition")
                @WebService(serviceName="HelloWorld")
                public class HelloWorld implements IHelloWorld {
                 @WebMethod
                 public String hello() {
                 return "hello, world";
                 }
                }


                I'm creating a simple jar file with these two classes in it. When I copy this jar file to my deploy directory in JBoss 4.2.1/JBossws 1.2.1, I see this message:

                WebService started: http://127.0.0.1:8080/HelloWorldService/HelloWorld


                When I deploy it to JBoss 4.2.2/JBossws 2.0.2, I do not see this line, and the web service is not started.

                Is there something I need to do to explicitly start the webservice in 4.2.2/2.0.2?

                Thanks,
                John

                • 5. Re: Webservice not starting in AS 4.2.2
                  ropalka

                  Hi John,

                  I tried your example and I was able to deploy it to JBossAS 4.2.2 using JBossWS 2.0.2.
                  (but I removed @Clustered annotation, because I don't have cluster configured on my local machine.) I compiled your service classes using JBoss AS 4.2.2 classpath. Did you try to remove @Clustered annotation? Maybe it is causing your problems. Do you have your cluster environment configured properly?

                  Richard

                  • 6. Re: Webservice not starting in AS 4.2.2
                    ropalka

                     

                    ...
                    20:43:03,655 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/
                    20:43:04,665 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8080
                    20:43:04,975 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
                    20:43:04,996 INFO [Server] JBoss (MX MicroKernel) [4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200711201921)] Started in 45s:236ms
                    20:44:15,086 INFO [JmxKernelAbstraction] creating wrapper delegate for: org.jboss.ejb3.stateless.StatelessContainer
                    20:44:15,102 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:jar=test2.jar,name=HelloWorld,service=EJB3 with dependencies:
                    20:44:15,600 INFO [EJBContainer] STARTED EJB: org.jboss.test.ws.jaxws.jbws.HelloWorld ejbName: HelloWorld
                     20:44:15,784 INFO [EJB3Deployer] Deployed: file:/opt/svn/jbossas/tags/JBoss_4_2_2_GA/build/output/jboss-4.2.2.GA/server/default/deploy/test2.jar/
                     20:44:16,001 INFO [DefaultEndpointRegistry] register: jboss.ws:context=test2,endpoint=HelloWorld
                     20:44:19,366 INFO [WSDLFilePublisher] WSDL published to: file:/opt/svn/jbossas/tags/JBoss_4_2_2_GA/build/output/jboss-4.2.2.GA/server/default/data/wsdl/test2.jar/HelloWorld50713.wsdl
                     20:44:19,606 INFO [TomcatDeployer] deploy, ctxPath=/test2, warUrl=.../tmp/deploy/test2.jar50712.war


                    Richard

                    • 7. Re: Webservice not starting in AS 4.2.2
                      isthisusernameavailable

                      Hi Richard,

                      It turns out that in JBoss 4.2.2 I need to include the name of my .ear file in the web service URL. So, for example, in 4.2.1, I could use this URL:

                      http://myhost:8080/HelloWorld/HelloWorld

                      But in 4.2.2, the above URL will not work unless I change it to:

                      http://myhost:8080/MyEar-HelloWorld/HelloWorld

                      where I've deployed the service in MyEar.ear. I found this by digging into the jboss-4.2.2-GA/server/all/data/wsdl directory.

                      Was this an intentional change to the JBoss-ws package?

                      • 8. Re: Webservice not starting in AS 4.2.2
                        asoldano

                        As a reference on how the endpoint address is obtained, please take a look at:
                        http://jbws.dyndns.org/mediawiki/index.php?title=FAQ#How_do_I_know_what_endpoint_address_is_being_used.3F