quasar
quasar copied to clipboard
system start java.lang.NoClassDefFoundError: com/esotericsoftware/kryo/Serializer
java11 + quasar0.8.0 springboot start:
java -jar -javaagent:xxx/build/resources/main/java-agents/quasar-core-0.8.0.jar xxx.jar
I met the ERROR:
java.lang.NoClassDefFoundError: com/esotericsoftware/kryo/Serializer at co.paralleluniverse.fibers.Stack.getStack(Stack.java:59) at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.lambda$load$7(ConfigFileApplicationListener.java) at java.lang.Iterable.forEach(Iterable.java:75) at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.load(ConfigFileApplicationListener.java:447) at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.load(ConfigFileApplicationListener.java:336) at org.springframework.boot.context.config.ConfigFileApplicationListener.addPropertySources(ConfigFileApplicationListener.java:215) at org.springframework.boot.context.config.ConfigFileApplicationListener.postProcessEnvironment(ConfigFileApplicationListener.java:198) at org.springframework.boot.context.config.ConfigFileApplicationListener.onApplicationEnvironmentPreparedEvent(ConfigFileApplicationListener.java:185) at org.springframework.boot.context.config.ConfigFileApplicationListener.onApplicationEvent(ConfigFileApplicationListener.java:171) at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127) at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:74) at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:54) at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:364) at org.springframework.boot.SpringApplication.run(SpringApplication.java:323)
I found the quasar-core-0.8.0.jar as a javaagent jar has only its own class without its dependency libs ,for example com/esotericsoftware/kryo/Serialize, so is it the reason to fail?
How can I build a fat quasar-core.0.8.0.jar with all dependencies?
@yangchao228 I actually removed Kryo and fiber serialization from my fork, because the dependency is so old as to cause problems. Take a look here: https://github.com/hiddenswitch/Spellsource/tree/master/quasar-core
If modules are important to you, my fork works well with them, as long as you know what to "switch back on" in the gradle file. Also, this is only really suitable for Java 11 and later.
如何构建具有所有依赖项的胖类星体核心.0.8.0.jar?
I also encountered this problem, did you solve it there?