Highlighted

Loading SO (DLL) in AEM 6.1

Sudh14

12-11-2017

Hello,

I have a requirement to load shared objects (.so) and in the AEM sling service it complains that SO is not available in the java.library.path. But I see that SO is available in the java.library.path .

Please let me know if there is any specific AEM related config to be done for this.

Thanks in advance,

Sudheer

Replies

Highlighted

Jörg_Hoh

Employee

12-11-2017

There is nothing AEM specific in adding native code to the JVM; I have not experience with JNI and OSGI though.

Highlighted

Sudh14

13-11-2017

Thanks Jorg,

Was wondering why it is complaining in AEM as in the same Linux box able to load it in other J2EE application servers.

Thanks,

Sudheer

Highlighted

Jörg_Hoh

Employee

13-11-2017

Not sure. Can you share the exception? And I said, the OSGI environment might require some specific things to do, but these are not specific to AEM.

Jörg

Highlighted

Sudh14

13-11-2017

Please find the below error I get:

13.11.2017 12:08:59.532 *ERROR* [10.204.6.126 [1510596539529] GET /bin/xxx/yyyy/decrypt HTTP/1.1] com.xxx.yy.service.ZServiceImpl Failed: Unexpected exception:no vibesimple in java.library.path

When tried to print the java.library.path it has the path where this libvibesimple.so is located

Thanks ,

Sudheer

Highlighted

Jörg_Hoh

Employee

13-11-2017

So is your library really located in the java.library.path listed on localhost:4502/system/console/status-System Properties?

I also found Using Native Libraries in a Bundle | osgi.enroute.site  which covers some OSGI specifics. I have never worked with JNI and OSGI, I cannot offer more help. Maybe you find more support in an Apache Felix User mailinglist (Apache Felix - Mailing lists ).

Jörg