TM1 Java Api - Connection refused
Posted: Sat May 03, 2014 8:48 am
Hi,
I'm trying to use the TM1 Java API and right from the start I'm facing an issue.
The sample code I'm trying to run is quite simple but I'm getting an error on the following line :
The error stack reports
The strange point is that in fact it's working because the java code which is behind the connexion is normally executed (list of a cube rules displayed to the console).
I've already followed IBM advices adding applixca.pem to the keystore and using dedicated parameters (-Djavax.net.ssl.trustStore="C:/Program Files/ibm/cognos/tm1/bin/ssl/tm1store" -Djavax.net.ssl.trustStorePassword=applix) for Eclipse.
Any idea is welcome.
Regards,
Bob
I'm trying to use the TM1 Java API and right from the start I'm facing an issue.
The sample code I'm trying to run is quite simple but I'm getting an error on the following line :
Code: Select all
TM1Server server = tm1bean.openConnection(serverName, userID, password);
Code: Select all
java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.security.ssl.SSLSocketImpl.connect(Unknown Source)
at sun.security.ssl.SSLSocketImpl.<init>(Unknown Source)
at sun.security.ssl.SSLSocketFactoryImpl.createSocket(Unknown Source)
at com.applix.tm1.TM1NetClass.ConnectToHost(TM1NetClass.java:215)
at com.applix.tm1.TM1NetClass.ConnectUsingIPv6(TM1NetClass.java:199)
at com.applix.tm1.TM1NetClass.Connect(TM1NetClass.java:165)
at com.applix.tm1.TM1Bean.getAdmEntryList(TM1Bean.java:460)
at com.applix.tm1.TM1Bean.getNumberOfServers(TM1Bean.java:290)
at com.applix.tm1.TM1Bean.findEntryByServerName(TM1Bean.java:550)
at com.applix.tm1.TM1Bean.openConnection(TM1Bean.java:141)
at HelloWorld.main(HelloWorld.java:28)
I've already followed IBM advices adding applixca.pem to the keystore and using dedicated parameters (-Djavax.net.ssl.trustStore="C:/Program Files/ibm/cognos/tm1/bin/ssl/tm1store" -Djavax.net.ssl.trustStorePassword=applix) for Eclipse.
Any idea is welcome.
Regards,
Bob