geronimo-xbean-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "javahan (JIRA)" <j...@apache.org>
Subject [jira] Commented: (XBEAN-118) how remote access datasource by jndi
Date Mon, 15 Dec 2008 08:45:44 GMT

    [ 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(<generated>)
> 	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.


Mime
View raw message