Java TI set up on brand new installation

Post Reply
User avatar
Olivier
Community Contributor
Posts: 159
Joined: Thu Jun 26, 2008 5:46 am
OLAP Product: TM1
Version: Tm1 10.2.2fp4 -> 2.09
Excel Version: Excel 2013 - 2019
Location: Sydney

Java TI set up on brand new installation

Post by Olivier »

I am struggling to set up the JAVATI functionality on our new server install.

I would appreciate any pointer to relevant documentation or any idea on how to determine the root cause as per below :

We are installing PA Version 2.0.913.10 (Upgrade project from Tm1 10.2.2 FP4.).
We are installing form scratch in a new set of servers so there are no overlap with previous version.

We have set the below Java parameters in the CFG file for TM1 server as we use JAVATI functionality in our processes.

JavaJVMPath=D:\Program Files\ibm\cognos\tm1_64\jre\bin\j9vm\jvm.dll
Note : We also tried an alternative for the jvm.dll with same feedback on start up logs
#JavaJVMPath=D:\Program Files\ibm\cognos\tm1_64\jre\bin\default\jvm.dll

JavaJVMArgs=-Xrunjdwp:transport=dt_socket -server=y -suspend=n -address=1044

JavaClassPath=D:\Data\Scripts\Java\poi-3.8-beta4-20110826.jar
We use this JAR for finance function libraries.

We also edited the Java policy file:
/*
Suggested default permissions for java extensions are pretty restrictive:
- They allow reading and writing of files in the model directory and sub directories.
- They allow reading of the same system properties that Java applets allow
- Everything else is disallowed
*/


grant {
/* grant permission to change the files in the model directory in any way */
permission java.io.FilePermission "${tm1.modeldir}${/}-", "write, read, delete";

/* grant read access to the same properties that are allowed in a Java applet */
permission java.util.PropertyPermission "java.class.version", "read";
permission java.util.PropertyPermission "java.vendor", "read";
permission java.util.PropertyPermission "java.vendor", "read";
permission java.util.PropertyPermission "java.vendor.url", "read";
permission java.util.PropertyPermission "java.version", "read";
permission java.util.PropertyPermission "os.name", "read";
permission java.util.PropertyPermission "os.arch", "read";
permission java.util.PropertyPermission "os.version", "read";
permission java.util.PropertyPermission "file.separator", "read";
permission java.util.PropertyPermission "path.separator", "read";
permission java.util.PropertyPermission "line.separator", "read";
permission java.security.AllPermission;
};

And we also set environment variables for JAVA_HOME and JRE_HOME on the TM1 server.

Sample of our start up log highlighting the
14108 [] ERROR 2022-06-09 11:43:17.938 TM1.Server Could not initialize java virtual machine (code -6). Java will not be available

14108 [] INFO 2022-06-09 11:43:17.900 TM1.Server Using javaextensions.policy from D:\Program Files\ibm\cognos\tm1_64\bin64\..\configuration\javaextensions.policy
14108 [] INFO 2022-06-09 11:43:17.900 TM1.Server Creating Java Virtual Machine with arguments:
14108 [] INFO 2022-06-09 11:43:17.900 TM1.Server -Djava.security.policy=D:\Program Files\ibm\cognos\tm1_64\bin64\..\configuration\javaextensions.policy
14108 [] INFO 2022-06-09 11:43:17.900 TM1.Server -Djava.class.path=java_classes;D:\Data\Scripts\Java\poi-3.8-beta4-20110826.jar;D:\Program Files\ibm\cognos\tm1_64\bin64\javatiapi.jar;D:\Program Files\ibm\cognos\tm1_64\bin64\tm1javaticore.jar
14108 [] INFO 2022-06-09 11:43:17.900 TM1.Server -Xrunjdwp:transport=dt_socket
14108 [] INFO 2022-06-09 11:43:17.900 TM1.Server -server=y
14108 [] INFO 2022-06-09 11:43:17.900 TM1.Server -suspend=n
14108 [] INFO 2022-06-09 11:43:17.900 TM1.Server -address=1044
14108 [] INFO 2022-06-09 11:43:17.900 TM1.Server end JVM args
14108 [] ERROR 2022-06-09 11:43:17.938 TM1.Server Could not initialize java virtual machine (code -6). Java will not be available
14108 [] ERROR 2022-06-09 11:43:17.938 TM1.Server JVM initialization attempted with arguments:
14108 [] ERROR 2022-06-09 11:43:17.938 TM1.Server -Djava.security.policy=D:\Program Files\ibm\cognos\tm1_64\bin64\..\configuration\javaextensions.policy
14108 [] ERROR 2022-06-09 11:43:17.938 TM1.Server -Djava.class.path=java_classes;D:\Data\Scripts\Java\poi-3.8-beta4-20110826.jar;D:\Program Files\ibm\cognos\tm1_64\bin64\javatiapi.jar;D:\Program Files\ibm\cognos\tm1_64\bin64\tm1javaticore.jar
14108 [] ERROR 2022-06-09 11:43:17.938 TM1.Server -Xrunjdwp:transport=dt_socket
14108 [] ERROR 2022-06-09 11:43:17.938 TM1.Server -server=y
14108 [] ERROR 2022-06-09 11:43:17.938 TM1.Server -suspend=n
14108 [] ERROR 2022-06-09 11:43:17.938 TM1.Server -address=1044
14108 [] ERROR 2022-06-09 11:43:17.938 TM1.Server - - - - - - - - -
17084 [] INFO 2022-06-09 11:43:17.939 TM1.Server --------------------Session Start--------------------
17084 [] INFO 2022-06-09 11:43:17.939 TM1.Server TM1 Build Number: 11.8.01200.7
HTH
Olivier
burnstripe
Posts: 141
Joined: Wed May 06, 2020 2:58 pm
OLAP Product: Planning Analytics
Version: 2.0.9
Excel Version: 2016

