难以理解的运行时错误

时间:2016-06-22 04:28:20

标签: java maven intellij-idea bulletphysics

我刚刚升级为使用IntelliJ而不是eclipse与maven和jme3 0.1 beta。现在我得到了一个难以理解的错误信息:

/usr/lib/jvm/java-1.8.0-openjdk-amd64/bin/java -Didea.launcher.port=7532 -Didea.launcher.bin.path=/home/dac/Downloads/idea-IU-145.972.3/bin -Dfile.encoding=UTF-8 -classpath /usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/lib/charsets.jar:/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/lib/ext/cldrdata.jar:/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/lib/ext/dnsns.jar:/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/lib/ext/icedtea-sound.jar:/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/lib/ext/jaccess.jar:/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/lib/ext/localedata.jar:/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/lib/ext/nashorn.jar:/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/lib/ext/sunec.jar:/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/lib/ext/sunjce_provider.jar:/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/lib/ext/sunpkcs11.jar:/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/lib/ext/zipfs.jar:/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/lib/jce.jar:/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/lib/jsse.jar:/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/lib/management-agent.jar:/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/lib/resources.jar:/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/lib/rt.jar:/home/dac/proj/spaceworld/target/classes:/home/dac/Downloads/lib/core.jar:/home/dac/Downloads/lib/joal.jar:/home/dac/Downloads/lib/xpp3.jar:/home/dac/Downloads/lib/lwjgl.jar:/home/dac/Downloads/lib/nifty.jar:/home/dac/Downloads/lib/jinput.jar:/home/dac/Downloads/lib/jsr305.jar:/home/dac/Downloads/lib/jutils.jar:/home/dac/Downloads/lib/simple.jar:/home/dac/Downloads/lib/dense64.jar:/home/dac/Downloads/lib/vecmath.jar:/home/dac/Downloads/lib/denseC64.jar:/home/dac/Downloads/lib/eventbus.jar:/home/dac/Downloads/lib/jogl-all.jar:/home/dac/Downloads/lib/j-ogg-all.jar:/home/dac/Downloads/lib/jme3-core.jar:/home/dac/Downloads/lib/jme3-jogg.jar:/home/dac/Downloads/lib/jme3-jogl.jar:/home/dac/Downloads/lib/joal-main.jar:/home/dac/Downloads/lib/gluegen-rt.jar:/home/dac/Downloads/lib/jme3-lwjgl.jar:/home/dac/Downloads/lib/jglfont-core.jar:/home/dac/Downloads/lib/jme3-blender.jar:/home/dac/Downloads/lib/jme3-desktop.jar:/home/dac/Downloads/lib/jme3-effects.jar:/home/dac/Downloads/lib/jme3-jbullet.jar:/home/dac/Downloads/lib/jme3-plugins.jar:/home/dac/Downloads/lib/jme3-terrain.jar:/home/dac/Downloads/lib/jme3-niftygui.jar:/home/dac/Downloads/lib/jme3-testdata.jar:/home/dac/Downloads/lib/jogl-all-main.jar:/home/dac/Downloads/lib/nifty-examples.jar:/home/dac/Downloads/lib/gluegen-rt-main.jar:/home/dac/Downloads/lib/jme3-networking.jar:/home/dac/Downloads/lib/nifty-style-black.jar:/home/dac/Downloads/lib/nifty-default-controls.jar:/home/dac/Downloads/lib/joal-natives-linux-i586.jar:/home/dac/Downloads/lib/joal-natives-linux-amd64.jar:/home/dac/Downloads/lib/joal-natives-linux-armv6.jar:/home/dac/Downloads/lib/joal-natives-solaris-i586.jar:/home/dac/Downloads/lib/joal-natives-windows-i586.jar:/home/dac/Downloads/lib/joal-natives-android-armv6.jar:/home/dac/Downloads/lib/joal-natives-linux-armv6hf.jar:/home/dac/Downloads/lib/joal-natives-solaris-amd64.jar:/home/dac/Downloads/lib/joal-natives-windows-amd64.jar:/home/dac/Downloads/lib/lwjgl-platform-natives-osx.jar:/home/dac/Downloads/lib/jinput-platform-natives-osx.jar:/home/dac/Downloads/lib/jogl-all-natives-linux-i586.jar:/home/dac/Downloads/lib/joal-natives-android-aarch64.jar:/home/dac/Downloads/lib/jogl-all-natives-linux-amd64.jar:/home/dac/Downloads/lib/jogl-all-natives-linux-armv6.jar:/home/dac/Downloads/lib/lwjgl-platform-natives-linux.jar:/home/dac/Downloads/lib/gluegen-rt-natives-linux-i586.jar:/home/dac/Downloads/lib/jinput-platform-natives-linux.jar:/home/dac/Downloads/lib/joal-natives-macosx-universal.jar:/home/dac/Downloads/lib/jogl-all-natives-solaris-i586.jar:/home/dac/Downloads/lib/jogl-all-natives-windows-i586.jar:/home/dac/Downloads/lib/gluegen-rt-natives-linux-amd64.jar:/home/dac/Downloads/lib/gluegen-rt-natives-linux-armv6.jar:/home/dac/Downloads/lib/jogl-all-natives-android-armv6.jar:/home/dac/Downloads/lib/jogl-all-natives-linux-armv6hf.jar:/home/dac/Downloads/lib/jogl-all-natives-solaris-amd64.jar:/home/dac/Downloads/lib/jogl-all-natives-windows-amd64.jar:/home/dac/Downloads/lib/lwjgl-platform-natives-windows.jar:/home/dac/Downloads/lib/gluegen-rt-natives-solaris-i586.jar:/home/dac/Downloads/lib/gluegen-rt-natives-windows-i586.jar:/home/dac/Downloads/lib/jinput-platform-natives-windows.jar:/home/dac/Downloads/lib/gluegen-rt-natives-android-armv6.jar:/home/dac/Downloads/lib/gluegen-rt-natives-linux-armv6hf.jar:/home/dac/Downloads/lib/gluegen-rt-natives-solaris-amd64.jar:/home/dac/Downloads/lib/gluegen-rt-natives-windows-amd64.jar:/home/dac/Downloads/lib/jogl-all-natives-android-aarch64.jar:/home/dac/Downloads/lib/jogl-all-natives-macosx-universal.jar:/home/dac/Downloads/lib/gluegen-rt-natives-android-aarch64.jar:/home/dac/Downloads/lib/gluegen-rt-natives-macosx-universal.jar:/home/dac/Downloads/cai-nmgen-0.2.0.jar:/home/dac/.m2/repository/cz/advel/jbullet/jbullet/20101010/jbullet-20101010.jar:/home/dac/.m2/repository/java3d/vecmath/1.3.1/vecmath-1.3.1.jar:/home/dac/.m2/repository/asm/asm-all/3.1/asm-all-3.1.jar:/home/dac/.m2/repository/ant/ant/1.6.5/ant-1.6.5.jar:/home/dac/.m2/repository/org/cogchar/ext.bundle.opengl.nifty/1.0.9.1/ext.bundle.opengl.nifty-1.0.9.1.jar:/home/dac/.m2/repository/org/bushe/eventbus/1.3/eventbus-1.3.jar:/home/dac/.m2/repository/xpp3/xpp3/1.1.4c/xpp3-1.1.4c.jar:/home/dac/.m2/repository/org/jmonkeyengine/jme3-core/3.1.0-beta1/jme3-core-3.1.0-beta1.jar:/home/dac/.m2/repository/org/jmonkeyengine/jme3-desktop/3.1.0-beta1/jme3-desktop-3.1.0-beta1.jar:/home/dac/.m2/repository/org/jmonkeyengine/jme3-lwjgl/3.1.0-beta1/jme3-lwjgl-3.1.0-beta1.jar:/home/dac/.m2/repository/org/lwjgl/lwjgl/lwjgl/2.9.3/lwjgl-2.9.3.jar:/home/dac/.m2/repository/org/lwjgl/lwjgl/lwjgl-platform/2.9.3/lwjgl-platform-2.9.3-natives-windows.jar:/home/dac/.m2/repository/org/lwjgl/lwjgl/lwjgl-platform/2.9.3/lwjgl-platform-2.9.3-natives-linux.jar:/home/dac/.m2/repository/org/lwjgl/lwjgl/lwjgl-platform/2.9.3/lwjgl-platform-2.9.3-natives-osx.jar:/home/dac/.m2/repository/net/java/jinput/jinput/2.0.5/jinput-2.0.5.jar:/home/dac/.m2/repository/net/java/jutils/jutils/1.0.0/jutils-1.0.0.jar:/home/dac/.m2/repository/net/java/jinput/jinput-platform/2.0.5/jinput-platform-2.0.5-natives-linux.jar:/home/dac/.m2/repository/net/java/jinput/jinput-platform/2.0.5/jinput-platform-2.0.5-natives-windows.jar:/home/dac/.m2/repository/net/java/jinput/jinput-platform/2.0.5/jinput-platform-2.0.5-natives-osx.jar:/home/dac/Downloads/idea-IU-145.972.3/lib/idea_rt.jar com.intellij.rt.execution.application.AppMain spaceworld.UFOSpaceWorld
Jun 22, 2016 6:25:47 AM com.jme3.system.JmeDesktopSystem initialize
INFO: Running on jMonkeyEngine 3.1-beta1
 * Branch: HEAD
 * Git Hash: 310f4db
 * Build Date: 2016-04-25
