[ https://issues.apache.org/jira/browse/IGNITE-1718?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14965020#comment-14965020 ]
Denis Magda commented on IGNITE-1718: ------------------------------------- Changes looks good. The only minor comment. Please put a comment saying why we perform this check. This will be useful for other contributors when they need to find out how type->id mapping works. {noformat} if (idx == clsName.length() - 1) {noformat} > ScalaPrimeExample fails with "Not enough data to read the value" error when > it's running with portableMarshaller > ---------------------------------------------------------------------------------------------------------------- > > Key: IGNITE-1718 > URL: https://issues.apache.org/jira/browse/IGNITE-1718 > Project: Ignite > Issue Type: Bug > Components: general > Affects Versions: 1.5 > Environment: Ubuntu 14.04, community 1.5.0 build #319 > Reporter: Vasilisa Sidorova > Fix For: 1.5 > > > --------------------------------------------- > DESCRIPTION > --------------------------------------------- > When default optimizedMarshaller is changed into portableMarshaller in > example-ignite.xml then ScalarPrimeExample doesn't start with exception "Not > enough data to read the value" > --------------------------------------------- > STEPS FOR REPRODUCE > --------------------------------------------- > 1. Build examples project in IDE > 2.In the example-ignite.xml change property from: > {noformat} > <property name="marshaller"> > <bean > class="org.apache.ignite.marshaller.optimized.OptimizedMarshaller"> --> > <!-- Set to false to allow non-serializable objects in > examples, default is true. --> > <!-- <property name="requireSerializable" value="false"/> > </bean> > </property> > {noformat} > to > {noformat} > <property name="marshaller"> > <bean class=" > org.apache.ignite.internal.portable.api.PortableMarshaller"/> > </property> > {noformat} > 3. Run ExampleNodeStartup > 4. Run ScalarPrimeExample > --------------------------------------------- > ACTUAL RESULT > --------------------------------------------- > Example is failed with exception: > {noformat} > Exception in thread "ignite-#21%sys-null%" class > org.apache.ignite.internal.portable.api.PortableException: Not enough data to > read the value [position=18, requiredBytes=1, remainingBytes=0] > at > org.apache.ignite.internal.portable.streams.PortableAbstractInputStream.ensureEnoughData(PortableAbstractInputStream.java:288) > at > org.apache.ignite.internal.portable.streams.PortableAbstractInputStream.readByte(PortableAbstractInputStream.java:32) > at > org.apache.ignite.internal.portable.PortableReaderExImpl.doReadByte(PortableReaderExImpl.java:1895) > at > org.apache.ignite.internal.portable.PortableReaderExImpl.doReadClass(PortableReaderExImpl.java:2986) > at > org.apache.ignite.internal.portable.PortableReaderExImpl.readObjectTypeId(PortableReaderExImpl.java:211) > at > org.apache.ignite.internal.portable.PortableReaderExImpl.deserialize(PortableReaderExImpl.java:2142) > at > org.apache.ignite.internal.portable.GridPortableMarshaller.deserialize(GridPortableMarshaller.java:274) > at > org.apache.ignite.internal.portable.api.PortableMarshaller.unmarshal(PortableMarshaller.java:328) > at > org.apache.ignite.internal.processors.task.GridTaskWorker.onResponse(GridTaskWorker.java:762) > at > org.apache.ignite.internal.processors.task.GridTaskProcessor.processJobExecuteResponse(GridTaskProcessor.java:995) > at > org.apache.ignite.internal.processors.task.GridTaskProcessor$JobMessageListener.onMessage(GridTaskProcessor.java:1219) > at > org.apache.ignite.internal.managers.communication.GridIoManager.processRegularMessage0(GridIoManager.java:811) > at > org.apache.ignite.internal.managers.communication.GridIoManager.access$1500(GridIoManager.java:106) > at > org.apache.ignite.internal.managers.communication.GridIoManager$5.run(GridIoManager.java:774) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1157) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:627) > at java.lang.Thread.run(Thread.java:809) > {noformat} > --------------------------------------------- > EXPECTED RESULT > --------------------------------------------- > Example is passed without any exceptions -- This message was sent by Atlassian JIRA (v6.3.4#6332)