You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Kirk Lund (JIRA)" <ji...@apache.org> on 2016/03/01 00:16:18 UTC

[jira] [Assigned] (GEODE-1024) NotAuthorizedException fails serialization because Principal member field is not serializable

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

Kirk Lund reassigned GEODE-1024:
--------------------------------

    Assignee: Kirk Lund

> NotAuthorizedException fails serialization because Principal member field is not serializable
> ---------------------------------------------------------------------------------------------
>
>                 Key: GEODE-1024
>                 URL: https://issues.apache.org/jira/browse/GEODE-1024
>             Project: Geode
>          Issue Type: Bug
>          Components: management
>    Affects Versions: 1.0.0-incubating.M2
>            Reporter: Kirk Lund
>            Assignee: Kirk Lund
>         Attachments: NotAuthorizedExceptionTest.java
>
>
> While running Geode with LDAP security, I hit a couple instances of java.io.NotSerializableException.
> Attached unit test reproduces this failure with a mock java.security.Principal.
> {noformat}
> org.apache.commons.lang.SerializationException: java.io.NotSerializableException: $java.security.Principal$$EnhancerByMockitoWithCGLIB$$f6f0ec86
> 	at org.apache.commons.lang.SerializationUtils.serialize(SerializationUtils.java:111)
> 	at org.apache.commons.lang.SerializationUtils.serialize(SerializationUtils.java:133)
> 	at org.apache.commons.lang.SerializationUtils.clone(SerializationUtils.java:80)
> 	at com.gemstone.gemfire.security.NotAuthorizedExceptionTest.canBeSerializedWithPrincipal(NotAuthorizedExceptionTest.java:55)
> 	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:497)
> 	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.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.junit.runner.JUnitCore.run(JUnitCore.java:137)
> 	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
> 	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)
> 	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)
> 	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:497)
> 	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
> Caused by: java.io.NotSerializableException: $java.security.Principal$$EnhancerByMockitoWithCGLIB$$f6f0ec86
> 	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184)
> 	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
> 	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
> 	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
> 	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
> 	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
> 	at org.apache.commons.lang.SerializationUtils.serialize(SerializationUtils.java:108)
> 	... 29 more
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)