Re: Java TI set up on brand new installation

Post by burnstripe »

I've not used the function myself but are you aware that Planning Analytics uses Java 8. Any java scripting will need to be on that version. Java 7 was removed in version 2.0.6 so I suspect that is your issue.

You may also wish to consider alternative options to replace the function long term as it was nearly removed entirely, and I suspect it won't be supported in the next major release. Here's the link:

https://www.ibm.com/support/pages/depre ... nd-earlier
User avatar
Olivier
Community Contributor
Posts: 159
Joined: Thu Jun 26, 2008 5:46 am
OLAP Product: TM1
Version: Tm1 10.2.2fp4 -> 2.09
Excel Version: Excel 2013 - 2019
Location: Sydney

Re: Java TI set up on brand new installation

Post by Olivier »

Hi,
Thanks for the feedback.

Yes aware of the Java 8 change...
I am on my way to set up the Eclipse SDK associated and will try recompiling the jars also..

I think I have maintained my config appropriately to the JRE folder change, there was some syntax difference in the java arg also from previous version which have been adjusted...

What makes me lean toward a server config issue or maybe something more environmental is that even if I remove the custom Jar we developed and the path to the added POI jar library , the Java Virtual Machine still refuses to start with the server.

Point taken on future proofing by moving away from Java...but in this upgrade context I have to carry it over..

This is a start up log without any custom Jar involved.

2022-06-09 18:34:03.677 TM1.Server Creating Java Virtual Machine with arguments:
14552 [] INFO 2022-06-09 18:34:03.677 TM1.Server -Djava.security.policy=D:\Program Files\ibm\cognos\tm1_64\bin64\..\configuration\javaextensions.policy
14552 [] INFO 2022-06-09 18:34:03.677 TM1.Server -Djava.class.path=java_classes;D:\Program Files\ibm\cognos\tm1_64\bin64\javatiapi.jar;D:\Program Files\ibm\cognos\tm1_64\bin64\tm1javaticore.jar
14552 [] INFO 2022-06-09 18:34:03.677 TM1.Server -Xrunjdwp:transport=dt_socket
14552 [] INFO 2022-06-09 18:34:03.677 TM1.Server -server=y
14552 [] INFO 2022-06-09 18:34:03.677 TM1.Server -suspend=n
14552 [] INFO 2022-06-09 18:34:03.677 TM1.Server -address=1044
14552 [] INFO 2022-06-09 18:34:03.677 TM1.Server end JVM args
14552 [] ERROR 2022-06-09 18:34:03.699 TM1.Server Could not initialize java virtual machine (code -6). Java will not be available
14552 [] ERROR 2022-06-09 18:34:03.699 TM1.Server JVM initialization attempted with arguments:
14552 [] ERROR 2022-06-09 18:34:03.699 TM1.Server -Djava.security.policy=D:\Program Files\ibm\cognos\tm1_64\bin64\..\configuration\javaextensions.policy
14552 [] ERROR 2022-06-09 18:34:03.699 TM1.Server -Djava.class.path=java_classes;D:\Program Files\ibm\cognos\tm1_64\bin64\javatiapi.jar;D:\Program Files\ibm\cognos\tm1_64\bin64\tm1javaticore.jar
14552 [] ERROR 2022-06-09 18:34:03.699 TM1.Server -Xrunjdwp:transport=dt_socket
14552 [] ERROR 2022-06-09 18:34:03.699 TM1.Server -server=y
14552 [] ERROR 2022-06-09 18:34:03.699 TM1.Server -suspend=n
14552 [] ERROR 2022-06-09 18:34:03.699 TM1.Server -address=1044
14552 [] ERROR 2022-06-09 18:34:03.699 TM1.Server - - - - - - - - -

