Closed
Description
I'm receiving the following exception when using hot-reload with the Lettuce Redis library:
Caused by: java.lang.IllegalStateException: The type registry TypeRegistry(id=1346265082,loader=java.net.URLClassLoader) does not know about type id 901
at org.springsource.loaded.TypeRegistry.getReloadableType(TypeRegistry.java:1688)
at org.springsource.loaded.TypeRegistry.idyrun(TypeRegistry.java:1572)
at com.lambdaworks.redis.protocol.RedisStateMachine.safeSet(RedisStateMachine.java:182)
at com.lambdaworks.redis.protocol.RedisStateMachine.decode(RedisStateMachine.java:157)
at com.lambdaworks.redis.protocol.CommandHandler.decode(CommandHandler.java:154)
at com.lambdaworks.redis.protocol.CommandHandler.channelRead(CommandHandler.java:138)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:846)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:110)
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137)
... 1 more
Here is the line in question:
protected void safeSet(CommandOutput<K, V, ?> output, ByteBuffer bytes, RedisCommand<K, V, ?> command) {
safeSet(() -> output.set(bytes), command);
}
Metadata
Metadata
Assignees
Labels
No labels
Activity
longwa commentedon Apr 12, 2016
I'm seeing the same thing reloading in a Grails app using Chronicle-Map to store off-heap data.
gferon commentedon May 4, 2016
I'm also seeing this issue with jsass that is also using lambda expressions from Java 8.
Should we have any hope to see this fix for a future version and Grails 2.x?
aclement commentedon May 6, 2016
If anyone has a complete simple project they can share that demonstrates the problem, that is likely to speed up getting it fixed.
Initial import to show the problem described in spring-projects/sprin…
gferon commentedon May 9, 2016
Thanks! I just published a sample project to reproduce the issue.
Just run the app with the Grails wrapper and JDK8, and the two URLs:
As soon as you make any change to the app (and I guess springloaded is used) the exception gets thrown and the app is rendered useless.
gferon commentedon May 10, 2016
The test commits I made actually fix a different bug not the one described in this ticket 😮
mischkl commentedon Jul 7, 2016
Same issue here! Any word on this?
lquterqtd commentedon Jul 18, 2016
i have seen the same exception,also the lambda expression
equilibric commentedon Sep 9, 2016
+1 - errors out on reload on a line that contains a lambda expression in library that is a dependency.
craigraw commentedon Sep 15, 2016
This issue appears to occur when using Moneta, the javax.money RI. No hot reloading is possible in a Grails 3 app with that dependency.
johngamarra commentedon Oct 8, 2016
+1
timic commentedon Nov 17, 2016
+1
zyro23 commentedon Dec 4, 2016
same issue (or at least stacktrace) with selenium 3.
offending code:
communication with the remote webdriver browser fails after that so it is not just the reload that does not happen but the running app is affected.
also tried to exclude via
exclusions=org.openqa.selenium..*
- didnot help.i think this issue is a real blocker because it happens if any class is reloaded, no matter if completely unrelated to the offending code.
if fixing the root cause is complicated, it would be great if at least excluding works in the meantime.
mischkl commentedon Dec 4, 2016
What is going on with the spring-loaded project in general? Seemingly no development since June, Java 8 code is still broken even though it's been out for two and half years... I guess everyone has moved on to HotSwap agent, or JRebel?
mlaccetti commentedon Dec 5, 2016
I switched to springloaded simply because JRebel became so damn expensive - be miserable for it to simply rot into nothingness.
14 remaining items
mateusmarquezini commentedon Apr 11, 2017
I'm trying to use Spring Loaded version 1.2.7-RELEASE and I'm getting this error every time when I try to make project again on IntelliJ. Does anybody still get this error?
animator013 commentedon Apr 11, 2017
I think it is fixed in 1.2.8.BUILD-SNAPSHOT.
https://repo.spring.io/webapp/#/artifacts/browse/tree/General/libs-snapshot-local/org/springframework/springloaded/1.2.8.BUILD-SNAPSHOT
mateusmarquezini commentedon Apr 12, 2017
thanks @animator013 , I will check this!
selimok commentedon Apr 24, 2017
In my case 1.2.8-SNAPSHOT doesn't solve my problem.
Part of the stack trace:
Problematic part of the code (LegacyUidlWriter.java:91):
animator013 commentedon Apr 26, 2017
@selimok are you sure you are using the 1.2.8 version ? From the exception i see
selimok commentedon Apr 26, 2017
@animator013 thanks for asking, but that was the code dependency for triggering auto reload of UI components. Agent version was 1.2.8-SNAPSHOT downloaded from the link you provided above.
animator013 commentedon Apr 26, 2017
Well it seems it is still not working correctly.
I am using the 1.2.8-snapshot version in Grails. There is still some work which has to be done to correct the reloading.
This issue should be reopened.
graemerocher commentedon Apr 26, 2017
Provide an example that reproduces the problem and we can reopen. Random reports without concrete examples aren't useful.
animator013 commentedon Apr 26, 2017
I think @selimok provided one. I need to further investigate this, it's something odd.
selimok commentedon Apr 26, 2017
Hi There,
Here a ready to execute example: https://github.com/selimok/spring-boot-loaded-vaadin .
Run it and afterwards change anything in MyUI class. You will see above exception I mentioned.
Thanks.
selimok commentedon Apr 26, 2017
@animator013 you were right. Although I passed the right version of springloaded version via -javaagent parameter, in project dependency avoided loading right version of springloaded. After changing pom dependency as 1.2.8.BUILD-SNAPSHOT, the problem is gone.
Sorry for false alarm and thanks for the great work :)
dekay2323 commentedon Jun 6, 2017
I have a similar bug and code to duplicate I am not sure what is causing it.
Here is the code and details
https://github.com/dekay2323/TypeRegistry