gpt4 book ai didi

cassandra - SLF4J:无法在 [com.datastax.driver.core.Responses$Result$Rows] 类型的对象上调用 toString()

转载 作者:行者123 更新时间:2023-12-03 08:03:33 25 4
gpt4 key购买 nike

使用

  • Cassandra 核心:2.1.0
  • slf4j:slf4j-api-1.7.6.jar
  • slf4j-log4j:slf4j-log4j12-1.7.2.jar

  • 我经常在 tomcat catalina.out 中打印此消息,而应用程序中没有任何功能损失:
    SLF4J: Failed toString() invocation on an object of type [com.datastax.driver.core.Responses$Result$Rows]
    com.datastax.driver.core.exceptions.InvalidTypeException: Invalid 32-bits integer value, expecting 4 bytes but got 20
    at com.datastax.driver.core.TypeCodec$IntCodec.deserializeNoBoxing(TypeCodec.java:672)
    at com.datastax.driver.core.TypeCodec$IntCodec.deserialize(TypeCodec.java:667)
    at com.datastax.driver.core.TypeCodec$IntCodec.deserialize(TypeCodec.java:634)
    at com.datastax.driver.core.TypeCodec$ListCodec.deserialize(TypeCodec.java:922)
    at com.datastax.driver.core.TypeCodec$ListCodec.deserialize(TypeCodec.java:848)
    at com.datastax.driver.core.DataType.deserialize(DataType.java:546)
    at com.datastax.driver.core.Responses$Result$Rows.toString(Responses.java:430)
    at org.slf4j.helpers.MessageFormatter.safeObjectAppend(MessageFormatter.java:305)
    at org.slf4j.helpers.MessageFormatter.deeplyAppendParameter(MessageFormatter.java:277)
    at org.slf4j.helpers.MessageFormatter.arrayFormat(MessageFormatter.java:231)
    at ch.qos.logback.classic.spi.LoggingEvent.getFormattedMessage(LoggingEvent.java:298)
    at ch.qos.logback.classic.spi.LoggingEvent.prepareForDeferredProcessing(LoggingEvent.java:208)
    at ch.qos.logback.core.OutputStreamAppender.subAppend(OutputStreamAppender.java:206)
    at ch.qos.logback.core.rolling.RollingFileAppender.subAppend(RollingFileAppender.java:175)
    at ch.qos.logback.core.OutputStreamAppender.append(OutputStreamAppender.java:103)
    at ch.qos.logback.core.UnsynchronizedAppenderBase.doAppend(UnsynchronizedAppenderBase.java:88)
    at ch.qos.logback.core.spi.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:48)
    at ch.qos.logback.classic.Logger.appendLoopOnAppenders(Logger.java:273)
    at ch.qos.logback.classic.Logger.callAppenders(Logger.java:260)
    at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:442)
    at ch.qos.logback.classic.Logger.filterAndLog_2(Logger.java:433)
    at ch.qos.logback.classic.Logger.trace(Logger.java:454)
    at com.datastax.driver.core.Connection$Dispatcher.messageReceived(Connection.java:558)
    at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80)
    at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
    at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:783)
    at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:302)
    at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:76)
    at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
    at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:783)
    at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:302)
    at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:321)
    at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:299)
    at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:214)
    at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80)
    at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
    at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)
    at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:274)
    at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:261)
    at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:351)
    at org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:282)
    at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:202)
    at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
    at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:44)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)

    任何了解 cassandra 或 slf4j 的人都可以帮助找出导致打印这些消息的原因吗?我在开发环境中看不到这些消息。在生产环境中,它导致我的 catalina.out 被填满和维护开销。

    最佳答案

    尝试删除 target项目中的文件夹并重建它。某些类可能会被缓存。

    关于cassandra - SLF4J:无法在 [com.datastax.driver.core.Responses$Result$Rows] 类型的对象上调用 toString(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26416072/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com