[ https://issues.apache.org/jira/browse/GEODE-8685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17271723#comment-17271723 ]
ASF GitHub Bot commented on GEODE-8685: --------------------------------------- dschneider-pivotal opened a new pull request #5951: URL: https://github.com/apache/geode/pull/5951 Modified test to fail if it attempts to deserialize values during export. Fixed product export code to no longer deserialize and test now passes. Co-authored-by: Darrel Schneider <dschnei...@vmware.com> (cherry picked from commit 078ceb0187b718d86d6f6e6ec058d2c743e2655a) Thank you for submitting a contribution to Apache Geode. In order to streamline the review of the contribution we ask you to ensure the following steps have been taken: ### For all changes: - [ ] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message? - [ ] Has your PR been rebased against the latest commit within the target branch (typically `develop`)? - [ ] Is your initial contribution a single, squashed commit? - [ ] Does `gradlew build` run cleanly? - [ ] Have you written or updated unit tests to verify your changes? - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? ### Note: Please ensure that once the PR is submitted, check Concourse for build issues and submit an update to your PR as soon as possible. If you need help, please send an email to d...@geode.apache.org. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Exporting data causes a ClassNotFoundException > ---------------------------------------------- > > Key: GEODE-8685 > URL: https://issues.apache.org/jira/browse/GEODE-8685 > Project: Geode > Issue Type: Task > Components: regions > Affects Versions: 1.10.0, 1.11.0, 1.12.0, 1.13.0 > Reporter: Anthony Baker > Assignee: Darrel Schneider > Priority: Major > Labels: GeodeOperationAPI, pull-request-available > Fix For: 1.14.0 > > > See > [https://lists.apache.org/thread.html/rfa4fc47eb4cb4e75c39d7cb815416bebf2ec233d4db24e37728e922e%40%3Cuser.geode.apache.org%3E.] > > Report is that exporting data whose values are Classes defined in a deployed > jar result in a ClassNotFound exception: > {noformat} > [error 2020/10/30 08:54:29.317 PDT <Function Execution Processor2> tid=0x41] > org.apache.geode.cache.execute.FunctionException: > org.apache.geode.SerializationException: A ClassNotFoundException was thrown > while trying to deserialize cached value. > java.io.IOException: org.apache.geode.cache.execute.FunctionException: > org.apache.geode.SerializationException: A ClassNotFoundException was thrown > while trying to deserialize cached value. > at > org.apache.geode.internal.cache.snapshot.WindowedExporter.export(WindowedExporter.java:106) > at > org.apache.geode.internal.cache.snapshot.RegionSnapshotServiceImpl.exportOnMember(RegionSnapshotServiceImpl.java:361) > at > org.apache.geode.internal.cache.snapshot.RegionSnapshotServiceImpl.save(RegionSnapshotServiceImpl.java:161) > at > org.apache.geode.internal.cache.snapshot.RegionSnapshotServiceImpl.save(RegionSnapshotServiceImpl.java:146) > at > org.apache.geode.management.internal.cli.functions.ExportDataFunction.executeFunction(ExportDataFunction.java:62) > at > org.apache.geode.management.cli.CliFunction.execute(CliFunction.java:37) > at > org.apache.geode.internal.cache.MemberFunctionStreamingMessage.process(MemberFunctionStreamingMessage.java:201) > at > org.apache.geode.distributed.internal.DistributionMessage.scheduleAction(DistributionMessage.java:376) > at > org.apache.geode.distributed.internal.DistributionMessage$1.run(DistributionMessage.java:441) > at > java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) > at > java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) > at > org.apache.geode.distributed.internal.ClusterOperationExecutors.runUntilShutdown(ClusterOperationExecutors.java:442) > at > org.apache.geode.distributed.internal.ClusterOperationExecutors.doFunctionExecutionThread(ClusterOperationExecutors.java:377) > at > org.apache.geode.logging.internal.executors.LoggingThreadFactory.lambda$newThread$0(LoggingThreadFactory.java:119) > at java.base/java.lang.Thread.run(Thread.java:834) > Caused by: org.apache.geode.cache.execute.FunctionException: > org.apache.geode.SerializationException: A ClassNotFoundException was thrown > while trying to deserialize cached value. > at > org.apache.geode.internal.cache.snapshot.WindowedExporter$WindowedExportCollector.setException(WindowedExporter.java:383) > at > org.apache.geode.internal.cache.snapshot.WindowedExporter$WindowedExportCollector.addResult(WindowedExporter.java:346) > at > org.apache.geode.internal.cache.execute.PartitionedRegionFunctionResultSender.lastResult(PartitionedRegionFunctionResultSender.java:195) > at > org.apache.geode.internal.cache.execute.AbstractExecution.handleException(AbstractExecution.java:502) > at > org.apache.geode.internal.cache.execute.AbstractExecution.executeFunctionLocally(AbstractExecution.java:353) > at > org.apache.geode.internal.cache.execute.AbstractExecution.lambda$executeFunctionOnLocalPRNode$0(AbstractExecution.java:273) > ... 6 more > Caused by: org.apache.geode.SerializationException: A ClassNotFoundException > was thrown while trying to deserialize cached value. > at > org.apache.geode.internal.cache.EntryEventImpl.deserialize(EntryEventImpl.java:2046) > at > org.apache.geode.internal.cache.EntryEventImpl.deserialize(EntryEventImpl.java:2032) > at > org.apache.geode.internal.cache.VMCachedDeserializable.getDeserializedValue(VMCachedDeserializable.java:135) > at > org.apache.geode.internal.cache.EntrySnapshot.getRawValue(EntrySnapshot.java:111) > at > org.apache.geode.internal.cache.EntrySnapshot.getRawValue(EntrySnapshot.java:99) > at > org.apache.geode.internal.cache.EntrySnapshot.getValue(EntrySnapshot.java:129) > at > org.apache.geode.internal.cache.snapshot.SnapshotPacket$SnapshotRecord.<init>(SnapshotPacket.java:79) > at > org.apache.geode.internal.cache.snapshot.WindowedExporter$WindowedExportFunction.execute(WindowedExporter.java:197) > at > org.apache.geode.internal.cache.execute.AbstractExecution.executeFunctionLocally(AbstractExecution.java:328) > ... 7 more > Caused by: java.lang.ClassNotFoundException: org.myApp.domain.myClass > at > org.apache.geode.internal.ClassPathLoader.forName(ClassPathLoader.java:186) > at > org.apache.geode.internal.InternalDataSerializer.getCachedClass(InternalDataSerializer.java:3114) > at org.apache.geode.DataSerializer.readClass(DataSerializer.java:264) > at > org.apache.geode.internal.InternalDataSerializer.readDataSerializable(InternalDataSerializer.java:2327) > at > org.apache.geode.internal.InternalDataSerializer.basicReadObject(InternalDataSerializer.java:2513) > at > org.apache.geode.DataSerializer.readObject(DataSerializer.java:2864) > {noformat} > This seemed to work in 1.10.0. Test case is at > https://github.com/claudiu-balciza/GeodeDeserializationErrorPOC/tree/develop. -- This message was sent by Atlassian Jira (v8.3.4#803005)