[jboss-dev-forums] [Design of POJO Server] - Re: ManagedOperation aspects for the ProfileService.Manageme

alesj do-not-reply at jboss.com
Tue Oct 2 11:18:42 EDT 2007


OK, I wrapped ManagedPropertys + Fields.
This in what I currently get:

  | java.lang.ClassNotFoundException: AOPContainerProxy$26
  | 	at org.jboss.remoting.serialization.ClassLoaderUtility.loadClass(ClassLoaderUtility.java:82)
  | 	at org.jboss.remoting.loading.RemotingClassLoader.loadClass(RemotingClassLoader.java:76)
  | 	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
  | 	at java.lang.Class.forName0(Native Method)
  | 	at java.lang.Class.forName(Class.java:242)
  | 	at org.jboss.remoting.loading.ObjectInputStreamWithClassLoader.resolveClass(ObjectInputStreamWithClassLoader.java:174)
  | 	at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1544)
  | 	at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466)
  | 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1699)
  | 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
  | 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
  | 	at java.util.HashMap.readObject(HashMap.java:1067)
  | 	at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
  | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | 	at java.lang.reflect.Method.invoke(Method.java:585)
  | 	at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:946)
  | 	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1809)
  | 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
  | 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
  | 	at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
  | 	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
  | 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
  | 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
  | 	at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
  | 	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
  | 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
  | 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
  | 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
  | 	at java.util.HashSet.readObject(HashSet.java:278)
  | 	at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
  | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | 	at java.lang.reflect.Method.invoke(Method.java:585)
  | 	at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:946)
  | 	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1809)
  | 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
  | 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
  | 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
  | 	at org.jboss.aop.joinpoint.InvocationResponse.readExternal(InvocationResponse.java:122)
  | 	at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1755)
  | 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1717)
  | 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
  | 	at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
  | 	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
  | 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
  | 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
  | 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
  | 	at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObjectVersion2_2(JavaSerializationManager.java:239)
  | 	at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObject(JavaSerializationManager.java:133)
  | 	at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.read(SerializableUnMarshaller.java:120)
  | 	at org.jboss.invocation.unified.marshall.InvocationUnMarshaller.read(InvocationUnMarshaller.java:59)
  | 	at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.versionedRead(MicroSocketClientInvoker.java:943)
  | 	at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:584)
  | 	at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
  | 	at org.jboss.remoting.Client.invoke(Client.java:1550)
  | 	at org.jboss.remoting.Client.invoke(Client.java:530)
  | 	at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:62)
  | 	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  | 	at org.jboss.aspects.remoting.MergeMetaDataInterceptor.invoke(MergeMetaDataInterceptor.java:74)
  | 	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  | 	at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:65)
  | 	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  | 	at AOPProxy$1.getComponentsForType(AOPProxy$1.java)
  | 	at org.jboss.test.profileservice.test.ProfileServiceUnitTestCase.getManagedComponent(ProfileServiceUnitTestCase.java:424)
  | 	at org.jboss.test.profileservice.test.ProfileServiceUnitTestCase.testUpdateDefaultDS(ProfileServiceUnitTestCase.java:305)
  | 

Guess this is because we don't proxy the properties in ManagedViewImpl:

  |    protected void mergeRuntimeMO(ManagedObject mo, ManagedObject runtimeMO)
  |       throws Exception
  |    {
  |       Map<String, ManagedProperty> moProps = mo.getProperties();
  |       Set<ManagedOperation> moOps = mo.getOperations();
  |       HashMap<String, ManagedProperty> props = new HashMap<String, ManagedProperty>(moProps);
  |       HashSet<ManagedOperation> ops = new HashSet<ManagedOperation>(moOps);
  | 
  |       Map<String, ManagedProperty> runtimeProps = runtimeMO.getProperties();
  |       Set<ManagedOperation> runtimeOps = runtimeMO.getOperations();
  | 
  |       if (runtimeProps != null)
  |          props.putAll(runtimeProps);
  |       if (runtimeOps != null)
  |       {
  |          runtimeOps = createOperationProxies(runtimeMO, runtimeOps);
  |          ops.addAll(runtimeOps);
  |       }
  | 
  |       ManagedObjectImpl moi = (ManagedObjectImpl) mo;
  |       moi.setProperties(props);
  |       moi.setOperations(ops);
  |    }
  | 
And the server proxy cannot be resolved on client side. :-)

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4090712#4090712

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4090712



More information about the jboss-dev-forums mailing list