By ClassName I meant the name of the offending class, not a class named ClassName.  Sorry for the confusion there.

You're hitting a failure in a test that ensures that classes in sanctioned-geode-core-serializables.txt can be serialized and deserialized.  The serialization filter is objecting to some class that's being deserialized and the test ought to have logged the name of that class.  You don't have to have modified the attributesImpl class to cause this kind of failure - you only need to have changed some class used by a default instance of the attributesImpl class.

If I had to guess I'd say there is a new Enumeration or something similar that's now being used and needs to be put into the sanctioned-geode-core-serializables.txt file.

This begs another question:  Is the change you made going to break rolling upgrade?  I don't know why the attributesImpl class is serializable but if it's used to exchange region configuration information between servers then it's not satisfactory to adjust the sanctioned-geode-core-serializables.txt file to fix this unit test failure.


On 10/4/18 1:24 PM, Kirk Lund wrote:
But I didn't add or touch the class ClassName -- according to git log,
Jinmei and Patrick created it in the following commit on 1/29/18 -- I
haven't touched this at all on my branch:

GEODE-3915: use ClassName type for cache-loader, writer and listeners
(#1327)

* GEODE-3915: use ClassName type for cache-loader, writer and listeners

* use json string to specify the init properties
* make sure the parser works when multiple ClassNames are specified in the
command line.
* rework AlterRegionCommandDUnitTest
* make sure AnalyzeSerializableJunitTest works in IDEA.

Signed-off-by: Patrick Rhomberg <prhomb...@pivotal.io>

On Thu, Oct 4, 2018 at 11:10 AM, Bruce Schuchardt <bschucha...@pivotal.io>
wrote:

It looks like your region attributes contain an instance of a class that
isn't in sanctioned-geode-core-serializables.txt.  It's also possible
that you added the class to that file but it didn't get properly copied to
the output directory, so you might check that too.

Output of this test should include a Fatal level log message that tells
you what the rejected class was:

Serialization filter is rejecting class ClassName



On 10/3/18 1:10 PM, Kirk Lund wrote:

Sure is! https://github.com/kirklund/geode/tree/GEODE-2644-Appenders-
steps3

My branch has no changes to org.apache.geode.cache.AttributesFactory or
its
inner class(es) though. I even double-checked with:

$ git log
./geode-core/src/main/java/org/apache/geode/cache/AttributesFactory.java

It just shows a couple commits by Bruce which came to my branch via
develop.

On Wed, Oct 3, 2018 at 10:38 AM, Nabarun Nag <n...@pivotal.io> wrote:

I used to see this issue when I  make changes in the serializable class or
its members but don't reflect it in the
sanctioned-geode-core-serializables.txt file.
If I am using a custom object in a test or something I add it
as SERIALIZABLE_OBJECT_FILTER property.

Is your branch hosted in github?

Regards
Nabarun


On Wed, Oct 3, 2018 at 10:24 AM Kirk Lund <kl...@apache.org> wrote:

I have a failure on my branch that doesn't seem related to my changes.
Anyone know what's causing this failure?

Thanks!

java.lang.AssertionError: I was unable to deserialize
org.apache.geode.cache.AttributesFactory$RegionAttributesImpl
at

org.apache.geode.codeAnalysis.AnalyzeSerializablesJUnitTestBase.

serializeAndDeserializeSanctionedObject(AnalyzeSerializablesJUnitTestB
ase.java:401)

at

org.apache.geode.codeAnalysis.AnalyzeSerializablesJUnitTestBase.

testSanctionedClassesExistAndDoDeserialize(AnalyzeSerializab
lesJUnitTestB
ase.java:318)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at

sun.reflect.NativeMethodAccessorImpl.invoke(

NativeMethodAccessorImpl.java:62)

at

sun.reflect.DelegatingMethodAccessorImpl.invoke(

DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)
at

org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(

FrameworkMethod.java:50)

at

org.junit.internal.runners.model.ReflectiveCallable.run(

ReflectiveCallable.java:12)

at

org.junit.runners.model.FrameworkMethod.invokeExplosively(

FrameworkMethod.java:47)

at

org.junit.internal.runners.statements.InvokeMethod.

evaluate(InvokeMethod.java:17)

at

org.junit.internal.runners.statements.RunBefores.

evaluate(RunBefores.java:26)

at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at

org.junit.runners.BlockJUnit4ClassRunner.runChild(

BlockJUnit4ClassRunner.java:78)

at

org.junit.runners.BlockJUnit4ClassRunner.runChild(

BlockJUnit4ClassRunner.java:57)

at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at

org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.

runTestClass(JUnitTestClassExecutor.java:106)

at

org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.

execute(JUnitTestClassExecutor.java:58)

at

org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.

execute(JUnitTestClassExecutor.java:38)

at

org.gradle.api.internal.tasks.testing.junit.

AbstractJUnitTestClassProcessor.processTestClass(
AbstractJUnitTestClassProcessor.java:66)

at

org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.

processTestClass(SuiteTestClassProcessor.java:51)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at

sun.reflect.NativeMethodAccessorImpl.invoke(

NativeMethodAccessorImpl.java:62)

at

sun.reflect.DelegatingMethodAccessorImpl.invoke(

DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)
at

org.gradle.internal.dispatch.ReflectionDispatch.dispatch(

ReflectionDispatch.java:35)

at

org.gradle.internal.dispatch.ReflectionDispatch.dispatch(

ReflectionDispatch.java:24)

at

org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(

ContextClassLoaderDispatch.java:32)

at

org.gradle.internal.dispatch.ProxyDispatchAdapter$

DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)