Jun 22, 2016 6:25:48 AM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: LWJGL 2.9.3 context running on thread jME3 Main
 * Graphics Adapter: null
 * Driver Version: null
 * Scaling Factor: 1
Jun 22, 2016 6:25:48 AM com.jme3.renderer.opengl.GLRenderer loadCapabilitiesCommon
INFO: OpenGL Renderer Information
 * Vendor: Intel Open Source Technology Center
 * Renderer: Mesa DRI Intel(R) HD Graphics 5500 (Broadwell GT2) 
 * OpenGL Version: 3.0 Mesa 11.2.0
 * GLSL Version: 1.30
 * Profile: Compatibility
Jun 22, 2016 6:25:48 AM com.jme3.audio.openal.ALAudioRenderer initOpenAL
INFO: Audio Renderer Information
 * Device: OpenAL Soft
 * Vendor: OpenAL Community
 * Renderer: OpenAL Soft
 * Version: 1.1 ALSOFT 1.15.1
 * Supported channels: 64
 * ALC extensions: ALC_ENUMERATE_ALL_EXT ALC_ENUMERATION_EXT ALC_EXT_CAPTURE ALC_EXT_DEDICATED ALC_EXT_disconnect ALC_EXT_EFX ALC_EXT_thread_local_context ALC_SOFT_loopback
 * AL extensions: AL_EXT_ALAW AL_EXT_DOUBLE AL_EXT_EXPONENT_DISTANCE AL_EXT_FLOAT32 AL_EXT_IMA4 AL_EXT_LINEAR_DISTANCE AL_EXT_MCFORMATS AL_EXT_MULAW AL_EXT_MULAW_MCFORMATS AL_EXT_OFFSET AL_EXT_source_distance_model AL_LOKI_quadriphonic AL_SOFT_buffer_samples AL_SOFT_buffer_sub_data AL_SOFTX_deferred_updates AL_SOFT_direct_channels AL_SOFT_loop_points AL_SOFT_source_latency
