猿问

Apache Ignite:无法创建二进制对象的字符串表示形式

我遇到异常,无法弄清楚代码出了什么问题。

我已经简化了我的 pojo 类,这些类将被持久化以点燃缓存,但复杂性仍然存在。

我的所有 pojo 都是可序列化的,但其中很少有业务逻辑代码、dao、应用程序上下文对象。这些对象无法删除。从代码中删除这些内容将需要重构整个代码。

class org.apache.ignite.IgniteException: Failed to create string representation of binary object.

at org.apache.ignite.internal.util.tostring.GridToStringBuilder.toStringImpl(GridToStringBuilder.java:1022)

at org.apache.ignite.internal.util.tostring.GridToStringBuilder.toString(GridToStringBuilder.java:864)

at org.apache.ignite.internal.processors.cache.distributed.near.GridNearSingleGetResponse.toString(GridNearSingleGetResponse.java:317)

at java.lang.String.valueOf(String.java:2994)

at java.lang.StringBuilder.append(StringBuilder.java:131)

at org.apache.ignite.internal.processors.cache.GridCacheIoManager.send(GridCacheIoManager.java:1162)

at org.apache.ignite.internal.processors.cache.GridCacheIoManager.send(GridCacheIoManager.java:1209)

at org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter$6.apply(GridDhtCacheAdapter.java:1003)

at org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter$6.apply(GridDhtCacheAdapter.java:938)

at org.apache.ignite.internal.util.future.GridFutureAdapter.notifyListener(GridFutureAdapter.java:385)

at org.apache.ignite.internal.util.future.GridFutureAdapter.listen(GridFutureAdapter.java:355)

at org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter.processNearSingleGetRequest(GridDhtCacheAdapter.java:938)

at org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.access$300(GridDhtAtomicCache.java:135)

at org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache$4.apply(GridDhtAtomicCache.java:257)


一只萌萌小番薯
浏览 130回答 1
1回答

一只名叫tom的猫

在这种情况下,您应该禁用DEBUG日志记录。DEBUG日志记录有时会尝试对不需要反序列化(并以类形式呈现)的对象调用 toString 。将全局日志级别更改为INFO可以解决此问题。
随时随地看视频慕课网APP

相关分类

Java
我要回答