I'm unable to connect to a remote host with JInterop… i'm getting a connection timeout (see stack trace below)
All ports between the two machines are open. We can ping the target host successfully. We're getting the same on several machines (windows server 2003, 2008). Also, we've tried the wbemtest.exe tool that comes on windows and we can successfully connect to the target hosts with that.
Any ideas why we can connect with wbemtest.exe but not with JInterop?
JInterop version 2.02
org.jinterop.dcom.common.JIException: An internal error occurred.
Caused by: java.net.ConnectException: Connection timed out: connect
at sun.nio.ch.Net.connect(Native Method)
at sun.nio.ch.SocketChannelImpl.connect(Unknown Source)
at java.nio.channels.SocketChannel.open(Unknown Source)
… 12 more
Can you post your code ?
Btw, please use the latest version of the library.
i have the same error,and i use the version 2.08.
below is my code
JISession session = JISession.createSession("localhost","admin","password");
JIComServer comServer = new JIComServer(JIProgId.valueOf("Excel.Application"),"127.0.0.1",session);
//Instantiate the COM Server
IJIComObject excelObject = comServer.createInstance();
the exception occurs when creating com server in the last line of code above.
please help me, what can i do.
thanks in advance.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.