Unable to run Demos on MacOS High sierra -> java.lang.NoClassDefFoundError: pythagoras/f/IDimension

22 views
Skip to first unread message

matrixre...@gmail.com

unread,
Nov 27, 2017, 4:10:15 AM11/27/17
to PlayN
Is this a known issue? Am I missing a dependency?

➜  hello git:(master) ✗ mvn -v
Apache Maven 3.5.2 (138edd61fd100ec658bfa2d307c43b76940a5d7d; 2017-10-18T09:58:13+02:00)
Maven home: /usr/local/Cellar/maven/3.5.2/libexec
Java version: 1.8.0_92, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.12.6", arch: "x86_64", family: "mac"
➜  hello git:(master) ✗ java -version
java version "1.8.0_92"
Java(TM) SE Runtime Environment (build 1.8.0_92-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.92-b14, mixed mode)


➜  hello git:(master) ✗ pwd
/Users/tsanummy/java_gamedev/playn-samples/hello
➜  hello git:(master) ✗ mvn test -Pjava
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] PlayN Hello Metaproject
[INFO] PlayN Hello Assets
[INFO] PlayN Hello Core
[INFO] PlayN Hello Java
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building PlayN Hello Metaproject 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-enforcer-plugin:1.2:enforce (enforce-maven) @ playn-hello ---
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building PlayN Hello Assets 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-enforcer-plugin:1.2:enforce (enforce-maven) @ playn-hello-assets ---
[INFO]
[INFO] --- maven-resources-plugin:2.7:resources (default-resources) @ playn-hello-assets ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.3:compile (default-compile) @ playn-hello-assets ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.7:testResources (default-testResources) @ playn-hello-assets ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/tsanummy/java_gamedev/playn-samples/hello/assets/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.3:testCompile (default-testCompile) @ playn-hello-assets ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ playn-hello-assets ---
[INFO] No tests to run.
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building PlayN Hello Core 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-enforcer-plugin:1.2:enforce (enforce-maven) @ playn-hello-core ---
[INFO]
[INFO] --- maven-source-plugin:2.4:jar-no-fork (attach-sources) @ playn-hello-core ---
[INFO]
[INFO] --- maven-resources-plugin:2.7:resources (default-resources) @ playn-hello-core ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/tsanummy/java_gamedev/playn-samples/hello/core/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.3:compile (default-compile) @ playn-hello-core ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.7:testResources (default-testResources) @ playn-hello-core ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/tsanummy/java_gamedev/playn-samples/hello/core/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.3:testCompile (default-testCompile) @ playn-hello-core ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ playn-hello-core ---
[INFO] No tests to run.
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building PlayN Hello Java 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-enforcer-plugin:1.2:enforce (enforce-maven) @ playn-hello-java ---
[INFO]
[INFO] --- maven-resources-plugin:2.7:resources (default-resources) @ playn-hello-java ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/tsanummy/java_gamedev/playn-samples/hello/java/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.3:compile (default-compile) @ playn-hello-java ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.7:testResources (default-testResources) @ playn-hello-java ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/tsanummy/java_gamedev/playn-samples/hello/java/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.3:testCompile (default-testCompile) @ playn-hello-java ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ playn-hello-java ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-antrun-plugin:1.6:run (default) @ playn-hello-java ---
[INFO] Executing tasks

main:
     [java] Exception in thread "main" java.lang.NoClassDefFoundError: pythagoras/f/IDimension
     [java] at playn.java.LWJGLPlatform.<init>(LWJGLPlatform.java:85)
     [java] at playn.sample.hello.java.HelloGameJava.main(HelloGameJava.java:24)
     [java] Caused by: java.lang.ClassNotFoundException: pythagoras.f.IDimension
     [java] at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
     [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
     [java] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
     [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
     [java] ... 2 more
     [java] Java Result: 1
[INFO] Executed tasks
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] PlayN Hello Metaproject ............................ SUCCESS [  0.226 s]
[INFO] PlayN Hello Assets ................................. SUCCESS [  0.364 s]
[INFO] PlayN Hello Core ................................... SUCCESS [  0.168 s]
[INFO] PlayN Hello Java ................................... SUCCESS [  1.223 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.116 s
[INFO] Finished at: 2017-11-27T10:08:52+01:00
[INFO] Final Memory: 14M/300M
[INFO] -----------------------------------------------------------------------

matrixre...@gmail.com

unread,
Nov 27, 2017, 5:49:59 AM11/27/17
to PlayN
The same happens for all the other samples, so I guess I'm missing a jar, but maven doesn't really show any errors downloading.

guille.r...@gmail.com

unread,
Nov 27, 2017, 6:26:00 AM11/27/17
to PlayN
Looks like you are missing the pythagoras jar (https://github.com/samskivert/pythagoras)

It is referenced in playn/core/pom.xml. No idea why it is not being found, though.

Guillermo

matrixre...@gmail.com

unread,
Nov 27, 2017, 6:41:18 AM11/27/17
to PlayN
Apparently the jar was somehow corrupted?

Fixed it by deleting .m2/repository and:

mvn clean test -Pjava
Reply all
Reply to author
Forward
0 new messages