Thanks,
Olivier
Last edited by Olivier on Thu Jun 09, 2022 8:40 am, edited 1 time in total.
HTH
Olivier
lotsaram
MVP
Posts: 3566
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: Java TI set up on brand new installation

Post by lotsaram »

burnstripe wrote: Thu Jun 09, 2022 6:34 am You may also wish to consider alternative options to replace the function long term as it was nearly removed entirely, and I suspect it won't be supported in the next major release. Here's the link:
Yes the in process java support is removed entirely in v12 a.k.a next gen server a.k.a planning analytics engine
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
User avatar
Olivier
Community Contributor
Posts: 159
Joined: Thu Jun 26, 2008 5:46 am
OLAP Product: TM1
Version: Tm1 10.2.2fp4 -> 2.09
Excel Version: Excel 2013 - 2019
Location: Sydney

Re: Java TI set up on brand new installation

Post by Olivier »

Stripping all Java parameters and starting enabling parameters one at the time, i narrowed down the issue to be with the following item :

JavaJVMArgs=-Xrunjdwp:transport=dt_socket -server=y -suspend=n -address=1044

When skipping this item specifically, the JVM starts as per log below and the JavaTI functions seems to run successfully...

my wild guess is that the install doc sample config need update if the ti debugger is still available ?

2022-06-09 22:37:41.482 TM1.Server Using javaextensions.policy from D:\Program Files\ibm\cognos\tm1_64\bin64\..\configuration\javaextensions.policy
16188 [] INFO 2022-06-09 22:37:41.482 TM1.Server Creating Java Virtual Machine with arguments:
16188 [] INFO 2022-06-09 22:37:41.482 TM1.Server -Djava.security.policy=D:\Program Files\ibm\cognos\tm1_64\bin64\..\configuration\javaextensions.policy
16188 [] INFO 2022-06-09 22:37:41.482 TM1.Server -Djava.class.path=java_classes;D:\Data\Scripts\Java\poi-3.8-beta4-20110826.jar;D:\Program Files\ibm\cognos\tm1_64\bin64\javatiapi.jar;D:\Program Files\ibm\cognos\tm1_64\bin64\tm1javaticore.jar
16188 [] INFO 2022-06-09 22:37:41.482 TM1.Server end JVM args
16020 [] INFO 2022-06-09 22:37:42.163 TM1.Transaction TM1TransactionLog::BasicInitialize: The transaction log was found and write-locked. Recovery possible after server load.
16020 [] INFO 2022-06-09 22:37:42.163 TM1.Server --------------------Session Start--------------------
16020 [] INFO 2022-06-09 22:37:42.163 TM1.Server TM1 Build Number: 11.8.01200.7
16188 [] INFO 2022-06-09 22:37:42.263 TM1.Process [com.ibm.cognos.tm1.jos.Main] - JavaTI started
16188 [] INFO 2022-06-09 22:37:42.270 TM1.Process [com.ibm.cognos.tm1.jos.Main] - JavaTI loading extensions from: D:\Program Files\ibm\cognos\tm1_64\bin64\javaextensions\user
16188 [] INFO 2022-06-09 22:37:42.275 TM1.Process [com.ibm.cognos.tm1.jos.extensions.ExtensionManager] - Insert new extension: D:\Program Files\ibm\cognos\tm1_64\bin64\javaextensions\user\GoalSeek.jar
16188 [] INFO 2022-06-09 22:37:42.352 TM1.Process [com.ibm.cognos.tm1.jos.extensions.ExtensionManager] - Starting extension: D:\Program Files\ibm\cognos\tm1_64\bin64\javaextensions\user\GoalSeek.jar
16188 [] INFO 2022-06-09 22:37:42.382 TM1.Server Notifying the Admin server

And successfull Ti..
2 [2] INFO 2022-06-09 22:49:00.590 TM1.Process Process "Cub_Feasibility_Calculate_Single_IRR": finished executing normally, elapsed time 0.60 seconds
HTH
Olivier
lotsaram
MVP
Posts: 3566
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: Java TI set up on brand new installation

Post by lotsaram »

If you are using GetJavaN to calculate IRR and other financial type iterative functions which are difficult to do natively in TM1 I suggest you have a look at TM1Py CubeCalc
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
Post Reply