Help Needed: libplcTag4j

86 views
Skip to first unread message

Yash Joshi

unread,
Apr 7, 2021, 6:26:58 AM4/7/21
to libplctag

I have successfully integrated the tag.java file in my personal project, but I don't seem to be able to run it.

the project gets built but throws a runtime exception:

Looking for library 'plctag'
Adding paths from jna.library.path: null
Trying libplctag.so
Adding system paths: [/usr/lib/x86_64-linux-gnu, /lib/x86_64-linux-gnu, /lib64, /usr/lib, /lib]
Trying libplctag.so
Looking for version variants
Looking in classpath from org.springframework.boot.loader.LaunchedURLClassLoader@4520ebad for plctag
2021-04-07 15:46:00.060 ERROR 12863 --- [         task-2] .a.i.SimpleAsyncUncaughtExceptionHandler : Unexpected exception occurred invoking async method: public void com.sample.project.executeWorkFlow()

java.lang.UnsatisfiedLinkError: Unable to load library 'plctag': Native library (linux-x86-64/libplctag.so) not found in resource path..

I tried searching for this but dont think anybody on earth faced this error.

please some one help..

thanks you

Yash Joshi

unread,
Apr 7, 2021, 6:29:17 AM4/7/21
to libplctag
trying to build it on Ubuntu 18.04 Linux.
If this is even useful

Kyle

unread,
Apr 7, 2021, 11:09:34 PM4/7/21
to libplctag
Hi,

Thanks for using the library and thanks for including all the output of the problem!

Are you using a release with the bundled C DLL or are you using Tag.java on its own?

If you use the JAR file that is on the libplctag4j releases page, it comes with the C DLL bundled in it.  When I build the JAR, I include a matching C DLL.

If you use the Tag.java file directly, then you need to place the C DLL at one of the locations given in the error you showed above.   I usually use /usr/local/lib.

You can get a ZIP file including the C DLL from the C DLL releases page.

Let me know if this helps!

Best,
Kyle
Reply all
Reply to author
Forward
0 new messages