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 Thu, 27 Apr 2006 16:09:16 GMT
Though I think KMH is a red herring here.  It sounds like the actual
goal is to e.g. get a J2EEServer from a J2EEDomain.  Before, you could
have KMH do this for you.  Now, J2EEDomain can do it directly, but
fails to work remotely.  I'm thinking we could put a little bit of
code in to convert service references to AbstractNames and vice versa
for the remote kernel caller.  I'm going to see if this turns out to
be easy or not.  I first thought not, but now I think it might be
easy.

Thanks,
    Aaron

On 4/27/06, Dain Sundstrom <dain@iq80.com> wrote:
> This class was rewritten so that is only works with a local kernel.
> Rewriting it for a local kernel vastly simplified the code and make
> is more accessible for new users to help with the console, and it is
> expected that the for the near future the console will always be
> local.  If you need these features from a remote client, I suggest
> you first take a look at what is available via a standard remote JMX
> connection.  You can browse the MBeanServer using jconsole in Java5.
>
> In the future, when we need a to access the kernel remotely for the
> kernel, I expect us to use a remote pojo technology like
> lingo.codehaus.org.
>
> -dain
>
> On Apr 27, 2006, at 12:08 AM, Vamsavardhana Reddy wrote:
>
> > Hi Aron,
> >
> > The code chunk from my first e-mail runs fine with G1.0 .  Some of
> > the recent changes might have broken the KernelDelegate.  I will
> > try to create a test client and post it to the dev-list.
> >
> > Thanks,
> > Vamsi
> >
> > On 4/25/06, Aaron Mulder <ammulder@alumni.princeton.edu> wrote:
> > 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