[ 
https://issues.apache.org/jira/browse/IGNITE-16028?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vladimir Ermakov updated IGNITE-16028:
--------------------------------------
    Description: 
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.

  was:
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.

 

Please, see BasicIndexTest#testCacheSecondaryCompositeIndex reproducer for more 
details.


> 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: 10m
>  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