geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aaron Mulder" <ammul...@alumni.princeton.edu>
Subject Re: Help!!! Problems using KernelManagementHelper got from getRemoteKernelManager()
Date Tue, 25 Apr 2006 13:45:43 GMT
Well, maybe I spoke too soon.  After thinking more about it, I guess
there are two options:

1) Create your own GBean to run on the server side, where your client
gives simple commands and the GBean does all the work interfacing with
the server components, so that there's no serialization involved to
return a J2EEServer, etc.

2) It may be that it's not as hard as I'm imagining to convert GBean
arguments and return types to AbstractNames and vice versa in the
server and the proxies.  Can you post a simple test client that gets
the servers from a domain or whatever and curently blows up?  That
would make it easier to evaluate this kind of change.

Thanks,
     Aaron

On 4/25/06, Aaron Mulder <ammulder@alumni.princeton.edu> wrote:
> I don't think there's going to be a fix for 1.1 -- if a method returns
> a GBean we don't have a way to serialize it to the client.  For 1.2 I
> think we can work some magic in the proxies, and/or switch to a
> different protocol altogether.
>
> Thanks,
>     Aaron
>
> On 4/25/06, Vamsavardhana Reddy <c1vamsi1c@gmail.com> wrote:
> > Hi,
> >
> >  I am running the following piece of code.
> >
> >          KernelManagementHelper mgr =
> > KernelManagementHelper.getRemoteKernelManager("localhost",
> > "system", "manager");
> >          J2EEDomain domain = mgr.getDomains()[0];
> >          String[] servers = domain.getServers();
> >          System.out.println(servers[0]);
> >          J2EEServer[] j2eeServers = domain.getServerInstances();
> >          System.out.println(j2eeServers[0]);
> >
> >  domain.getServers() runs fine, whereas, domain.getServerInstances() throws
> > an exception.  Please suggest a fix or a workaround for this problem.
> >
> >  -Vamsi
> >  ----------------------------------------------
> >  java.rmi.UnmarshalException: error unmarshalling return; nested exception
> > is:
> >      java.io.WriteAbortedException: writing aborted;
> > java.io.NotSerializableException:
> > org.apache.geronimo.management.geronimo.J2EEServer$$EnhancerByCGLIB$$d620c0d0
> >      at
> > sun.rmi.server.UnicastRef.invoke(UnicastRef.java:164)
> >      at
> > javax.management.remote.rmi.RMIConnectionImpl_Stub.invoke(Unknown
> > Source)
> >      at
> > mx4j.remote.rmi.ClientInvoker.invoke(ClientInvoker.java:207)
> >      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> > Method)
> >      at
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> >      at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >      at java.lang.reflect.Method.invoke(Method.java:324)
> >      at mx4j.remote.ClientProxy.invoke(ClientProxy.java:32)
> >      at
> > mx4j.remote.rmi.ClientUnmarshaller.chain(ClientUnmarshaller.java:65)
> >      at
> > mx4j.remote.rmi.ClientUnmarshaller.invoke(ClientUnmarshaller.java:54)
> >      at $Proxy0.invoke(Unknown Source)
> >      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> > Method)
> >      at
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> >      at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >      at java.lang.reflect.Method.invoke(Method.java:324)
> >      at mx4j.remote.ClientProxy.invoke(ClientProxy.java:32)
> >      at
> > mx4j.remote.rmi.ClientExceptionCatcher.invoke(ClientExceptionCatcher.java:40)
> >      at $Proxy0.invoke(Unknown Source)
> >      at
> > org.apache.geronimo.system.jmx.KernelDelegate.invokeKernel(KernelDelegate.java:880)
> >      at
> > org.apache.geronimo.system.jmx.KernelDelegate.getAttribute(KernelDelegate.java:485)
> >      at
> > org.apache.geronimo.kernel.basic.KernelGetAttributeInvoker.invoke(KernelGetAttributeInvoker.java:36)
> >      at
> > org.apache.geronimo.system.jmx.JMXProxyMethodInterceptor.intercept(JMXProxyMethodInterceptor.java:89)
> >      at
> > org.apache.geronimo.management.geronimo.J2EEDomain$$EnhancerByCGLIB$$45e3ccef.getServerInstances(<generated>)
> >      at PeekRemoteKernel.main(PeekRemoteKernel.java:19)
> >  Caused by: java.io.WriteAbortedException: writing aborted;
> > java.io.NotSerializableException:
> > org.apache.geronimo.management.geronimo.J2EEServer$$EnhancerByCGLIB$$d620c0d0
> >      at
> > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1278)
> >      at
> > java.io.ObjectInputStream.readArray(ObjectInputStream.java:1603)
> >      at
> > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1271)
> >      at
> > java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
> >      at
> > sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:297)
> >      at
> > sun.rmi.server.UnicastRef.invoke(UnicastRef.java:146)
> >      ... 23 more
> >  Caused by: java.io.NotSerializableException:
> > org.apache.geronimo.management.geronimo.J2EEServer$$EnhancerByCGLIB$$d620c0d0
> >      at java.io.ObjectOutputStream.writeObject0(Unknown
> > Source)
> >      at java.io.ObjectOutputStream.writeArray(Unknown
> > Source)
> >      at java.io.ObjectOutputStream.writeObject0(Unknown
> > Source)
> >      at java.io.ObjectOutputStream.writeObject(Unknown
> > Source)
> >      at sun.rmi.server.UnicastRef.marshalValue(Unknown
> > Source)
> >      at sun.rmi.server.UnicastServerRef.dispatch(Unknown
> > Source)
> >      at sun.rmi.transport.Transport$1.run(Unknown Source)
> >      at java.security.AccessController.doPrivileged(Native
> > Method)
> >      at sun.rmi.transport.Transport.serviceCall(Unknown
> > Source)
> >      at
> > sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown
> > Source)
> >      at
> > sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown
> > Source)
> >      at java.lang.Thread.run(Unknown Source)
> >
> >
>

Mime
View raw message