You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Andrey Gura (JIRA)" <ji...@apache.org> on 2015/10/19 20:47:27 UTC

[jira] [Comment Edited] (IGNITE-1718) ScalaPrimeExample fails with "Not enough data to read the value" error when it's running with portableMarshaller

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

Andrey Gura edited comment on IGNITE-1718 at 10/19/15 6:47 PM:
---------------------------------------------------------------

The problem is that all Scala objects has a name that ends with '$' character. {{PortableContext.typeName}} returns empty type name and default type mapper resolves {{TypeId}} to {{0}} that is reserved for {{UNREGISTERED_TYPE_ID}} constant. Client Java code also can have classes with similar names.

Another symptom of this bug is {{No class definition for typeId: 0}} message.

PR created: https://github.com/apache/ignite/pull/165

Waiting for TC.


was (Author: agura):
The problem is that all Scala objects has a name that ends with '$' character. {{PortableContext.typeName}} returns empty type name and default type mapper resolves {{TypeId}} to {{0}} that is reserved for {{UNREGISTERED_TYPE_ID}} constant. Client Java code also can have classes with similar names.

Another symptom of this bug is {{No class definition for typeId: 0}} message.

> 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
>            Assignee: Andrey Gura
>             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)