Всем привет! Столкнулся с проблемой. Использую библиотеку WorldWind NASA-скую в своем проекте. Сам проект пишу в Idea 14 на Java 8. В Idea все компилируется и запускается отлично, но как только я попытался собрать jar-with-dependencies возникла проблема. При запуске jar-ка вываливается:
Java HotSpot(TM) 64-Bit Server VM warning: You have loaded library /tmp/jogamp_0000/file_cache/jln2853478832317459843/jln6471099643623499225/libgluegen-rt.so which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
Exception in Application constructor
13:18:52.415 [main] ERROR e.p.a.geotarget.GeoTargetApplication - java.lang.RuntimeException: Unable to construct Application instance: class myapp.GeoTargetApplication
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:907)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$152(LauncherImpl.java:182)
at com.sun.javafx.application.LauncherImpl$$Lambda$55/1556956098.run(Unknown Source)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$158(LauncherImpl.java:819)
at com.sun.javafx.application.LauncherImpl$$Lambda$56/793261514.run(Unknown Source)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$172(PlatformImpl.java:326)
at com.sun.javafx.application.PlatformImpl$$Lambda$51/1766822961.run(Unknown Source)
at com.sun.javafx.application.PlatformImpl.lambda$null$170(PlatformImpl.java:295)
at com.sun.javafx.application.PlatformImpl$$Lambda$53/1889656903.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$171(PlatformImpl.java:294)
at com.sun.javafx.application.PlatformImpl$$Lambda$52/1496724653.run(Unknown Source)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
at com.sun.glass.ui.gtk.GtkApplication.lambda$null$48(GtkApplication.java:139)
at com.sun.glass.ui.gtk.GtkApplication$$Lambda$41/1364335809.run(Unknown Source)
... 1 more
Caused by: myapp.GeoTargetException: java.util.concurrent.ExecutionException: java.lang.UnsatisfiedLinkError: /tmp/jogamp_0000/file_cache/jln2853478832317459843/jln6471099643623499225/libgluegen-rt.so: /tmp/jogamp_0000/file_cache/jln2853478832317459843/jln6471099643623499225/libgluegen-rt.so: неправильный класс ELF: ELFCLASS32 (Possible cause: architecture word width mismatch)
at myapp.ui.controls.WorldWindNode.<init>(WorldWindNode.java:40)
at myapp.GeoTargetApplication.<init>(GeoTargetApplication.java:53)
... 18 more
Caused by: java.util.concurrent.ExecutionException: java.lang.UnsatisfiedLinkError: /tmp/jogamp_0000/file_cache/jln2853478832317459843/jln6471099643623499225/libgluegen-rt.so: /tmp/jogamp_0000/file_cache/jln2853478832317459843/jln6471099643623499225/libgluegen-rt.so: неправильный класс ELF: ELFCLASS32 (Possible cause: architecture word width mismatch)
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at myapp.ui.controls.WorldWindNode.<init>(WorldWindNode.java:36)
... 19 more
Caused by: java.lang.UnsatisfiedLinkError: /tmp/jogamp_0000/file_cache/jln2853478832317459843/jln6471099643623499225/libgluegen-rt.so: /tmp/jogamp_0000/file_cache/jln2853478832317459843/jln6471099643623499225/libgluegen-rt.so: неправильный класс ELF: ELFCLASS32 (Possible cause: architecture word width mismatch)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1937)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1822)
at java.lang.Runtime.load0(Runtime.java:809)
at java.lang.System.load(System.java:1086)
at com.jogamp.common.jvm.JNILibLoaderBase.loadLibraryInternal(JNILibLoaderBase.java:575)
at com.jogamp.common.jvm.JNILibLoaderBase.access$000(JNILibLoaderBase.java:64)
at com.jogamp.common.jvm.JNILibLoaderBase$DefaultAction.loadLibrary(JNILibLoaderBase.java:96)
at com.jogamp.common.jvm.JNILibLoaderBase.loadLibrary(JNILibLoaderBase.java:459)
at com.jogamp.common.os.DynamicLibraryBundle$GlueJNILibLoader.loadLibrary(DynamicLibraryBundle.java:388)
at com.jogamp.common.os.Platform$1.run(Platform.java:209)
at java.security.AccessController.doPrivileged(Native Method)
at com.jogamp.common.os.Platform.<clinit>(Platform.java:179)
at javax.media.opengl.GLProfile.<clinit>(GLProfile.java:120)
at gov.nasa.worldwind.Configuration.getMaxCompatibleGLProfile(Unknown Source)
at gov.nasa.worldwind.Configuration.getRequiredGLCapabilities(Unknown Source)
at gov.nasa.worldwind.awt.WorldWindowGLJPanel.<init>(Unknown Source)
at myapp.ui.controls.WorldWindNode.lambda$new$12(WorldWindNode.java:25)
at myapp.ui.controls.WorldWindNode$$Lambda$80/619798096.call(Unknown Source)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:749)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:702)
at java.awt.EventQueue$3.run(EventQueue.java:696)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:719)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Сам же jar-ник я собирал так:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.2</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.5.3</version>
<configuration>
<archive>
<manifest>
<mainClass>myapp.mainClass</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.github.igor-petruk.protobuf</groupId>
<artifactId>protobuf-maven-plugin</artifactId>
<version>0.6.5</version>
<executions>
<execution>
<configuration>
<outputDirectory>src/main/java</outputDirectory>
<cleanOutputFolder>false</cleanOutputFolder>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
Зависимости нужные(как раз из-за которых и вываливается ошибка)
<dependency>
<groupId>gov.nasa</groupId>
<artifactId>worldwind</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>gov.nasa</groupId>
<artifactId>worldwindx</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>org.jogamp.jogl</groupId>
<artifactId>jogl-all-main</artifactId>
<version>2.2.4</version>
</dependency>
<dependency>
<groupId>org.jogamp.gluegen</groupId>
<artifactId>gluegen-rt-main</artifactId>
<version>2.2.4</version>
</dependency>
Сам работаю под debian 8, amd64. Почему у меня в Idea все собирается и работает, а maven подкладывает какие-то другие библиотеки?Как мне решить мою проблему? Хотелось бы, чтобы мне maven собирал цельный jar-ик сразу) Заранее спасибо!