Help with getting started (NoClassDefFoundError: com/esotericsoftware/kryo/Serializer)

1,129 views
Skip to first unread message

Ziad Hatahet

unread,
Apr 11, 2015, 3:17:55 PM4/11/15
to quasar-pu...@googlegroups.com
Hi all,

I have a sample base project set up here: https://github.com/hatahet/quasar-test

I run mvn package followed by ./run.sh, and I get the following error:

./run.sh
Hello World!
32
Exception in thread "main" java.lang.NoClassDefFoundError: com/esotericsoftware/kryo/Serializer
    at com.mycompany.app.App.main(App.java:14)
Caused by: java.lang.ClassNotFoundException: com.esotericsoftware.kryo.Serializer
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 1 more


Any tips appreciated.

fa...@paralleluniverse.co

unread,
Apr 12, 2015, 3:35:58 AM4/12/15
to quasar-pu...@googlegroups.com
Hi,

the quasar-core jar contains both the instrumentation agent and the runtime library to use fibers. While the agent is self-contained, the runtime library has additional dependencies that need to be included in the classpath.
The "exec-maven-plugin" can do it for you, like in the Quasar Maven archetype (there is a Gradle template project as well), or you can have a look at Capsule and its Maven plugin (there are 3rd-party Gradle and Leiningen plugins too BTW) in order to make straightforward your Java deployments in general (not only the ones using Quasar).

-- Fabio

Ziad Hatahet

unread,
Apr 12, 2015, 4:12:54 PM4/12/15
to quasar-pu...@googlegroups.com
Thanks, Fabio.

Stephen S.

unread,
Oct 20, 2016, 4:36:10 PM10/20/16
to quasar-pulsar-user
Hello,

I'm having the same problem. But it's not really clear what the solution is. It seems like the run-time class path is fine, as I see kryo-4.0.0.jar in the WAR of my application. Did you mean to say that agent has additional dependencies?
Reply all
Reply to author
Forward
Message has been deleted
0 new messages