cancel
Showing results for 
Search instead for 
Did you mean: 

JniAgiLibAdaptor.<init>: Cannot load JNI library on OSX 10.6.2

Former Member
0 Kudos

Hi,

I have a working SAPGUI for Java v7.10 r10 on a MacBook Pro running OS X v10.6.2 (snow leopard) on our portal, i have installed the same SAPGUI for Java v7.10 r10 and configured the service file, Transaction_Configuration, so that the SAPGUI for Java will run as a Java applet in place of a web browser. When i run a suitable iview (using SAPGUI for Java template) in the portal, i get the error- JniAgiLibAdaptor.<init>: Cannot load JNI library. The details for this error are placed below.

I am meeting the requirements for SAPGUI for Java as mentioned in note 959236. Any ideas what i need to do to fix this? BTW- I tried using the lastest 7.20 version SAPGUI for Java on both the portal server and the MacBook Pro but ran into problems with enabling SNC on the MacBook Pro- it refuses to load the library, sncgssk5.dyld. I working with Sap Support on that but i don't think i'm going to get anywhere with that ....

thanks in advance,

Steven McElwee, Duke University

The detailed error-

java.lang.Exception: JniAgiLibAdaptor.<init>: Cannot load JNI library

at: com.sap.platin.r3.protocol.diag.JniAgiLibAdaptor.<init>(JniAgiLibAdaptor.java:30)

at: com.sap.platin.r3.protocol.diag.GuiDiagToAutomationParser.configure(GuiDiagToAutomationParser.java:283)

at: com.sap.platin.base.connection.GuiConnection.open(GuiConnection.java:297)

at: com.sap.platin.base.application.GuiApplication.createAppletConnection(GuiApplication.java:868)

at: com.sap.platin.base.logon.GuiImpl.setConnectionData(GuiImpl.java:336)

at: com.sap.platin.base.logon.GuiImpl.init(GuiImpl.java:213)

at: sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at: sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at: sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at: java.lang.reflect.Method.invoke(Method.java:597)

at: com.sap.platin.micro.Dynamic.callMethod(Dynamic.java:155)

at: com.sap.platin.micro.Dynamic.callMethod(Dynamic.java:139)

at: com.sap.platin.GuiAppletBase2.init(GuiAppletBase2.java:153)

at: sun.applet.AppletPanel.run(AppletPanel.java:424)

at: java.lang.Thread.run(Thread.java:637)

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Rolf-Martin,

Your answer makes perfect sense. thanks so much.

Sincerely,

Steven McElwee, Duke University

Former Member
0 Kudos

Hi Rolf,

This is an excellent answer !! it makes a great deal of sense. Thanks for providing the answer in this public forum as I expect others will run into the same issues I did.

Again- many thanks,

Steven McElwee

RMW
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Steven,

I have seen the support tickets you have created, but I am posting a reply here (also) in order to allow others to access this information as well.

The issues you are describing are all related to bitness (32 vs. 64-bit) of the software parts involved here.

In order to help you understand, I should go into greater detail.

Running SAP GUI for Java as an applet inside Safari with an SNC connection means:

- Safari is running and loading the Java Plug-in

- the JavaVM inside the Java Plug-in runs the Java code of SAP GUI

- the Java SAP GUI code wants to load a [JNI-library|http://en.wikipedia.org/wiki/Java_Native_Interface]

- for SNC connections, the JNI-library needs to load sncgssk5.dyld for Kerberos

- the sncgssk5.dyld needs to call in the Kerberos implementation

At each of the boundaries, the bitness needs to be the same. (e.g. 64-bit Java can not load a 32-bit JNI-library)

Now, finally coming to your particular cases.

SAP GUI for Java 7.10 inside Safari

In Mac OS X 10.6, Safari runs in 64-bit mode when it is running on a suitable CPU.

The 64-bit JSE 6 is loaded then and SAP GUI runs in 64-bit mode.

Then the JNI-Library is tried to be loaded.

However, SAP GUI for Java 7.10 comes only with a 32-bit JNI-library.

Thus the error message.

SAP GUI for Java 7.20 inside Safari

SAP GUI for Java 7.20 comes with both a 32-bit and 64-bit JNI-library.

Thus, loading that library succeeds.

However, the sncgssk5.dyld you have, only is 32-bit. So you end up here one step later.

In you would not want to use SNC, you would be fine with SAP GUI for Java 7.20.

However, we are facing an incompatibility between SAP SNC code and Mac OS X Kerberos code in case of 64-bit. Therefore if you had a 64-bit sncgssk5.dyld and loading Kerberos would succeed, the first call into it would cause SAP GUi for Java and Safari to crash.

Until this is solved, the only workaround I know off is to force Safari to run in 32-bit mode. One option to do so is to go to the Finder Info of Safari and check the "Open in 32-bit mode" option.

Sorry for not having a better answer at the moment.

Best regards

Rolf-Martin

SAP GUI for Java development

P.S. [Note 959236|https://service.sap.com/sap/support/notes/959236] does not mention that Mac OS X 10.6 would be supported.

Former Member
0 Kudos

That is great for Mac, if I could find the "... Safari and check the "Open in 32-bit mode" option". could anyone help please.

Another case that has the same background. I am using SLES 11as Server (SAP Netweaver 2004s, SAP WAS 7.00 and MaxDB 7.4) and OpenSUSE 11.2 Workstations, all 64 Bit. I get Java errors with Java 1.4.2. I updated to Java 1.6.0, and some errors went away ( libxcb: WARNING! Program tries to lock an already locked connection), but I still have the bitness problem.

OpenSUSE also has the whole 32 bit environment installed for compatibility. I still have the problems with:

.......

PM java.util.prefs.FileSystemPreferences checkLockFile0ErrorCode

WARNING: Could not lock System prefs. Unix error code 32693.

java.lang.Exception: JniAgiLibAdaptor.<init>: Cannot load JNI library

.

.

.

ERROR: GuiConnection: Connect failed

JniAgiLibAdaptor.<init>: Cannot load JNI library

How can this problem be solved?

TIA

Former Member
0 Kudos

I forgot to mention that the portal in quesiton is running RHEL 5.x.

-Steven