at com.sun.proxy.$Proxy2.processTestClass(Unknown Source)
at

org.gradle.api.internal.tasks.testing.worker.TestWorker.

processTestClass(TestWorker.java:117)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at

sun.reflect.NativeMethodAccessorImpl.invoke(

NativeMethodAccessorImpl.java:62)

at

sun.reflect.DelegatingMethodAccessorImpl.invoke(

DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)
at

org.gradle.internal.dispatch.ReflectionDispatch.dispatch(

ReflectionDispatch.java:35)

at

org.gradle.internal.dispatch.ReflectionDispatch.dispatch(

ReflectionDispatch.java:24)

at

org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnecti

on$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:155)

at

org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnecti

on$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:137)

at

org.gradle.internal.remote.internal.hub.MessageHub$

Handler.run(MessageHub.java:404)

at

org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.

onExecute(ExecutorPolicy.java:63)

at

org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(

ManagedExecutorImpl.java:46)

at

java.util.concurrent.ThreadPoolExecutor.runWorker(

ThreadPoolExecutor.java:1149)

at

java.util.concurrent.ThreadPoolExecutor$Worker.run(

ThreadPoolExecutor.java:624)

at

org.gradle.internal.concurrent.ThreadFactoryImpl$

ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)

at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.InvalidClassException: filter status: REJECTED
at java.io.ObjectInputStream.filterCheck(ObjectInputStream.java:1249)
at java.io.ObjectInputStream.readNonProxyDesc(

ObjectInputStream.java:1869)

at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1745)
at
java.io.ObjectInputStream.readOrdinaryObject(

ObjectInputStream.java:2033)

at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1567)
at java.io.ObjectInputStream.defaultReadFields(

ObjectInputStream.java:2278)

at java.io.ObjectInputStream.readSerialData(ObjectInputStream.
java:2202)
at
java.io.ObjectInputStream.readOrdinaryObject(

ObjectInputStream.java:2060)

at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1567)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:427)
at

org.apache.geode.internal.InternalDataSerializer.readSerializable(

InternalDataSerializer.java:2963)

at

org.apache.geode.internal.InternalDataSerializer.basicReadObject(

InternalDataSerializer.java:2907)

at org.apache.geode.DataSerializer.readObject(DataSerializer.java:2977)
at

org.apache.geode.codeAnalysis.AnalyzeSerializablesJUnitTestBase.

serializeAndDeserializeSanctionedObject(AnalyzeSerializablesJUnitTestB
ase.java:397)

... 51 more



Reply via email to