Jun 22, 2016 6:25:48 AM com.jme3.audio.openal.ALAudioRenderer initOpenAL
WARNING: Pausing audio device not supported.
Jun 22, 2016 6:25:48 AM com.jme3.audio.openal.ALAudioRenderer initOpenAL
INFO: Audio effect extension version: 1.0
Jun 22, 2016 6:25:48 AM com.jme3.audio.openal.ALAudioRenderer initOpenAL
INFO: Audio max auxiliary sends: 4
Jun 22, 2016 6:25:49 AM com.jme3.bullet.BulletAppState startPhysicsOnExecutor
SEVERE: null
java.util.concurrent.ExecutionException: java.lang.NoSuchMethodError: com.bulletphysics.dynamics.DiscreteDynamicsWorld.setPreTickCallback(Lcom/bulletphysics/dynamics/InternalTickCallback;)V
    at java.util.concurrent.FutureTask.report(FutureTask.java:122)
    at java.util.concurrent.FutureTask.get(FutureTask.java:192)
    at com.jme3.bullet.BulletAppState.startPhysicsOnExecutor(BulletAppState.java:121)
    at com.jme3.bullet.BulletAppState.startPhysics(BulletAppState.java:162)
    at com.jme3.bullet.BulletAppState.stateAttached(BulletAppState.java:211)
    at com.jme3.app.state.AppStateManager.attach(AppStateManager.java:133)
    at spaceworld.UFOSpaceWorld.simpleInitApp(UFOSpaceWorld.java:156)
    at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:220)
    at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:130)
    at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:211)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoSuchMethodError: com.bulletphysics.dynamics.DiscreteDynamicsWorld.setPreTickCallback(Lcom/bulletphysics/dynamics/InternalTickCallback;)V
    at com.jme3.bullet.PhysicsSpace.setTickCallback(PhysicsSpace.java:282)
    at com.jme3.bullet.PhysicsSpace.create(PhysicsSpace.java:215)
    at com.jme3.bullet.PhysicsSpace.<init>(PhysicsSpace.java:179)
    at com.jme3.bullet.BulletAppState$1.call(BulletAppState.java:115)
    at com.jme3.bullet.BulletAppState$1.call(BulletAppState.java:112)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    ... 1 more

