3 Replies Latest reply on Nov 20, 2008 2:32 AM by Scott Stark

    "NotSerializableException: CompositeValueInvocationHandler"

    Ian Springer Master

      I get the following exception when trying to update a Local TX Datasource via the Profile Service:

      Failed to update Resource (see app server log for additional details): java.io.NotSerializableException: org.jboss.metatype.plugins.values.CompositeValueInvocationHandler at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1173) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1526) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1491) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1409) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1167) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:343) at java.util.ArrayList.writeObject(ArrayList.java:673) at sun.reflect.GeneratedMethodAccessor352.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:623) at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:962) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1478) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1409) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1167) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1526) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1491) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1409) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1167) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:343) at java.util.ArrayList.writeObject(ArrayList.java:673) at sun.reflect.GeneratedMethodAccessor352.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:623) at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:962) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1478) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1409) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1167) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1526) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1491) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1409) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1167) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:343) at java.util.HashMap.writeObject(HashMap.java:1018) at sun.reflect.GeneratedMethodAccessor266.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:623) at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:962) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1478) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1409) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1167) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:343) at org.jboss.system.server.profileservice.repository.JavaSerializationAttachmentsSerializer.saveAttachments(JavaSerializationAttachmentsSerializer.java:103) at org.jboss.system.server.profileservice.repository.AbstractFileAttachmentsSerializer.saveAttachments(AbstractFileAttachmentsSerializer.java:93) at org.jboss.system.server.profileservice.repository.SerializableDeploymentRepository.updateDeployment(SerializableDeploymentRepository.java:1138) at org.jboss.system.server.profileservice.repository.SerializableDeploymentRepository.updateDeployment(SerializableDeploymentRepository.java:1085) at org.jboss.system.server.profile.repository.ProfileImpl.updateDeployment(ProfileImpl.java:152) at org.jboss.profileservice.management.ManagementViewImpl.updateComponent(ManagementViewImpl.java:1010) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:623) at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:121) at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82) at org.jboss.profileservice.remoting.ProfileServiceInvocationHandler.invoke(ProfileServiceInvocationHandler.java:67) at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:908) at org.jboss.remoting.transport.local.LocalClientInvoker.invoke(LocalClientInvoker.java:106) at org.jboss.remoting.Client.invoke(Client.java:1708) at org.jboss.remoting.Client.invoke(Client.java:612) at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:60) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) at org.jboss.aspects.remoting.MergeMetaDataInterceptor.invoke(MergeMetaDataInterceptor.java:74) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:65) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) at AOPProxy$1.updateComponent(AOPProxy$1.java) at org.rhq.plugins.jbossas5.JndiResourceComponent.updateResourceConfiguration(JndiResourceComponent.java:139)


      Based on some debugging, it looks like the Object it's trying to serialize when the NotSerializableException is thrown is a Proxy to a following CompositeValueSupport object whose toString() looks like:

      CompositeValueSupport: metaType=[MutableCompositeMetaType{org.jboss.metatype.api.values.CompositeValue items=[name=name type=java.lang.String], [name=type type=java.lang.String], [name=value type=java.lang.String]}] items=[name=SimpleMetaType:java.lang.String:UserName,type=SimpleMetaType:java.lang.String:java.lang.String,value=SimpleMetaType:java.lang.String:sa]

      When it hits the h field of the Proxy, which is of type CompositeValueInvocationHandler, the exception is thrown.

      Does anyone know what could be causing this? Please let me know if there's something I can do to get past it. If it's a bug, I'll be glad to create a JIRA for it.

      Thanks,
      Ian