TM1 API using Java

Post Reply
robchr
Posts: 23
Joined: Wed Sep 30, 2009 1:41 pm
OLAP Product: TM1
Version: 9.4.1 FP03 32-bit
Excel Version: 2007

TM1 API using Java

Post 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.
robchr
Posts: 23
Joined: Wed Sep 30, 2009 1:41 pm
OLAP Product: TM1
Version: 9.4.1 FP03 32-bit
Excel Version: 2007

Re: TM1 API using Java

Post 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
razts
Posts: 7
Joined: Wed Oct 07, 2009 9:30 am
OLAP Product: IBM Cognos TM1
Version: 9.4
Excel Version: 2003

Re: TM1 API using Java

Post by razts »

Thanks for post. In future I will have to use Java also with TM1.
Post Reply