vert-x / mod-mysql-postgresql

Vert.x 2.x is deprecated - use instead
http://vertx.io/docs/vertx-mysql-postgresql-client/java/
Apache License 2.0
49 stars 17 forks source link

Exception - Buffer was not fully consumed by decoder #38

Closed burlaka closed 10 years ago

burlaka commented 10 years ago

Hello, I encountered with following exception:

{"status":"error","message":"Buffer was not fully consumed by decoder, 23 bytes to read","error":"MODULE_EXCEPTION","exception":"com.github.mauricio.async.db.mysql.codec.MySQLFrameDecoder.decode(MySQLFrameDecoder.scala:168)\nio.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:241)\nio.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:149)\nio.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:332)\nio.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:318)\nio.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:787)\nio.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:125)\nio.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:507)\nio.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:464)\nio.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:378)\nio.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:350)\nio.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116)\njava.lang.Thread.run(Thread.java:745)"}

What's wrong? Many thanks.

Narigo commented 10 years ago

Could you please provide some code that reproduces this problem? Am 20.07.2014 20:24 schrieb "Denis" notifications@github.com:

Hello, I encountered with following exception:

{"status":"error","message":"Buffer was not fully consumed by decoder, 23 bytes to read","error":"MODULE_EXCEPTION","exception":"com.github.mauricio.async.db.mysql.codec.MySQLFrameDecoder.decode(MySQLFrameDecoder.scala:168)\nio.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:241)\nio.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:149)\nio.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:332)\nio.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:318)\nio.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:787)\nio.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:125)\nio.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:507)\nio.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:464)\nio.netty.channel.nio.NioEventLoop. processSelectedKeys(NioEventLoop.java:378)\nio.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:350)\nio.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116)\njava.lang.Thread.run(Thread.java:745)"}

What's wrong? Many thanks.

— Reply to this email directly or view it on GitHub https://github.com/vert-x/mod-mysql-postgresql/issues/38.

burlaka commented 10 years ago

Yes, of course:

JsonObject request = new JsonObject().putString("action", "prepared").putString("statement", "SELECT clientId FROM trackers WHERE trackerId=?").putArray("values", new JsonArray().addString(geoTrackerMessage.getTrackerId()));
getContainer().logger().info(request);
getVertx().eventBus().send("mysql-storage", request, new Handler<Message<JsonObject>>() {

    @Override
    public void handle(Message<JsonObject> response) {
        getContainer().logger().info(response.body());
    }
});
Zwergal commented 10 years ago

I can't reproduce the problem with this little information. Please provide a runnable example with database tables etc.

Narigo commented 10 years ago

Maybe the comments in this issue help: https://github.com/mauricio/postgresql-async/issues/37

Do you have this older user password issue as described there? Maybe it will help if you are able to upgrade this. Otherwise, it looks like we need to wait for the fix from @mauricio

burlaka commented 10 years ago

Many thanks. This is my case. I use mysql 5.1.73.

mauricio commented 10 years ago

The issue has been sorted out, there will be a new version out as soon as sonatype allows me to upload stuff again :(

Narigo commented 10 years ago

Released 0.3.0 and should include the bugfix by @mauricio.

burlaka commented 10 years ago

Thanks. I will try it.