PDA

View Full Version : java.util.EnumSet cannot be assigned from null


skoppolu
11-24-2010, 06:33 AM
Hi,
We are facing the problem when Deserialize object which having Enumset.
Actually calling service through Hessian protocol, Which service invocation method referring serialize and deserialize method of object which having EnumSet as variable.
And same service we are calling through java test's to check enumset having null reference's or not, found there is no null reference in Enumset.
But when calling through Hessian client proxy service getting error message "java.util.EnumSet cannot be assigned from null"


com.caucho.hessian.client.HessianRuntimeException: com.caucho.hessian.io.HessianFieldException: com.macys.platform.providers.promotion.PromotionBO .promotionSource: java.util.EnumSet cannot be assigned from null
at com.caucho.hessian.client.HessianProxy.invoke(Hess ianProxy.java:232)
at $Proxy9.getPromotionHistory(Unknown Source)
at com.macys.platform.providers.promotion.service.Pro motionServiceComponentMgrTest.testGetPromotionHist oryByHessianEndPoint(PromotionServiceComponentMgrT est.java:959)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.junit.runners.model.FrameworkMethod$1.runRefle ctiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallabl e.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExpl osively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.InvokeMethod .evaluate(InvokeMethod.java:20)
at org.junit.internal.runners.statements.RunBefores.e valuate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.ev aluate(RunAfters.java:31)
at org.junit.runners.BlockJUnit4ClassRunner.runNotIgn ored(BlockJUnit4ClassRunner.java:79)
at org.junit.runners.BlockJUnit4ClassRunner.runChild( BlockJUnit4ClassRunner.java:71)
at org.junit.runners.BlockJUnit4ClassRunner.runChild( BlockJUnit4ClassRunner.java:49)
at org.junit.runners.ParentRunner$3.run(ParentRunner. java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRu nner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentR unner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRu nner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRu nner.java:184)
at org.junit.internal.runners.statements.RunBefores.e valuate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.ev aluate(RunAfters.java:31)
at org.junit.runners.ParentRunner.run(ParentRunner.ja va:236)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestR eference.run(JUnit4TestReference.java:45)
at org.eclipse.jdt.internal.junit.runner.TestExecutio n.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.main(RemoteTestRunner.java:196)
Caused by: com.caucho.hessian.io.HessianFieldException: com.macys.platform.providers.promotion.PromotionBO .promotionSource: java.util.EnumSet cannot be assigned from null
at com.caucho.hessian.io.JavaDeserializer.logDeserial izeError(JavaDeserializer.java:596)
at com.caucho.hessian.io.JavaDeserializer$ObjectField Deserializer.deserialize(JavaDeserializer.java:391 )
at com.caucho.hessian.io.JavaDeserializer.readObject( JavaDeserializer.java:233)
at com.caucho.hessian.io.JavaDeserializer.readObject( JavaDeserializer.java:157)
at com.caucho.hessian.io.Hessian2Input.readObjectInst ance(Hessian2Input.java:2051)
at com.caucho.hessian.io.Hessian2Input.readObject(Hes sian2Input.java:1692)
at com.caucho.hessian.io.Hessian2Input.readObject(Hes sian2Input.java:1679)
at com.caucho.hessian.client.HessianProxy.invoke(Hess ianProxy.java:220)
... 29 more
Caused by: java.lang.UnsupportedOperationException: com.caucho.hessian.io.CollectionDeserializer@feecc a
at com.caucho.hessian.io.AbstractDeserializer.readObj ect(AbstractDeserializer.java:103)
at com.caucho.hessian.io.Hessian2Input.readObjectInst ance(Hessian2Input.java:2051)
at com.caucho.hessian.io.Hessian2Input.readObject(Hes sian2Input.java:1692)
at com.caucho.hessian.io.Hessian2Input.readObject(Hes sian2Input.java:1679)
at com.caucho.hessian.io.JavaDeserializer$ObjectField Deserializer.deserialize(JavaDeserializer.java:387 )
... 35 more

Thanks in Advance

Skoppolu