Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-6614

Cannot use REST reference binding in SY application

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Blocker
    • fuse-6.x-GA
    • jboss-fuse-6.3
    • SwitchYard
    • None
    • % %

    Description

      If I try to deploy a SY app with REST reference binding with

      https://issues.jboss.org/browse/ENTESB-6614#
      import javax.ws.rs.GET;
      import javax.ws.rs.Path;
      
      @Path("/")
      public interface FooResource {
      
      	@GET
      	@Path("/foo")
      	void foo(Object obj);
      
      }
      

      to fuse-6.3.0.R1 (on karaf) I'm getting the following error:

      2017-02-23 13:16:50,236 | ERROR | yard Extender: 1 | SwitchYardExtender               | 339 - org.switchyard.karaf.switchyard-karaf-deploy - 2.1.0.redhat-630224 | Unable to start switchyard for bundle com.example.switchyard.switchyard-rest
      java.lang.RuntimeException: SWITCHYARD038015: You must use at least one, but no more than one http method annotation on: public abstract void com.example.switchyard.switchyard_rest.FooResource.foo(java.lang.Object)
              at org.switchyard.component.resteasy.util.ClientInvoker.<init>(ClientInvoker.java:183)[433:org.switchyard.components.switchyard-component-resteasy:2.1.0.redhat-630224]
              at org.switchyard.component.resteasy.osgi.OsgiMethodInvokerFactory.createInvoker(OsgiMethodInvokerFactory.java:32)[433:org.switchyard.components.switchyard-component-resteasy:2.1.0.redhat-630224]
              at org.switchyard.component.resteasy.OutboundHandler.doStart(OutboundHandler.java:102)[433:org.switchyard.components.switchyard-component-resteasy:2.1.0.redhat-630224]
              at org.switchyard.deploy.BaseServiceHandler.start(BaseServiceHandler.java:60)[321:org.switchyard.switchyard-deploy:2.1.0.redhat-630224]
              at org.switchyard.deploy.internal.Deployment.deployReferenceBindings(Deployment.java:315)[321:org.switchyard.switchyard-deploy:2.1.0.redhat-630224]
              at org.switchyard.deploy.internal.Deployment.start(Deployment.java:143)[321:org.switchyard.switchyard-deploy:2.1.0.redhat-630224]
              at org.switchyard.deploy.osgi.internal.SwitchYardContainerImpl.doStart(SwitchYardContainerImpl.java:310)[339:org.switchyard.karaf.switchyard-karaf-deploy:2.1.0.redhat-630224]
              at org.switchyard.deploy.osgi.base.SimpleExtension.start(SimpleExtension.java:77)[339:org.switchyard.karaf.switchyard-karaf-deploy:2.1.0.redhat-630224]
              at org.switchyard.deploy.osgi.base.CompoundExtension.doStart(CompoundExtension.java:40)[339:org.switchyard.karaf.switchyard-karaf-deploy:2.1.0.redhat-630224]
              at org.switchyard.deploy.osgi.base.SimpleExtension.start(SimpleExtension.java:77)[339:org.switchyard.karaf.switchyard-karaf-deploy:2.1.0.redhat-630224]
              at org.switchyard.deploy.osgi.base.AbstractExtender$1.run(AbstractExtender.java:289)[339:org.switchyard.karaf.switchyard-karaf-deploy:2.1.0.redhat-630224]
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_121]
              at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_121]
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)[:1.8.0_121]
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)[:1.8.0_121]
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_121]
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_121]
              at java.lang.Thread.run(Thread.java:745)[:1.8.0_121]
      

      Attachments

        Activity

          People

            tcunning@redhat.com Thomas Cunningham
            apodhrad@redhat.com Andrej Podhradsky
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: