[
https://issues.apache.org/jira/browse/IGNITE-5966?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16149085#comment-16149085
]
ASF GitHub Bot commented on IGNITE-5966:
----------------------------------------
GitHub user kukushal opened a pull request:
https://github.com/apache/ignite/pull/2568
Fix for IGNITE-5966
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/gridgain/apache-ignite master-ignite-5966
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/ignite/pull/2568.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #2568
----
commit 337622723977ddb74f92a310b69658cac158bb77
Author: Alexey Kukushkin <[email protected]>
Date: 2017-08-31T14:44:11Z
Fix for IGNITE-5966
----
> IgniteCache#get() fails with "Requesting mapping from grid failed" when
> deserialising binary object loaded from CacheJdbcPojoStoreFactory
> -----------------------------------------------------------------------------------------------------------------------------------------
>
> Key: IGNITE-5966
> URL: https://issues.apache.org/jira/browse/IGNITE-5966
> Project: Ignite
> Issue Type: Bug
> Environment: Ignite 2.1.4
> Reporter: Alexey Kukushkin
> Assignee: Alexey Kukushkin
> Fix For: 2.3
>
>
> STEPS TO REPRODUCE
> 1. A running MySQL database with at least one table with an Integer key and
> some data
> 2. Use WebConsole to automatically generate an Ignite project from the RDBMS.
> In the WebConsole add a cache for the table containing data
> 3. Build the project
> 4. Start the cluster (run ServerNodeSpringStartup)
> 5. Load the data (run LoadCaches)
> 6. Run simple "get data" code against the running cluster with the data
> loaded. Make sure you do NOT keep binary and do NOT put anything to the cache
> except loading data on step #5. For example, if the cache is "AircraftCache",
> the type is "Aircraft" and a row with ID 1 exists in the DB, then:
> IgniteCache<Integer, Aircraft> aircraftCache =
> ignite.getOrCreateCache("AircraftCache");
> System.out.format("1->%s\n", aircraftCache.get(1));
> EXPECTED:
> 1...5: Project is generated, cluster runs, data is loaded
> 6: The entry with ID 1 is output to the console
> ACTUAL:"
> 1..5: As expected
> 6: javax.cache.CacheException: class
> org.apache.ignite.IgniteCheckedException: Requesting mapping from grid failed
> for [platformId=0, typeId=-1267085398]
> ANALYSIS
> The “typeId -> MappedName” mappings are stored in the
> MarshallerContextImpl$allCaches[platformId] map.
> My understanding is according to the existing implementations it is expected
> the mapping will always be registered when BinaryContext#descriptorForClass()
> -> MarshallerContextImpl#registerClassName(typeId) is called either from
> BinaryWriterExImpl or BinaryReaderExImpl.
> However, that mechanism is never called when
> CacheJdbcPojoStore@buildBinaryObject builds the object, calling
> BinaryObjectBuilderImpl#build(). The latter method still requests
> BinaryContext#updateMetadata, which updates
> CacheObjectBinaryProcessorImpl#metadataFileStore on all server nodes. But the
> metadataFileStore is not the place where MarshallerContextImpl get mappings
> from.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)