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

Andrey Mashenkov commented on IGNITE-16028:
-------------------------------------------

[~vermakov] , you try to get Class.forName in the first place, however, we 
checked numeric 'id' before the fix.
Let's make the fast comparison of numerics at first, then, if needed, go deeper 
with the reflection calls.

> Node failure with ClassNotFoundException: wrong validation for Object type
> --------------------------------------------------------------------------
>
>                 Key: IGNITE-16028
>                 URL: https://issues.apache.org/jira/browse/IGNITE-16028
>             Project: Ignite
>          Issue Type: Bug
>          Components: sql
>            Reporter: Vladimir Ermakov
>            Assignee: Vladimir Ermakov
>            Priority: Major
>          Time Spent: 2h 20m
>  Remaining Estimate: 0h
>
> After implementing the fix for IGNITE-13553, we have an issue that Object 
> type can't be used for any other type except the Object one.
>  
> The cache object type can be declared as java.lang.Object. For example,
> {code:java}
> .addQueryField("val_obj", Object.class.getName(), null){code}
> But, we can use BinaryObjectBuilder to build BinaryObject and put it as 
> 'val_obj'.
> For example, 
> {code:java}
> BinaryObjectBuilder bobInner = grid().binary().builder("inner");
> ///
> bob.setField("val_obj", bobInner.build());{code}
> So, we will have an object with 'inner' class name. But a class with that 
> name never existed.
> During type validation (introduced in IGNITE-13553) the binaryObject's typeId 
> and the java.lang.Object typeId will not match. Then we will try to get the 
> class of the object by 'inner' class name, and will definitely face with 
> ClassNotFoundException.
> QueryTypeDescriptorImpl#730 line of code.
>  
> Please, see BasicIndexTest#testCacheSecondaryCompositeIndex reproducer for 
> more details.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to