Page 1 of 1

TM1 API using Java

Posted: Thu Oct 15, 2009 5:24 pm
by robchr
Does anyone have an idea on how to properly connect to TM1 using the Java API?

I have so far been unable to build a decent TM1Beans connection. :|

Code: Select all

        com.applix.tm1.TM1Bean bean = new com.applix.tm1.TM1Bean();
        bean.setAdminHost("MyAdminHost");
        bean.openConnection("MyServer", "user", "password");
        int numServers = bean.getNumberOfServers();
        JOptionPane.showMessageDialog(null, numServers);
This returns a -1 and a connection error.

Re: TM1 API using Java

Posted: Tue Nov 03, 2009 7:27 pm
by robchr
Ah, finally. The problem was that the following must be done before being able to use the TM1API in Java...

Code: Select all

1. Open a command line prompt (cmd)
2. Change directory to: "C:\Program Files\java\jdk1.5.0_06\jre\bin" (adjust accordingly)
3. Adjust and run: keytool -import -file "C:\Program Files\Applix\bin\ssl\applixca.der" -keystore ..\lib\security\cacerts

Re: TM1 API using Java

Posted: Thu Nov 05, 2009 8:21 am
by razts
Thanks for post. In future I will have to use Java also with TM1.