4 Replies Latest reply on Dec 11, 2012 3:59 PM by Mashama McFarlane

    SwitchYard Service with multiple RestEasy bound Service Operations

    Mashama McFarlane Novice

      I am having some difficulty implementing a Bean Service with multiple RestEasy bound Service Operations.  The first issue is with method overloading within the Service contract/interface.  I am not sure if this is supposed to work but IMHO it would be nice if it did.  The second issue I am having is with an AbstractMethodError exception when I do not overload the Service Operation definitions.  Everything works as expected when I create two separate Bean Services each with a single RestEasy bound Service Operation.  All in all I was able to produce a proof of concept with relative ease after getting past a mental lapse thanks to the community here.  As expected ... #JBOSS #SWITCHYARD #ROCKS!

       

      OVERLOADED SERVICE OPERATION DEFINITIONS

       

      @Path("/charts")
      public interface IAgeAndGenderChart {
      
      
                @GET
                @Path("/opportunity/analysis/{analysisId}/chart/ageAndGender")
                @Produces({"application/xml","application/json"})
                public String computeSVG(@PathParam("analysisId") String analysisId) throws Exception;
      
                @POST
                @Path("/external/opportunity/analysis/chart/ageAndGender")
                @Produces({"application/xml","application/json"})
                @Consumes({"application/json"})
                public String computeSVG(CostimpactCoVsIndEmpDistributionResultTransform transform) throws Exception;
      
      }
      
      

       

       

      09:53:03,579 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/DataServicesSwitchYardPOC].[RestEasy]] (http-localhost-127.0.0.1-8080-1) Servlet.service() for servlet RestEasy threw exception: org.jboss.resteasy.spi.UnhandledException: java.lang.ClassCastException: org.switchyard.HandlerException cannot be cast to java.lang.String

                at org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:340) [resteasy-jaxrs-2.3.2.Final.jar:]

                at org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:214) [resteasy-jaxrs-2.3.2.Final.jar:]

                at org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:190) [resteasy-jaxrs-2.3.2.Final.jar:]

                at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:540) [resteasy-jaxrs-2.3.2.Final.jar:]

                at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:502) [resteasy-jaxrs-2.3.2.Final.jar:]

                at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119) [resteasy-jaxrs-2.3.2.Final.jar:]

                at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208) [resteasy-jaxrs-2.3.2.Final.jar:]

                at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55) [resteasy-jaxrs-2.3.2.Final.jar:]

                at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50) [resteasy-jaxrs-2.3.2.Final.jar:]

                at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)

                at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)

                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)

                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)

                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:368)

                at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)

                at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)

                at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)

                at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_29]

      Caused by: java.lang.ClassCastException: org.switchyard.HandlerException cannot be cast to java.lang.String

                at com.chp.valuequest.controller.chart.api.IAgeAndGenderChartRestImpl.computeSVG(IAgeAndGenderChartRestImpl.java)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_29]

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_29]

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_29]

                at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_29]

                at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:155) [resteasy-jaxrs-2.3.2.Final.jar:]

                at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:257) [resteasy-jaxrs-2.3.2.Final.jar:]

                at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:222) [resteasy-jaxrs-2.3.2.Final.jar:]

                at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:211) [resteasy-jaxrs-2.3.2.Final.jar:]

                at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:525) [resteasy-jaxrs-2.3.2.Final.jar:]

                ... 18 more

       

      NON-OVERLOADED SERVICE OPERATION DEFINITIONS

       

       

      @Path("/charts")
      public interface IAgeAndGenderChart {
      
      
                @GET
                @Path("/opportunity/analysis/{analysisId}/chart/ageAndGender")
                @Produces({"application/xml","application/json"})
                public String computeSVG(@PathParam("analysisId") String analysisId) throws Exception;
      
                @POST
                @Path("/external/opportunity/analysis/chart/ageAndGender")
                @Produces({"application/xml","application/json"})
                @Consumes({"application/json"})
                public String computeSVG2(CostimpactCoVsIndEmpDistributionResultTransform transform) throws Exception;
      
      }
      
      

       

      09:51:45,910 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/DataServicesSwitchYardPOC].[RestEasy]] (http-localhost-127.0.0.1-8080-1) Servlet.service() for servlet RestEasy threw exception: org.jboss.resteasy.spi.UnhandledException: java.lang.AbstractMethodError: com.chp.valuequest.controller.chart.api.IAgeAndGenderChartRestImpl.computeSVG2(Lcom/chp/valuequest/model/transformation/CostimpactCoVsIndEmpDistributionResultTransformLjava/lang/String;

                at org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:340) [resteasy-jaxrs-2.3.2.Final.jar:]

                at org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:214) [resteasy-jaxrs-2.3.2.Final.jar:]

                at org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:190) [resteasy-jaxrs-2.3.2.Final.jar:]

                at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:540) [resteasy-jaxrs-2.3.2.Final.jar:]

                at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:502) [resteasy-jaxrs-2.3.2.Final.jar:]

                at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119) [resteasy-jaxrs-2.3.2.Final.jar:]

                at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208) [resteasy-jaxrs-2.3.2.Final.jar:]

                at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55) [resteasy-jaxrs-2.3.2.Final.jar:]

                at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50) [resteasy-jaxrs-2.3.2.Final.jar:]

                at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)

                at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)

                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)

                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)

                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:368)

                at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)

                at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)

                at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)

                at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_29]

      Caused by: java.lang.AbstractMethodError: com.chp.valuequest.controller.chart.api.IAgeAndGenderChartRestImpl.computeSVG2(Lcom/chp/valuequest/model/transformation/CostimpactCoVsIndEmpDistributionResultTransformLjava/lang/String;

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_29]

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_29]

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_29]

                at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_29]

                at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:155) [resteasy-jaxrs-2.3.2.Final.jar:]

                at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:257) [resteasy-jaxrs-2.3.2.Final.jar:]

                at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:222) [resteasy-jaxrs-2.3.2.Final.jar:]

                at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:211) [resteasy-jaxrs-2.3.2.Final.jar:]

                at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:525) [resteasy-jaxrs-2.3.2.Final.jar:]

                ... 18 more

        • 1. Re: SwitchYard Service with multiple RestEasy bound Service Operations
          Magesh Bojan Master

          The AbtractMethodError could be caused by your implemetation. Unless we know more detail on that we cannot say what exactly causes it. The Overloaded service is throwing a SwitchYard HandlerException. Something seem to have broken. Could you enable Debug for SwitchYard and attach the log here?

          • 2. Re: SwitchYard Service with multiple RestEasy bound Service Operations
            Mashama McFarlane Novice

            I was able to get the non-overloaded service to work with some finegaling.  I need to do some additional testing because I am seeing some strange behavior.  In short I am able to get the service to work correctly when specifying the service interface/operations as:

             

            @Path("/charts")
            public interface IAgeAndGenderChart {
            
            
                      @GET
                      @Path("/opportunity/analysis/{analysisId}/chart/ageAndGender")
                      @Produces({"application/xml","application/json"})
                      public String computeSVG2(@PathParam("analysisId") String analysisId) throws Exception;
            
                      @POST
                      @Path("/external/opportunity/analysis/chart/ageAndGender")
                      @Produces({"application/xml","application/json"})
                      @Consumes({"application/json"})
                      public String computeSVG(CostimpactCoVsIndEmpDistributionResultTransform transform) throws Exception;
            
            }
            

             

            but not:

             

            @Path("/charts")
            public interface IAgeAndGenderChart {
            
            
            
            
                      @GET
                      @Path("/opportunity/analysis/{analysisId}/chart/ageAndGender")
                      @Produces({"application/xml","application/json"})
                      public String computeSVG(@PathParam("analysisId") String analysisId) throws Exception;
            
            
                      @POST
                      @Path("/external/opportunity/analysis/chart/ageAndGender")
                      @Produces({"application/xml","application/json"})
                      @Consumes({"application/json"})
                      public String computeSVG2(CostimpactCoVsIndEmpDistributionResultTransform transform) throws Exception;
            
            
            }
            
            


             

            For the overloaded service I have enabled Debug and here is the log:

             

            12:21:33,036 DEBUG [org.jboss.resteasy.core.SynchronousDispatcher] (http-CHP-WS70-192.168.62.46-8080-1) PathInfo: /charts/external/opportunity/analysis/chart/ageAndGender

            12:21:33,070 DEBUG [org.switchyard.internal.ExchangeImpl] (http-CHP-WS70-192.168.62.46-8080-1) Sending IN Message (791286571) on IN_OUT Exchange (1934656573) for Service '{urn:com.example.switchyard:DataServicesSwitchYardPOC:0.0.1-SNAPSHOT}IAgeAndGenderChart', operation 'null'.  Exchange state: OK

            12:21:33,074 DEBUG [org.apache.camel.component.direct.DirectProducer] (http-CHP-WS70-192.168.62.46-8080-1) Starting producer: Producer[direct://%7Burn:com.example.switchyard:DataServicesSwitchYardPOC:0.0.1-SNAPSHOT%7DIAgeAndGenderChart]

            12:21:33,077 DEBUG [org.apache.camel.impl.ProducerCache] (http-CHP-WS70-192.168.62.46-8080-1) Adding to producer cache with key: Endpoint[direct://%7Burn:com.example.switchyard:DataServicesSwitchYardPOC:0.0.1-SNAPSHOT%7DIAgeAndGenderChart] for producer: Producer[direct://%7Burn:com.example.switchyard:DataServicesSwitchYardPOC:0.0.1-SNAPSHOT%7DIAgeAndGenderChart]

            12:21:33,081 DEBUG [org.apache.camel.impl.ProducerCache] (http-CHP-WS70-192.168.62.46-8080-1) >>>> Endpoint[direct://%7Burn:com.example.switchyard:DataServicesSwitchYardPOC:0.0.1-SNAPSHOT%7DIAgeAndGenderChart] Exchange[Message: com.chp.valuequest.model.transformation.CostimpactCoVsIndEmpDistributionResultTransform@2b19fbf0]

            12:21:33,085 DEBUG [org.switchyard.internal.validate.BaseValidatorRegistry] (http-CHP-WS70-192.168.62.46-8080-1) No compatible validator registered: name 'java:com.chp.valuequest.model.transformation.CostimpactCoVsIndEmpDistributionResultTransform'

            12:21:33,088 DEBUG [org.switchyard.internal.transform.BaseTransformerRegistry] (http-CHP-WS70-192.168.62.46-8080-1) No compatible transformer registered: from 'java:com.chp.valuequest.model.transformation.CostimpactCoVsIndEmpDistributionResultTransform' to 'java:java.lang.String'

            12:21:33,091 DEBUG [org.apache.camel.processor.DefaultErrorHandler] (http-CHP-WS70-192.168.62.46-8080-1) Failed delivery for (MessageId: ID-CHP-WS70-65177-1355156637432-21-1 on ExchangeId: ID-CHP-WS70-65177-1355156637432-21-2). On delivery attempt: 0 caught: org.switchyard.HandlerException: Transformations not applied.  Required payload type of 'java:java.lang.String'.  Actual payload type is 'java:com.chp.valuequest.model.transformation.CostimpactCoVsIndEmpDistributionResultTransform'.  You must define and register a Transformer to transform between these types.

            12:21:33,097 DEBUG [org.switchyard.internal.ExchangeImpl] (http-CHP-WS70-192.168.62.46-8080-1) Sending OUT Message (383119288) on IN_OUT Exchange (1934656573) for Service '{urn:com.example.switchyard:DataServicesSwitchYardPOC:0.0.1-SNAPSHOT}IAgeAndGenderChart', operation 'computeSVG : IN_OUT : [java:java.lang.String, java:java.lang.String, java:java.lang.Exception]'.  Exchange state: FAULT

            12:21:33,101 DEBUG [org.apache.camel.processor.FilterProcessor] (http-CHP-WS70-192.168.62.46-8080-1) Filter matches: true for exchange: Exchange[Message: com.chp.valuequest.model.transformation.CostimpactCoVsIndEmpDistributionResultTransform@2b19fbf0]

            12:21:33,104 DEBUG [org.switchyard.internal.validate.BaseValidatorRegistry] (http-CHP-WS70-192.168.62.46-8080-1) No compatible validator registered: name 'java:java.lang.Exception'

            12:21:33,106 DEBUG [org.switchyard.internal.transform.BaseTransformerRegistry] (http-CHP-WS70-192.168.62.46-8080-1) No compatible transformer registered: from 'java:java.lang.Exception' to 'java:java.lang.Exception'

            12:21:33,108 DEBUG [org.switchyard.internal.validate.BaseValidatorRegistry] (http-CHP-WS70-192.168.62.46-8080-1) No compatible validator registered: name 'java:java.lang.Exception'

            12:21:33,110 DEBUG [org.apache.camel.processor.Pipeline] (http-CHP-WS70-192.168.62.46-8080-1) Message exchange has failed: so breaking out of pipeline for exchange: Exchange[Message: com.chp.valuequest.model.transformation.CostimpactCoVsIndEmpDistributionResultTransform@2b19fbf0] Handled by the error handler.

            12:21:33,113 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/DataServicesSwitchYardPOC].[RestEasy]] (http-CHP-WS70-192.168.62.46-8080-1) Servlet.service() for servlet RestEasy threw exception: org.jboss.resteasy.spi.UnhandledException: java.lang.ClassCastException: org.switchyard.HandlerException cannot be cast to java.lang.String

                      at org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:340) [resteasy-jaxrs-2.3.2.Final.jar:]

                      at org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:214) [resteasy-jaxrs-2.3.2.Final.jar:]

                      at org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:190) [resteasy-jaxrs-2.3.2.Final.jar:]

                      at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:540) [resteasy-jaxrs-2.3.2.Final.jar:]

                      at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:502) [resteasy-jaxrs-2.3.2.Final.jar:]

                      at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119) [resteasy-jaxrs-2.3.2.Final.jar:]

                      at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208) [resteasy-jaxrs-2.3.2.Final.jar:]

                      at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55) [resteasy-jaxrs-2.3.2.Final.jar:]

                      at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50) [resteasy-jaxrs-2.3.2.Final.jar:]

                      at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]

                      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)

                      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)

                      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)

                      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)

                      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)

                      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:368)

                      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)

                      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)

                      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)

                      at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_29]

            Caused by: java.lang.ClassCastException: org.switchyard.HandlerException cannot be cast to java.lang.String

                      at com.chp.valuequest.controller.chart.api.IAgeAndGenderChartRestImpl.computeSVG(IAgeAndGenderChartRestImpl.java)

                      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_29]

                      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_29]

                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_29]

                      at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_29]

                      at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:155) [resteasy-jaxrs-2.3.2.Final.jar:]

                      at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:257) [resteasy-jaxrs-2.3.2.Final.jar:]

                      at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:222) [resteasy-jaxrs-2.3.2.Final.jar:]

                      at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:211) [resteasy-jaxrs-2.3.2.Final.jar:]

                      at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:525) [resteasy-jaxrs-2.3.2.Final.jar:]

                      ... 18 more

             

             

            12:21:48,145 DEBUG [org.switchyard.component.common.rules.util.drools.LogSystemEventListener] (Thread-69) ResourceChangeScanner attempt to scan 0 resources

            12:21:48,145 DEBUG [org.switchyard.component.common.rules.util.drools.LogSystemEventListener] (Thread-69) ResourceChangeScanner thread is waiting for 60 seconds.

            12:21:48,505 DEBUG [org.apache.catalina.session.ManagerBase] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) Start expire sessions StandardManager at 1355160108505 sessioncount 0

            12:21:48,505 DEBUG [org.apache.catalina.session.ManagerBase] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) End expire sessions StandardManager processingTime 0 expired sessions: 0

            12:21:48,505 DEBUG [org.apache.catalina.session.ManagerBase] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) Start expire sessions StandardManager at 1355160108505 sessioncount 0

            12:21:48,505 DEBUG [org.apache.catalina.session.ManagerBase] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) End expire sessions StandardManager processingTime 0 expired sessions: 0

            12:21:48,505 DEBUG [org.apache.catalina.session.ManagerBase] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) Start expire sessions StandardManager at 1355160108505 sessioncount 0

            12:21:48,505 DEBUG [org.apache.catalina.session.ManagerBase] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) End expire sessions StandardManager processingTime 0 expired sessions: 0

            12:22:24,557 DEBUG [org.jboss.resteasy.core.SynchronousDispatcher] (http-CHP-WS70-192.168.62.46-8080-1) PathInfo: /charts/opportunity/analysis/260/chart/ageAndGender

            12:22:24,557 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/DataServicesSwitchYardPOC].[RestEasy]] (http-CHP-WS70-192.168.62.46-8080-1) Servlet.service() for servlet RestEasy threw exception: org.jboss.resteasy.spi.UnhandledException: java.lang.AbstractMethodError: com.chp.valuequest.controller.chart.api.IAgeAndGenderChartRestImpl.computeSVG(Ljava/lang/String;)Ljava/lang/String;

                      at org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:340) [resteasy-jaxrs-2.3.2.Final.jar:]

                      at org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:214) [resteasy-jaxrs-2.3.2.Final.jar:]

                      at org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:190) [resteasy-jaxrs-2.3.2.Final.jar:]

                      at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:540) [resteasy-jaxrs-2.3.2.Final.jar:]

                      at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:502) [resteasy-jaxrs-2.3.2.Final.jar:]

                      at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119) [resteasy-jaxrs-2.3.2.Final.jar:]

                      at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208) [resteasy-jaxrs-2.3.2.Final.jar:]

                      at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55) [resteasy-jaxrs-2.3.2.Final.jar:]

                      at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50) [resteasy-jaxrs-2.3.2.Final.jar:]

                      at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]

                      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)

                      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)

                      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)

                      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)

                      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)

                      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:368)

                      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)

                      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)

                      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)

                      at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_29]

            Caused by: java.lang.AbstractMethodError: com.chp.valuequest.controller.chart.api.IAgeAndGenderChartRestImpl.computeSVG(Ljava/lang/String;)Ljava/lang/String;

                      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_29]

                      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_29]

                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_29]

                      at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_29]

                      at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:155) [resteasy-jaxrs-2.3.2.Final.jar:]

                      at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:257) [resteasy-jaxrs-2.3.2.Final.jar:]

                      at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:222) [resteasy-jaxrs-2.3.2.Final.jar:]

                      at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:211) [resteasy-jaxrs-2.3.2.Final.jar:]

                      at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:525) [resteasy-jaxrs-2.3.2.Final.jar:]

                      ... 18 more

             

             

            I am speculating here but it seems that the JSON is successfully transformed into CostimpactCoVsIndEmpDistributionResultTransform but then SwitchYard is invoking the incorrect service method computeSVG(String) when it should be invoking computeSVG(CostimpactCoVsIndEmpDistributionResultTransform).  Let me know if you need anything else.

             


            • 3. Re: SwitchYard Service with multiple RestEasy bound Service Operations
              Magesh Bojan Master

              Mashama McFarlane wrote:

               

              I am speculating here but it seems that the JSON is successfully transformed into CostimpactCoVsIndEmpDistributionResultTransform but then SwitchYard is invoking the incorrect service method computeSVG(String) when it should be invoking computeSVG(CostimpactCoVsIndEmpDistributionResultTransform).  Let me know if you need anything else.

              There is no speculation here. You are correct about this behavior. Unfortunately, Service method overloading is prohibited in SwitchYard due to reasons stated in this post:

               

              https://community.jboss.org/thread/201411

              • 4. Re: SwitchYard Service with multiple RestEasy bound Service Operations
                Mashama McFarlane Novice

                Thanks Magesh.  I think the issues I was having with the non-overloaded service was more-so a tooling issue.  I believe removing the application from the application server (AS7) and then re-adding it resolved my issue.  Perhaps there is some hot deployment issue here.  I posted a follow up question to Keith's answer in the post you linked.  I am not sure whether the prohibition of operation overloading within a WS-I Basic Profile is the reason behind our inability to overload service methods in SwitchYard.  If this is true then I am curious as to what other technical reasons there are.  Some further clarification would be nice.  Also it would be nice if the prohibition of method overloading was stipulated in the documentation.

                 

                Nevertheless thanks for your assistance on this.