Jun 22, 2016 6:25:49 AM com.jme3.app.LegacyApplication handleError
SEVERE: Uncaught exception thrown in Thread[jME3 Main,5,main]
java.lang.NullPointerException
    at com.jme3.bullet.BulletAppState.startPhysics(BulletAppState.java:166)
    at com.jme3.bullet.BulletAppState.stateAttached(BulletAppState.java:211)
    at com.jme3.app.state.AppStateManager.attach(AppStateManager.java:133)
    at spaceworld.UFOSpaceWorld.simpleInitApp(UFOSpaceWorld.java:156)
    at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:220)
    at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:130)
    at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:211)
    at java.lang.Thread.run(Thread.java:745)

这是什么意思?

我删除了所有外部广告并使用了pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

    <modelVersion>4.0.0</modelVersion>

    <groupId>com.mycompany</groupId>
    <artifactId>jme3-example</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>jar</packaging>

    <name>JME3 maven project</name>

    <properties>
        <jme3.version>3.1.0-beta1</jme3.version>
    </properties>

    <dependencies>

        <!-- https://mvnrepository.com/artifact/cz.advel.jbullet/jbullet -->
        <dependency>
            <groupId>cz.advel.jbullet</groupId>
            <artifactId>jbullet</artifactId>
            <version>20101010</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.cogchar/ext.bundle.opengl.nifty -->
        <dependency>
            <groupId>org.cogchar</groupId>
            <artifactId>ext.bundle.opengl.nifty</artifactId>
            <version>1.0.9.1</version>
        </dependency>


        <dependency>
            <groupId>org.jmonkeyengine</groupId>
            <artifactId>jme3-core</artifactId>
            <version>${jme3.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jmonkeyengine</groupId>
            <artifactId>jme3-desktop</artifactId>
            <version>${jme3.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jmonkeyengine</groupId>
            <artifactId>jme3-networking</artifactId>
            <version>${jme3.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jmonkeyengine</groupId>
            <artifactId>jme3-jbullet</artifactId>
            <version>${jme3.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jmonkeyengine</groupId>
            <artifactId>jme3-plugins</artifactId>
            <version>${jme3.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jmonkeyengine</groupId>
            <artifactId>jme3-lwjgl</artifactId>
            <version>${jme3.version}</version>
        </dependency>

        <dependency>
            <groupId>org.jmonkeyengine</groupId>
            <artifactId>jme3-bullet</artifactId>
            <version>${jme3.version}</version>
        </dependency>

        <dependency>
            <groupId>org.jmonkeyengine</groupId>
            <artifactId>jme3-effects</artifactId>
            <version>${jme3.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jmonkeyengine</groupId>
            <artifactId>jme3-blender</artifactId>
            <version>${jme3.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jmonkeyengine</groupId>
            <artifactId>jme3-bullet-native</artifactId>
            <version>${jme3.version}</version>
        </dependency>
    </dependencies>

    <repositories>
        <repository>
            <id>bintray-jmonkeyengine-org.jmonkeyengine</id>
            <name>bintray</name>
            <url>http://dl.bintray.com/jmonkeyengine/org.jmonkeyengine</url>
        </repository>
    </repositories>

</project>

1 个答案:

答案 0 :(得分:0)

查看堆栈跟踪,您似乎遇到了类路径冲突。

您的某些依赖库位于/home/dac/Downloads/lib/*下的类路径中,而某些依赖库通过/home/dac/.m2/*下的maven拉入

您可能以前通过环境变量或通过IDE手动配置了本地类路径,但稍后使用maven可能会获得更新版本的库,但您手动下载的库仍旧旧版本缺少某些方法。

检查环境变量或IDE配置,以从类路径中删除手动下载的库。