Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 32406 invoked from network); 25 Apr 2006 14:48:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 25 Apr 2006 14:48:08 -0000 Received: (qmail 69624 invoked by uid 500); 25 Apr 2006 13:46:06 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 69576 invoked by uid 500); 25 Apr 2006 13:46:06 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 69565 invoked by uid 99); 25 Apr 2006 13:46:06 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Apr 2006 06:46:06 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=PLING_PLING,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of ammulder@gmail.com designates 64.233.166.183 as permitted sender) Received: from [64.233.166.183] (HELO pproxy.gmail.com) (64.233.166.183) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Apr 2006 06:46:05 -0700 Received: by pproxy.gmail.com with SMTP id t32so1290773pyc for ; Tue, 25 Apr 2006 06:45:44 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=NN4nZz9Hg5ecCVq/k/43PMZ5O7zeI6gzw2I0McAaxYl7CspThXuLx2gmuu5fyf21mDdv9xhD3mnnkyx75v7pkcP59RFSCSiyzjARggQmePP2YSBrB2ygZWQbUWvbegFbdEd/DOBb3JE2PAym2jBrZ4oeo1NaAUNQxqQr4OfpNCY= Received: by 10.35.78.13 with SMTP id f13mr1918719pyl; Tue, 25 Apr 2006 06:45:43 -0700 (PDT) Received: by 10.35.116.1 with HTTP; Tue, 25 Apr 2006 06:45:43 -0700 (PDT) Message-ID: <74e15baa0604250645g59624358k80dd77efef1b5bab@mail.gmail.com> Date: Tue, 25 Apr 2006 09:45:43 -0400 From: "Aaron Mulder" Sender: ammulder@gmail.com To: dev@geronimo.apache.org Subject: Re: Help!!! Problems using KernelManagementHelper got from getRemoteKernelManager() In-Reply-To: <74e15baa0604250508q44a01e3at7584346ced8e2e89@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <22d56c4d0604250431r1aecb0b2le7b9b8dfcb2b8238@mail.gmail.com> <74e15baa0604250508q44a01e3at7584346ced8e2e89@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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 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 wrote: > > Hi, > > > > I am running the following piece of code. > > > > KernelManagementHelper mgr =3D > > KernelManagementHelper.getRemoteKernelManager("localhost", > > "system", "manager"); > > J2EEDomain domain =3D mgr.getDomains()[0]; > > String[] servers =3D domain.getServers(); > > System.out.println(servers[0]); > > J2EEServer[] j2eeServers =3D domain.getServerInstances(); > > System.out.println(j2eeServers[0]); > > > > domain.getServers() runs fine, whereas, domain.getServerInstances() th= rows > > an exception. Please suggest a fix or a workaround for this problem. > > > > -Vamsi > > ---------------------------------------------- > > java.rmi.UnmarshalException: error unmarshalling return; nested except= ion > > is: > > java.io.WriteAbortedException: writing aborted; > > java.io.NotSerializableException: > > org.apache.geronimo.management.geronimo.J2EEServer$$EnhancerByCGLIB$$d6= 20c0d0 > > 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.ja= va:39) > > at > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso= rImpl.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.ja= va:39) > > at > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso= rImpl.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.ja= va:40) > > at $Proxy0.invoke(Unknown Source) > > at > > org.apache.geronimo.system.jmx.KernelDelegate.invokeKernel(KernelDelega= te.java:880) > > at > > org.apache.geronimo.system.jmx.KernelDelegate.getAttribute(KernelDelega= te.java:485) > > at > > org.apache.geronimo.kernel.basic.KernelGetAttributeInvoker.invoke(Kerne= lGetAttributeInvoker.java:36) > > at > > org.apache.geronimo.system.jmx.JMXProxyMethodInterceptor.intercept(JMXP= roxyMethodInterceptor.java:89) > > at > > org.apache.geronimo.management.geronimo.J2EEDomain$$EnhancerByCGLIB$$45= e3ccef.getServerInstances() > > at PeekRemoteKernel.main(PeekRemoteKernel.java:19) > > Caused by: java.io.WriteAbortedException: writing aborted; > > java.io.NotSerializableException: > > org.apache.geronimo.management.geronimo.J2EEServer$$EnhancerByCGLIB$$d6= 20c0d0 > > 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$$d6= 20c0d0 > > 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) > > > > >