java not loading the JNI library

Bug #257704 reported by don hardaway
6
Affects Status Importance Assigned to Milestone
java-common (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Below are links to two files. Put them on your desktop and then in a terminal window go to the desktop and issue the following command-- java -jar PlatinGUI-Linux-710r4.jar This should install the sapgui in Other in the applications menu. The ini file contains the connection info necessary to connect to the server so you don't need to do anything with it since the sapgui will access it. Launch the Sapgui and then try to connect to any one of the three choices and it should produce the following error. I am running this on a Macbook Pro (Santa Rosa)64bit. This same java SAPGUI runs fine when i boot into the Mac OS. Hope this helps.

The version of Java being used is:

hardaway@hardaway-laptop:~$ java -version
java version "1.6.0_06"
Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
Java HotSpot(TM) 64-Bit Server VM (build 10.0-b22, mixed mode)

http://165.134.224.21/PlatinGUI-Linux-710r4.jar
http://165.134.224.21/saplogon.ini

Thank You,
don

java.lang.Exception: JniAgiLibAdaptor.<init>: Cannot load JNI library
at: com.sap.platin.r3.protocol.diag.JniAgiLibAdaptor.<init>(JniAgiLibAdaptor.java:29)
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.createConnection(GuiApplication.java:794)
at: com.sap.platin.base.logon.GuiLogonFrame.doConnect(GuiLogonFrame.java:829)
at: com.sap.platin.base.logon.GuiLogonFrame$SymListener.actionPerformed(GuiLogonFrame.java:434)
at: javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at: javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at: javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at: javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at: javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at: java.awt.Component.processMouseEvent(Component.java:6041)
at: javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
at: java.awt.Component.processEvent(Component.java:5806)
at: java.awt.Container.processEvent(Container.java:2058)
at: java.awt.Component.dispatchEventImpl(Component.java:4413)
at: java.awt.Container.dispatchEventImpl(Container.java:2116)
at: java.awt.Component.dispatchEvent(Component.java:4243)
at: java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
at: java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
at: java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
at: java.awt.Container.dispatchEventImpl(Container.java:2102)
at: java.awt.Window.dispatchEventImpl(Window.java:2440)
at: java.awt.Component.dispatchEvent(Component.java:4243)
at: java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at: com.sap.platin.micro.event.GuiEventQueue.dispatchEvent(GuiEventQueue.java:73)
at: java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at: java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at: java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at: java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at: java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at: java.awt.EventDispatchThread.run(EventDispatchThread.java:121)

Revision history for this message
Etienne Goyer (etienne-goyer-outlands) wrote :

The applicationw work out-of-the-box on Ubuntu 32 bits; the above problem is specific to running SAPgui on Ubuntu 64 bits (and probably other 64 bits Linux distribution).

The problem is due to the fact that the above SAPgui is not a true Java application; it is an hybrid Java/C++ application, where the 32 bits binary shared object are linked from the Java application core using JNI. Predictably, this fail when using a 64 bits JRE.

The solution is fairly simple if somewhat unobvious:

1. Install a 32 bits JRE (ie, the ia32-sun-java6-jre package):

    sudo apt-get install ia32-sun-java6-jre

2. Export an environment variable called PLATIN_JAVA, which the SAPgui look at to determine the java executable to use, pointing at the actual java executable from the 32 bits JRE. For example, if you installed the ia32-sun-java6-jre package as suggested above, you could add a line such as the following to /etc/environment:

    PLATIN_JAVA=/usr/lib/jvm/ia32-java-6-sun-1.6.0.06/jre/bin/java

(Caveat: if the path to the 32 bits java executable ever change, the above will need to be updated)

Finally, if someone happen to be in contact with SAP support or the developer team responsible for SAPgui, it might be good to ask them to add this problem to their list of known issue (the documentation installed along with the application do list the requirement for a 32 bits JRE, bit make no mention of the potential problem on 64 bits Linux distribution). Unfortunately, the documentation bundled with the SAPgui above contain no contact information.

Revision history for this message
Matthias Klose (doko) wrote :

> PLATIN_JAVA=/usr/lib/jvm/ia32-java-6-sun-1.6.0.06/jre/bin/java
>
> (Caveat: if the path to the 32 bits java executable ever change, the above will need to be updated)

Use /usr/lib/jvm/ia32-java-6-sun/jre/bin/java instead

Revision history for this message
Fabián Rodríguez (magicfab) wrote :

Marking as invalid, not a problem we can fix in Ubuntu.

SAP should be shipping both and determining which one is needed at runtime... or else. But we can't fix this.

Changed in java-common:
status: New → Invalid
Revision history for this message
Teleios (alejandro-willers) wrote :

It works!

I had the same problem and installing JAVA for 32 bits fix the error.

Thank you very much!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.