Return-Path: Delivered-To: apmail-geronimo-xbean-dev-archive@locus.apache.org Received: (qmail 98511 invoked from network); 15 Dec 2008 08:46:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Dec 2008 08:46:07 -0000 Received: (qmail 86361 invoked by uid 500); 15 Dec 2008 08:46:20 -0000 Delivered-To: apmail-geronimo-xbean-dev-archive@geronimo.apache.org Received: (qmail 86349 invoked by uid 500); 15 Dec 2008 08:46:20 -0000 Mailing-List: contact xbean-dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: xbean-dev@geronimo.apache.org Delivered-To: mailing list xbean-dev@geronimo.apache.org Received: (qmail 86338 invoked by uid 99); 15 Dec 2008 08:46:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Dec 2008 00:46:20 -0800 X-ASF-Spam-Status: No, hits=-3.8 required=10.0 tests=RCVD_IN_DNSWL_MED,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Dec 2008 08:46:05 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 691F3234C3D3 for ; Mon, 15 Dec 2008 00:45:44 -0800 (PST) Message-ID: <1205692772.1229330744426.JavaMail.jira@brutus> Date: Mon, 15 Dec 2008 00:45:44 -0800 (PST) From: "javahan (JIRA)" To: xbean-dev@geronimo.apache.org Subject: [jira] Commented: (XBEAN-118) how remote access datasource by jndi In-Reply-To: <1246807033.1228973684283.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/XBEAN-118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12656575#action_12656575 ] javahan commented on XBEAN-118: ------------------------------- thanks for you answer,but why geronimo hasn't provides a kind of method to get remote datasoruce as weblogic application server? Properties prop = new Properties(); prop.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory"); prop.put(Context.PROVIDER_URL, "t3://192.168.0.1:7001"); prop.put(Context.SECURITY_PRINCIPAL,"system"); prop.put(Context.SECURITY_CREDENTIALS,"weblogic"); InitialContext ic = new InitialContext(prop); ds = (DataSource) ic.lookup(dbName); Quoted from: http://www.nabble.com/-jira--Created%3A-%28XBEAN-118%29-how-remote-access-datasource-by-jndi-tp20949717s134p20951613.html > how remote access datasource by jndi > ------------------------------------ > > Key: XBEAN-118 > URL: https://issues.apache.org/jira/browse/XBEAN-118 > Project: XBean > Issue Type: Wish > Components: naming > Affects Versions: 3.5 > Reporter: javahan > Priority: Critical > > I'm trying to remote lookup a datasource object by jndi,but i can get the following exception.How do I do? > java.rmi.UnmarshalException: error unmarshalling return; nested exception is: > java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: org.tranql.connector.jdbc.DataSource > at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:157) > at com.sun.jmx.remote.internal.PRef.invoke(Unknown Source) > at javax.management.remote.rmi.RMIConnectionImpl_Stub.invoke(Unknown Source) > at javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.invoke(RMIConnector.java:972) > at com.cvicse.inforsuite.system.jmx.KernelDelegate.invokeKernel(KernelDelegate.java:1188) > at com.cvicse.inforsuite.system.jmx.KernelDelegate.invoke(KernelDelegate.java:697) > at com.cvicse.inforsuite.kernel.basic.KernelOperationInvoker.invoke(KernelOperationInvoker.java:46) > at com.cvicse.inforsuite.system.jmx.JMXProxyMethodInterceptor.intercept(JMXProxyMethodInterceptor.java:117) > at com.cvicse.inforsuite.gjndi.GlobalContextGBean$$EnhancerByCGLIB$$6d77930b.lookup() > at com.jmx.test.JndiServiceTest.testJndiObject(JndiServiceTest.java:55) > 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:585) > at junit.framework.TestCase.runTest(TestCase.java:154) > at junit.framework.TestCase.runBare(TestCase.java:127) > at junit.framework.TestResult$1.protect(TestResult.java:106) > at junit.framework.TestResult.runProtected(TestResult.java:124) > at junit.framework.TestResult.run(TestResult.java:109) > at junit.framework.TestCase.run(TestCase.java:118) > at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130) > at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) > Caused by: java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: org.tranql.connector.jdbc.DataSource > at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1309) > at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348) > at sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:290) > at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:139) > ... 25 more > Caused by: java.io.NotSerializableException: org.tranql.connector.jdbc.DataSource > at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081) > at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302) > at sun.rmi.server.UnicastRef.marshalValue(UnicastRef.java:258) > at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:304) > at sun.rmi.transport.Transport$1.run(Transport.java:153) > at java.security.AccessController.doPrivileged(Native Method) > at sun.rmi.transport.Transport.serviceCall(Transport.java:149) > at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466) > at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707) > at java.lang.Thread.run(Thread.java:595) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.