ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Denis Magda <dma...@gridgain.com>
Subject Re: Serialization exception on Ignite class
Date Wed, 12 Aug 2015 07:06:26 GMT
Hi,

Most probably you submit an anonymous class or closure to the Executor. 
This causes serialization of an enclosing class with all its fields.
If this is your case, try to submit a compute task as a static inner class.

--
Denis

>
> On 8/11/2015 8:16 PM, hueb1 wrote:
>> I have two nodes, and I'm using Executor to run some compute tasks that run
>> code in my proprietary library.  I've serialized everything, but am getting
>> the following exception.  Why would it complain about
>> org.apache.ignite.internal.processors.datastreamer.DataStreamerImpl?  That's
>> a class packaged with Ignite and I did not modify it, and I do not have a
>> class called C4.
>>
>>   [17:07:14,650][SEVERE][main][GridTaskWorker] Failed to send job request:
>> null
>> class org.apache.ignite.IgniteCheckedException: Failed to serialize object:
>> C4 []
>>          at
>> org.apache.ignite.marshaller.optimized.OptimizedMarshaller.marshal(OptimizedMarshaller.java:186)
>>          at
>> org.apache.ignite.internal.processors.task.GridTaskWorker.sendRequest(GridTaskWorker.java:1127)
>>          at
>> org.apache.ignite.internal.processors.task.GridTaskWorker.processMappedJobs(GridTaskWorker.java:540)
>>          at
>> org.apache.ignite.internal.processors.task.GridTaskWorker.body(GridTaskWorker.java:432)
>>          at
>> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:108)
>>          at
>> org.apache.ignite.internal.processors.task.GridTaskProcessor.startTask(GridTaskProcessor.java:618)
>>          at
>> org.apache.ignite.internal.processors.task.GridTaskProcessor.execute(GridTaskProcessor.java:344)
>>          at
>> org.apache.ignite.internal.processors.closure.GridClosureProcessor.runAsync(GridClosureProcessor.java:195)
>>          at
>> org.apache.ignite.internal.processors.closure.GridClosureProcessor.runAsync(GridClosureProcessor.java:169)
>>          at
>> org.apache.ignite.internal.executor.GridExecutorService.submit(GridExecutorService.java:285)
>>          at ignite_poc.S3DataProcessor.loadFile(S3DataProcessor.java:123)
>>          at ignite_poc.S3DataProcessor.process(S3DataProcessor.java:105)
>>          at ignite_poc.S3DataProcessor.main(S3DataProcessor.java:170)
>> Caused by: java.io.NotSerializableException: Must implement
>> java.io.Serializable or set OptimizedMarshaller.setRequireSerializable() to
>> false (note that performance may degrade if object is not Serializable):
>> org.apache.ignite.internal.processors.datastreamer.DataStreamerImpl
>>          at
>> org.apache.ignite.marshaller.optimized.OptimizedClassDescriptor.write(OptimizedClassDescriptor.java:703)
>>          at
>> org.apache.ignite.marshaller.optimized.OptimizedObjectOutputStream.writeObject0(OptimizedObjectOutputStream.java:217)
>>          at
>> org.apache.ignite.marshaller.optimized.OptimizedObjectOutputStream.writeFields(OptimizedObjectOutputStream.java:509)
>>          at
>> org.apache.ignite.marshaller.optimized.OptimizedObjectOutputStream.writeSerializable(OptimizedObjectOutputStream.java:321)
>>          at
>> org.apache.ignite.marshaller.optimized.OptimizedClassDescriptor.write(OptimizedClassDescriptor.java:710)
>>          at
>> org.apache.ignite.marshaller.optimized.OptimizedObjectOutputStream.writeObject0(OptimizedObjectOutputStream.java:217)
>>          at
>> org.apache.ignite.marshaller.optimized.OptimizedObjectOutputStream.writeFields(OptimizedObjectOutputStream.java:509)
>>          at
>> org.apache.ignite.marshaller.optimized.OptimizedObjectOutputStream.writeSerializable(OptimizedObjectOutputStream.java:321)
>>          at
>> org.apache.ignite.marshaller.optimized.OptimizedClassDescriptor.write(OptimizedClassDescriptor.java:710)
>>          at
>> org.apache.ignite.marshaller.optimized.OptimizedObjectOutputStream.writeObject0(OptimizedObjectOutputStream.java:217)
>>          at
>> org.apache.ignite.marshaller.optimized.OptimizedObjectOutputStream.writeObjectOverride(OptimizedObjectOutputStream.java:131)
>>          at
>> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:343)
>>          at
>> org.apache.ignite.internal.processors.closure.GridClosureProcessor$C4.writeExternal(GridClosureProcessor.java:1810)
>>          at
>> org.apache.ignite.marshaller.optimized.OptimizedObjectOutputStream.writeExternalizable(OptimizedObjectOutputStream.java:289)
>>          at
>> org.apache.ignite.marshaller.optimized.OptimizedClassDescriptor.write(OptimizedClassDescriptor.java:697)
>>          at
>> org.apache.ignite.marshaller.optimized.OptimizedObjectOutputStream.writeObject0(OptimizedObjectOutputStream.java:217)
>>          at
>> org.apache.ignite.marshaller.optimized.OptimizedObjectOutputStream.writeObjectOverride(OptimizedObjectOutputStream.java:131)
>>          at
>> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:343)
>>          at
>> org.apache.ignite.marshaller.optimized.OptimizedMarshaller.marshal(OptimizedMarshaller.java:181)
>>          ... 12 more
>>
>>
>>
>>
>> --
>> View this message in context:http://apache-ignite-users.70518.x6.nabble.com/Serialization-exception-on-Ignite-class-tp908.html
>> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>


Mime
View raw message