springloaded error

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

springloaded error

Massimo Lusetti
Hi all,
  Am I the only one that has issue with latest release and springloaded?

I'm not a spring land expert at all, nor a ratpack one but a simple checkout of example-ratpack-gradle-java-app and a ./gradlew run will produce a stacktrace mess on my linux box:

Oct 02, 2014 10:44:20 AM org.springsource.loaded.agent.SpringLoadedPreProcessor preProcess
SEVERE: Unexpected problem transforming call sites
java.lang.IllegalStateException: Unexpected problem processing bytes for class
        at org.springsource.loaded.ConstantPoolChecker2.readConstantPool(ConstantPoolChecker2.java:196)
        at org.springsource.loaded.ConstantPoolChecker2.<init>(ConstantPoolChecker2.java:128)
        at org.springsource.loaded.ConstantPoolChecker2.getReferences(ConstantPoolChecker2.java:102)
        at org.springsource.loaded.MethodInvokerRewriter.rewrite(MethodInvokerRewriter.java:300)
        at org.springsource.loaded.MethodInvokerRewriter.rewriteUsingCache(MethodInvokerRewriter.java:156)
        at org.springsource.loaded.TypeRegistry.methodCallRewriteUseCacheIfAvailable(TypeRegistry.java:828)
        at org.springsource.loaded.agent.SpringLoadedPreProcessor.preProcess(SpringLoadedPreProcessor.java:321)
        at org.springsource.loaded.agent.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:102)
        at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
        at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:428)
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:455)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:367)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
        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)
        at ratpack.server.internal.NettyHandlerAdapter.buildBaseRegistry(NettyHandlerAdapter.java:243)
        at ratpack.server.internal.NettyHanpter.<init>(NettyHandlerAdapter.java:108)
        at ratpack.server.internal.RatpackChannelInitializer.<init>(RatpackChannelInitializer.java:42)
        at ratpack.server.RatpackServerBuilder.lambda$buildChannelInitializer$56(RatpackServerBuilder.java:59)
        at ratpack.server.RatpackServerBuilder$$Lambda$4/1954471782.apply(Unknown Source)
        at ratpack.server.internal.NettyRatpackServer.start(NettyRatpackServer.java:83)
        at ratpack.launch.RatpackMain.start(RatpackMain.java:68)
        at ratpack.launch.RatpackMain.startOrExit(RatpackMain.java:76)
        at ratpack.launch.RatpackMain.main(RatpackMain.java:42)
Caused by: java.lang.IllegalStateException: Entry: 2 18
        at org.springsource.loaded.ConstantPoolChecker2.processConstantPoolEntry(ConstantPoolChecker2.java:335)
        at org.springsource.loaded.ConstantPoolChecker2.readConstantPool(ConstantPoolChecker2.java:186)
        ... 30 more


BTW I'm using native JDK from Oracle:
java version "1.8.0_20"
Java(TM) SE Runtime Environment (build 1.8.0_20-b26)
Java HotSpot(TM) 64-Bit Server VM (build 25.20-b23, mixed mode)

Cheers
Reply | Threaded
Open this post in threaded view
|

Re: springloaded error

Marcin Erdmann
This is a known issue with spring-loaded, see here and here here.

You can get rid of the error by removing spring-loaded dependency from the build script. We should probably also remove it from the example until it's fixed...
Reply | Threaded
Open this post in threaded view
|

Re: springloaded error

Massimo Lusetti
Thanks for confirming it.
Reply | Threaded
Open this post in threaded view
|

Re: springloaded error

Sergey Tselovalnikov
I had the same problem and fixed it, https://github.com/spring-projects/spring-loaded/pull/100.
Solution is simple and works for me.
Hopes, it will be merged soon.
rus
Reply | Threaded
Open this post in threaded view
|

Re: springloaded error

rus
Awesome!