Hi,
When starting Che using OpenJDK instead of the Oracle JDK on some Linux distributions, the following initialization error occurs multiple times in various contexts, and Che doesn’t start:
2015-06-28 12:30:58,842[ost-startStop-1] [ERROR] [o.a.c.c.C.[.[localhost].[/che] 185] - Exception sending context initialized event to listener instance of class org.eclipse.che.inject.CodenvyBootstrap
com.google.inject.CreationException: Guice creation errors:
1) Error injecting constructor, java.lang.UnsatisfiedLinkError: Can't obtain static newInstance method for class com.sun.jna.Structure
at org.eclipse.che.builder.ant.AntBuilder.<init>(AntBuilder.java:116)
at org.eclipse.che.builder.ant.AntBuilder.class(AntBuilder.java:68)
while locating org.eclipse.che.builder.ant.AntBuilder
while locating org.eclipse.che.api.builder.internal.Builder annotated with @com.google.inject.multibindings.Element(setName=,uniqueId=15)
Caused by: java.lang.UnsatisfiedLinkError: Can't obtain static newInstance method for class com.sun.jna.Structure
at com.sun.jna.Native.initIDs(Native Method)
at com.sun.jna.Native.<clinit>(Native.java:137)
at org.eclipse.che.api.core.util.UnixProcessManager.<clinit>(UnixProcessManager.java:46)
This is solved by using a newer version of the JNA library. I’ve submitted a PR (https://github.com/codenvy/che-depmgt/pull/4) that updates the JNA library from version 3.5.2 to
4.1.0.
Another advantage to updating to the 4.1.0 version is that the 3.5.2 version is licensed with LGPL 2 or higher, while the 4.1.0 version is licensed with Apache v2 – see
https://github.com/twall/jna at the very bottom for details.
Regards,
Lior Okman
Area Architect, Development Experience,
Technology Cloud Experience
SAP Labs Israel,
15 Hatidhar st., Raanana 43665, Israel
M +972-54-338-8481
T +972-9-777-9816
Lior.Okman@xxxxxxx