-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NoClassDefFoundError on run time #37
Comments
Could you please try to give us a reproducer of this problem? When does this occur and with what commands are you working? I guess you are using MySQL? |
Do you think this might be the same issue as #27 ? |
@gonsan did you try the latest version of mod-mysql-postgresql? Does it still occur with |
Hi! I'm experiencing this issue sometimes as well. My setup is:
I tried on both Ubuntu 14.04 and OSX 10.9.5 |
Hi guys. We just figured out that we were redeploying the module |
@raphaelsampaio thanks for that hint! Could it be that you were not waiting for complete deployment of the module? Otherwise there might still be a race condition somewhere but it doesn't occur very often, I guess. |
We are actually using vert.x AsyncResultHandler to check if the module was completely deployed. After the first connection to the database the exception is thrown. We verified this is happening when we try to deploy this module as part of another module's deployment. The scenarios below should explain it better: Scenario 1 Scenario 2 The exception gets thrown only in Scenario 1 and in specific environments. For example, the same test suite would fail because of that exception in Jenkins, but pass in my computer. |
I'm CONSTANTLY getting these now. Not sure why. The particular class that seems to be hanging things up in the current setup is:
I've tried making sure the module loads first - in my main verticle doing: Vertx.deploy_module('io.vertx~mod-mysql-postgresql_2.10~0.3.1', config['async_pg'], 8) do
other verticle...
other verticle...
other verticle...
end Or even: Vertx.deploy_module('io.vertx~mod-mysql-postgresql_2.10~0.3.1', config['async_pg'], 8) do
Vertx.set_timer(30_000) do
other verticle...
other verticle...
other verticle...
end
end However, if I start it in a totally separate vert.x instance that's clustered, it works fine. Pretty annoying =/ |
I also have it happening from time to time for apparently no reason. I noticed the error seems to happen more often when my application is under heavy load, and generally in the first seconds/minutes after the start. The warmup of the server seems to have some influence over it too. I'm not really sure. It's indeed annoying. Sometimes the error reports different classes (NoClassDefFoundError). This is what I saw the last time it happened:
|
I have the same problem. Deploying on my computer works fine, deploying on Jenkins produces:
any ideas? |
I never did make any progress on this - I found it easier to just leave an |
I suppose so. When I add 2000ms delay after Handler is added without any wait until registration is confirmed. When there are few vertx instances in cluster registration can take some time. Maybe then other modules start to query not-totally loaded |
That looks likely to me, though I have very little understanding of this project. |
@EKOSYSTEM I guess you are right here. Do you want to provide a pull request for this? |
Signed-off-by: Joern Bernhardt <[email protected]>
@EKOSYSTEM can you try out the fix here? |
I have this problem.. :(
this module was deployed well.
But, sometimes I have a follow problem on run time.
java.lang.NoClassDefFoundError: com/github/mauricio/async/db/util/ByteBufferUtils$
at com.github.mauricio.async.db.mysql.codec.MySQLFrameDecoder.decode(MySQLFrameDecoder.scala:63)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:241)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:149)
at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:341)
at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:327)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:126)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:507)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:464)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:378)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:350)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: com.github.mauricio.async.db.util.ByteBufferUtils$
at org.vertx.java.platform.impl.ModuleClassLoader.loadFromModule(ModuleClassLoader.java:127)
at org.vertx.java.platform.impl.ModuleClassLoader.loadClass(ModuleClassLoader.java:108)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 13 more
I'm using
lang-scala1.0.0:org.vertx.scala.platform.impl.ScalaVerticleFactoryThe text was updated successfully, but these errors were encountered: