Third-party dependency issues

Joined
Apr 11, 2023
Posts
9
Likes
2
Does any one have an example project where they've successfully added third-party dependencies to their MotiveWave SDK project?

I am attempting to add Redis support (via Jedis) and have run into walls all over. I've tried Ant (using the canonical example studies project), Maven, copying the third-party jars into the Extensions folder, and building fat-Jars. Nothing's worked so far. I am assuming a class path issue b\c I am getting this in the logs-

Caused by: java.lang.ClassNotFoundException: redis.clients.jedis.JedisPooled

Example Project: https://github.com/thestephenromano/MotiveWaveTest

If anyone has any examples or pointers, would greatly appreciate it. Thanks!
 

Attachments

  • motivewave-extentions.png
    motivewave-extentions.png
    919.2 KB · Views: 16
  • output (May-18 083051).txt
    28.1 KB · Views: 4
  • Screenshot 2023-05-18 at 8.43.23 AM.png
    Screenshot 2023-05-18 at 8.43.23 AM.png
    1.3 MB · Views: 16
Joined
Apr 11, 2023
Posts
9
Likes
2
So... this was more of an issue with Jedis, and more specifically using connection pooling (JedisPooled). Not sure why- I moved on and am using async Lettuce package.
 

xerol

Active member
Joined
Apr 6, 2022
Posts
28
Likes
7
I am also trying to add an external library to MW but it is a pain in the a**. I tried to add GRPC server to an indicator which failed and now I am trying to add an NATS client (single jar file) but I get the following error:

Code:
Exception in thread "JavaFX Application Thread" java.lang.NoClassDefFoundError: io/nats/client/Nats
        at study_examples.COM.onLoad(COM.java:103)
        at cf.ak.<init>(StudyWrapper.java:95)
        at cf.ac.a(StudyFactory.java:813)
        at cf.ac.a(StudyFactory.java:803)
        at com.motivewave.platform.common.p.a(GlobalActions.java:1120)
        at com.motivewave.platform.common.p.a(GlobalActions.java:1112)
        at com.motivewave.platform.common.p.b(GlobalActions.java:1302)
        at javafx.base@19/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
        at javafx.base@19/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:234)
        at javafx.base@19/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
        at javafx.base@19/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
        at javafx.base@19/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at javafx.base@19/com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
        at javafx.base@19/com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49)
        at javafx.base@19/javafx.event.Event.fireEvent(Event.java:198)
        at javafx.controls@19/javafx.scene.control.MenuItem.fire(MenuItem.java:459)

The deployment process works without problems, but when I try to attach the indicator to a chart I get this error. I also had to manually add the jar files to the lib folder. Does anybody know how to make an external library work?

EDIT: Working with 3rd party libs can be found here: https://support.motivewave.com/foru...-the-motivewaves-java-language.1392/post-6580
Big thanks to user Shtick Hustler!
 
Last edited:
Top