Details

    • Type: Bug
    • Status: Resolved
    • Priority: High
    • Resolution: Not a bug
    • Affects Version/s: 4.1.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Environment:

      Windows 10, DAS 301, Java 8

    • Severity:
      Critical
    • Estimated Complexity:
      Moderate
    • Test cases added:
      Not-applicable

      Description

      I want extend siddhi features. My code in java 8 is the next:

      Swordphish.java * Attachment

      I created my *.siddhiext:

      fraude.siddhiext * Attachment

      I probed my JAR from DOS and all is good.

      I generated my JAR, and copy in location C:\wso2\wso2das-3.0.1\repository\components\lib.

      My JAR has all external dependencies that I using in my debug.

      In my execution plan I can agregate the new function:

      /SIDDHI extension/
      from DSBStream
      select fraude:swordurl('www.blablas.com') as porcsword
      insert into testswordphish;

      The message is : "Queries are valid!"

      But when to DSBStream arrive a event. DAS show the next error:

      java.lang.RuntimeException: java.lang.ClassNotFoundException: org.glassfish.jersey.client.JerseyClientBuilder cannot be found by jaxrs_api_3.0.2.Final_1.0.0
      at javax.ws.rs.client.ClientBuilder.newBuilder(ClientBuilder.java:103)
      at javax.ws.rs.client.ClientBuilder.newClient(ClientBuilder.java:114)
      at org.wso2.siddhi.extension.fraude.Swordphish.execute(Swordphish.java:75)
      at org.wso2.siddhi.core.executor.function.FunctionExecutor.execute(FunctionExecutor.java:92)
      at org.wso2.siddhi.core.query.selector.attribute.processor.AttributeProcessor.process(AttributeProcessor.java:38)
      at org.wso2.siddhi.core.query.selector.QuerySelector.processNoAggregatorNoGroupBy(QuerySelector.java:98)
      at org.wso2.siddhi.core.query.selector.QuerySelector.process(QuerySelector.java:74)
      at org.wso2.siddhi.core.query.input.ProcessStreamReceiver.processAndClear(ProcessStreamReceiver.java:95)
      at org.wso2.siddhi.core.query.input.ProcessStreamReceiver.receive(ProcessStreamReceiver.java:67)
      at org.wso2.siddhi.core.stream.StreamJunction.sendEvent(StreamJunction.java:120)
      at org.wso2.siddhi.core.stream.StreamJunction$Publisher.send(StreamJunction.java:307)
      at org.wso2.siddhi.core.stream.input.InputDistributor.send(InputDistributor.java:34)
      at org.wso2.siddhi.core.stream.input.SingleThreadEntryValve.send(SingleThreadEntryValve.java:49)
      at org.wso2.siddhi.core.stream.input.SingleStreamEntryValve$SingleEntryValveHandler.sendEvents(SingleStreamEntryValve.java:161)
      at org.wso2.siddhi.core.stream.input.SingleStreamEntryValve$SingleEntryValveHandler.onEvent(SingleStreamEntryValve.java:149)
      at org.wso2.siddhi.core.stream.input.SingleStreamEntryValve$SingleEntryValveHandler.onEvent(SingleStreamEntryValve.java:119)
      at com.lmax.disruptor.BatchEventProcessor.run(BatchEventProcessor.java:128)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.ClassNotFoundException: org.glassfish.jersey.client.JerseyClientBuilder cannot be found by jaxrs_api_3.0.2.Final_1.0.0
      at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
      at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
      at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
      at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:264)
      at javax.ws.rs.client.FactoryFinder.newInstance(FactoryFinder.java:113)
      at javax.ws.rs.client.FactoryFinder.find(FactoryFinder.java:206)
      at javax.ws.rs.client.ClientBuilder.newBuilder(ClientBuilder.java:86)

      I copy the externals JARs To:

      <DAS_HOME>\repository\components\lib
      <DAS_HOME>\repository\components\plugins

      I created my jar including external jar too. I'm using the option "Runnable JAR File". But my problem persist.

      This error always happens when I use external dependencies to Siddhi.

      It is possible to make an extension of siddhi with external libraries?

        Attachments

          Activity

            People

            • Assignee:
              grainier@wso2.com Grainier Perera
              Reporter:
              roby.rubiano@gmail.com ROBY HERNAN RUBIANO
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: