Remote Client unable to get connection from a DataSource
jlevine47 Oct 31, 2005 3:06 PMI need to be able to access a DataSource from outside the JBoss JVM. I
coded <use-java-context>false</use-java-context> in the DataSource per the instructions in the wiki. The remote client can lookup the data source but fails when it tries to get a connection:
java.lang.reflect.UndeclaredThrowableException
at $Proxy0.getConnection(Unknown Source)
at com.jta.Sample4.doTran(Sample4.java:52)
at com.jta.Sample4.main(Sample4.java:91)
Caused by: java.rmi.ConnectException: Connection refused to host: 10.128.49.75;
nested exception is:
java.net.ConnectException: Connection timed out: connect
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
at sun.rmi.server.UnicastRef.invoke(Unknown Source)
at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Sour
ce)
at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvo
kerProxy.java:119)
at org.jboss.invocation.InvokerInterceptor.invokeInvoker(InvokerIntercep
tor.java:227)
at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.jav
a:167)
at org.jboss.proxy.ClientMethodInterceptor.invoke(ClientMethodIntercepto
r.java:59)
at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:86)
... 3 more
Caused by: java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.(Unknown Source)
at java.net.Socket.(Unknown Source)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown S
ource)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown S
ource)
... 13 more
I have using the -Djava.rmi.server.hostname= property in my run.bat
and the java.policy file has
permission java.net.SocketPermission "localhost:1024-", "listen, connect, accept, resolve";
Any ideas?
Thanks,
Jason