ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Denis Magda (Jira)" <j...@apache.org>
Subject [jira] [Commented] (IGNITE-12178) DEBUG logging may throw exception from toString of tx objects
Date Wed, 25 Sep 2019 19:37:00 GMT

    [ https://issues.apache.org/jira/browse/IGNITE-12178?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16938007#comment-16938007
] 

Denis Magda commented on IGNITE-12178:
--------------------------------------

A similar issue was reported on the user list: http://apache-ignite-users.70518.x6.nabble.com/Exception-during-exception-handling-td29464.html

> DEBUG logging may throw exception from toString of tx objects
> -------------------------------------------------------------
>
>                 Key: IGNITE-12178
>                 URL: https://issues.apache.org/jira/browse/IGNITE-12178
>             Project: Ignite
>          Issue Type: Improvement
>          Components: general
>            Reporter: Ilya Kasnacheev
>            Priority: Major
>
> See https://stackoverflow.com/questions/57727242/apache-ignite-failed-to-create-string-representation-of-binary-object
> {code:java}
> 0
> I am getting below exception and not able to figure out what is wrong with the code.
> I have simplified my pojo classes which are to be persisted to ignite cache, but still
the complexity remains.
> All my pojos are serializable but few of them have business logic code, dao, application
context object. These objects can't be removed. Removing these things from the code will require
whole code refractoring.
> 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)
> at org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache$4.apply(GridDhtAtomicCache.java:252)
> at org.apache.ignite.internal.processors.cache.GridCacheIoManager.processMessage(GridCacheIoManager.java:1056)
> at org.apache.ignite.internal.processors.cache.GridCacheIoManager.onMessage0(GridCacheIoManager.java:581)
> at org.apache.ignite.internal.processors.cache.GridCacheIoManager.handleMessage(GridCacheIoManager.java:380)
> at org.apache.ignite.internal.processors.cache.GridCacheIoManager.handleMessage(GridCacheIoManager.java:306)
> at org.apache.ignite.internal.processors.cache.GridCacheIoManager.access$100(GridCacheIoManager.java:101)
> at org.apache.ignite.internal.processors.cache.GridCacheIoManager$1.onMessage(GridCacheIoManager.java:295)
> at org.apache.ignite.internal.managers.communication.GridIoManager.invokeListener(GridIoManager.java:1569)
> at org.apache.ignite.internal.managers.communication.GridIoManager.processRegularMessage0(GridIoManager.java:1197)
> at org.apache.ignite.internal.managers.communication.GridIoManager.access$4200(GridIoManager.java:127)
> at org.apache.ignite.internal.managers.communication.GridIoManager$9.run(GridIoManager.java:1093)
> at org.apache.ignite.internal.util.StripedExecutor$Stripe.body(StripedExecutor.java:505)
> at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:120)
> at java.lang.Thread.run(Thread.java:748)
> Caused by: class org.apache.ignite.IgniteException: Failed to create string representation
of binary object.
> at org.apache.ignite.internal.binary.BinaryObjectExImpl.toString(BinaryObjectExImpl.java:189)
> at org.apache.ignite.internal.binary.BinaryObjectImpl.toString(BinaryObjectImpl.java:920)
> at java.lang.String.valueOf(String.java:2994)
> at org.apache.ignite.internal.util.GridStringBuilder.a(GridStringBuilder.java:101)
> at org.apache.ignite.internal.util.tostring.SBLimitedLength.a(SBLimitedLength.java:88)
> at org.apache.ignite.internal.util.tostring.GridToStringBuilder.toString(GridToStringBuilder.java:939)
> at org.apache.ignite.internal.util.tostring.GridToStringBuilder.toStringImpl(GridToStringBuilder.java:1005)
> ... 27 more
> Caused by: class org.apache.ignite.binary.BinaryObjectException: Failed to read field:
currentContacts
> at org.apache.ignite.internal.binary.BinaryReaderExImpl.wrapFieldException(BinaryReaderExImpl.java:446)
> at org.apache.ignite.internal.binary.BinaryReaderExImpl.unmarshalField(BinaryReaderExImpl.java:343)
> at org.apache.ignite.internal.binary.BinaryObjectImpl.field(BinaryObjectImpl.java:626)
> at org.apache.ignite.internal.binary.BinaryObjectExImpl.toString(BinaryObjectExImpl.java:225)
> at org.apache.ignite.internal.binary.BinaryObjectExImpl.toString(BinaryObjectExImpl.java:186)
> ... 33 more
> Caused by: class org.apache.ignite.binary.BinaryObjectException: Failed to unmarshal
object with optimized marshaller
> at org.apache.ignite.internal.binary.BinaryUtils.doReadOptimized(BinaryUtils.java:1765)
> at org.apache.ignite.internal.binary.BinaryUtils.unmarshal(BinaryUtils.java:1971)
> at org.apache.ignite.internal.binary.BinaryUtils.unmarshal(BinaryUtils.java:1796)
> at org.apache.ignite.internal.binary.BinaryReaderExImpl.unmarshalField(BinaryReaderExImpl.java:340)
> ... 36 more
> Caused by: class org.apache.ignite.IgniteCheckedException: Failed to deserialize object
with given class loader: [clsLdr=sun.misc.Launcher$AppClassLoader@764c12b6, err=Failed to
deserialize object [typeName=java.util.concurrent.ConcurrentHashMap]]
> at org.apache.ignite.internal.marshaller.optimized.OptimizedMarshaller.unmarshal0(OptimizedMarshaller.java:237)
> at org.apache.ignite.marshaller.AbstractNodeNameAwareMarshaller.unmarshal(AbstractNodeNameAwareMarshaller.java:94)
> at org.apache.ignite.internal.binary.BinaryUtils.doReadOptimized(BinaryUtils.java:1762)
> ... 39 more
> Caused by: java.io.IOException: Failed to deserialize object [typeName=java.util.concurrent.ConcurrentHashMap]
> at org.apache.ignite.internal.marshaller.optimized.OptimizedObjectInputStream.readObject0(OptimizedObjectInputStream.java:350)
> at org.apache.ignite.internal.marshaller.optimized.OptimizedObjectInputStream.readObjectOverride(OptimizedObjectInputStream.java:198)
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:425)
> at org.apache.ignite.internal.marshaller.optimized.OptimizedMarshaller.unmarshal0(OptimizedMarshaller.java:228)
> ... 41 more
> Caused by: java.io.IOException: java.lang.reflect.InvocationTargetException
> at org.apache.ignite.internal.marshaller.optimized.OptimizedObjectInputStream.readSerializable(OptimizedObjectInputStream.java:607)
> at org.apache.ignite.internal.marshaller.optimized.OptimizedClassDescriptor.read(OptimizedClassDescriptor.java:954)
> at org.apache.ignite.internal.marshaller.optimized.OptimizedObjectInputStream.readObject0(OptimizedObjectInputStream.java:346)
> ... 44 more
> Caused by: java.lang.reflect.InvocationTargetException
> at sun.reflect.GeneratedMethodAccessor27.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.apache.ignite.internal.marshaller.optimized.OptimizedObjectInputStream.readSerializable(OptimizedObjectInputStream.java:604)
> ... 46 more
> Caused by: java.lang.ClassNotFoundException: com.project.qm.controller.beans.WorkItem
> at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:348)
> at org.apache.ignite.internal.util.IgniteUtils.forName(IgniteUtils.java:8771)
> at org.apache.ignite.internal.MarshallerContextImpl.getClass(MarshallerContextImpl.java:349)
> at org.apache.ignite.internal.marshaller.optimized.OptimizedMarshallerUtils.classDescriptor(OptimizedMarshallerUtils.java:264)
> at org.apache.ignite.internal.marshaller.optimized.OptimizedObjectInputStream.readObject0(OptimizedObjectInputStream.java:341)
> at org.apache.ignite.internal.marshaller.optimized.OptimizedObjectInputStream.readObjectOverride(OptimizedObjectInputStream.java:198)
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:425)
> at java.util.concurrent.ConcurrentHashMap.readObject(ConcurrentHashMap.java:1445)
> {code}
> We should never throw anything out of our toString. Also, we should try minimizing the
amount of text produced by DEBUG logging of transaction handling, which is known to be very
spammy



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message