1 Reply Latest reply on Apr 1, 2014 7:41 AM by boanergesza11

    No component found with scheme: sql

    boanergesza11

      Hi everybody;

       

      I have been running into a strange issues with SY 0.8.0 final on JBoss 7.1.1. If I use the camel sql bindig to my database I get the following error:

       

      11:18:51,375 WARN  [org.switchyard.internal.ExchangeImpl] (http-0.0.0.0-0.0.0.0-8080-1) Fault generated during exchange without a handler: org.switchyard.HandlerException: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: sql://SELECT%20max(keycounter)%20from%20hsm?dataSourceRef=java%3Ajboss%2FPAYMENTGATEWAYDS due to: No component found with scheme: sql 11:18:51,388 WARN  [org.jboss.resteasy.core.SynchronousDispatcher] (http-0.0.0.0-0.0.0.0-8080-1) Failed executing POST /v1/getCurrentKeyCounter/: org.jboss.resteasy.core.NoMessageBodyWriterFoundFailure: Could not find MessageBodyWriter for response object of type: java.lang.Integer of media type: text/xml         at org.jboss.resteasy.core.ServerResponse.writeTo(ServerResponse.java:216) [resteasy-jaxrs-2.3.2.Final.jar:]         at org.jboss.resteasy.core.SynchronousDispatcher.writeJaxrsResponse(SynchronousDispatcher.java:585) [resteasy-jaxrs-2.3.2.Final.jar:]         at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:506) [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:722) [rt.jar:1.7.0_21]

       

      And here is the line from the switchyard xml.

          <sca:reference name="RertrieveKeyCount" multiplicity="0..1" promote="RuntimeBean/RertrieveKeyCount">
            <sca:interface.java interface="za.co.fnb.ms.interfaces.RertrieveKeyCount"/>
            <sql:binding.sql>
              <sql:query>SELECT max(keycounter) from hsm</sql:query>
              <sql:dataSourceRef>java:jboss/PAYMENTGATEWAYDS</sql:dataSourceRef>
            </sql:binding.sql>
          </sca:reference>
          <sca:service name="Runtime" promote="RuntimeBean/Runtime">
            <sca:interface.java interface="za.co.fnb.ms.interfaces.Runtime"/>
            <resteasy:binding.rest>
              <resteasy:contextMapper/>
              <resteasy:interfaces>za.co.fnb.ms.interfaces.Runtime</resteasy:interfaces>
              <resteasy:contextPath>runtime</resteasy:contextPath>
            </resteasy:binding.rest>  
          </sca:service>
      

      I have already checked and the camel sql jar is in the modules directory.

        • 1. Re: No component found with scheme: sql
          boanergesza11

          OK;

           

          So I was able to answer this questions quite easily. For some unknown reason we decided to put the interfaces we use in a seperate project, and include them into the project in jar file. So while the project builds, compiles and even starts up with no issues; when you execute it it fails in strange and misterious ways.

           

          This is also not the first time we have have encountered this problem.

           

          In any event, moving the interfaces we use for the sql to the switchyard app propper, it all worked fine.