HI, I have been trying to run a java program through TI process using ExecuteJavaN/ExecuteJavaS.
I have followed all the points from IBM Knowledge center in configuring Java Extensions and rules to use ExcuteJavaN/ExecuteJavaS. My bad luck java program runs fine to my need in eclipse while i call ExecuteJavaN from TI. I am getting an error stating Java Exception:Java.lang.ClassNotFoundException: my.scripts.MyTestTI.
My Epilog command given:
ExecuteJavaN('my.scripts.MyTestTI');
Can someone please help me solving this problem.
Thanks & Regards
Mohan
Run a Java program from TI process using ExecuteJavaN
-
- Posts: 3
- Joined: Mon Apr 17, 2017 2:58 pm
- OLAP Product: SQL SERVER 2012
- Version: 10.2.2
- Excel Version: 2007
Run a Java program from TI process using ExecuteJavaN
- Attachments
-
- error in JAVA TI.png (23.76 KiB) Viewed 5830 times
-
- Posts: 78
- Joined: Tue Nov 30, 2010 1:18 am
- OLAP Product: TM1
- Version: 10.2.2
- Excel Version: 2010
Re: Run a Java program from TI process using ExecuteJavaN
Hi Mohan
It's going to be difficult for anyone to debug why your java app is returning that error if you don't put any of the java code in the post. Can I suggest having a read through http://www.tm1forum.com/viewtopic.php?f=3&t=1037 and then post the actual code in your class that you're calling.
It needs to be the actual code as the problem is probably something to do with your naming or class definition
It's going to be difficult for anyone to debug why your java app is returning that error if you don't put any of the java code in the post. Can I suggest having a read through http://www.tm1forum.com/viewtopic.php?f=3&t=1037 and then post the actual code in your class that you're calling.
It needs to be the actual code as the problem is probably something to do with your naming or class definition
RHR
-
- Posts: 3
- Joined: Mon Apr 17, 2017 2:58 pm
- OLAP Product: SQL SERVER 2012
- Version: 10.2.2
- Excel Version: 2007
Re: Run a Java program from TI process using ExecuteJavaN
Hi failurehappening,
Thanks for the reply. My code wasn't difficult it's just an simple test code from the IBM.Here is the code below please check it
package my.scripts;
import com.ibm.cognos.tm1.javati.TM1UserThread;
import com.ibm.cognos.tm1.javati.ti.TIFunctions;
public class MyTestTI {
public static double MyTestTI(String[] args) {
TIFunctions ti = TM1UserThread.getTIFunctions();
if (args.length < 1) {
throw new IllegalArgumentException();
}
String dim = args[0];
if (ti.DimensionExists(dim)) {
ti.DimensionDeleteAllElements(dim);
} else {
ti.DimensionCreate(dim);
}
return 0;
}
}
Thanks
Thanks for the reply. My code wasn't difficult it's just an simple test code from the IBM.Here is the code below please check it
package my.scripts;
import com.ibm.cognos.tm1.javati.TM1UserThread;
import com.ibm.cognos.tm1.javati.ti.TIFunctions;
public class MyTestTI {
public static double MyTestTI(String[] args) {
TIFunctions ti = TM1UserThread.getTIFunctions();
if (args.length < 1) {
throw new IllegalArgumentException();
}
String dim = args[0];
if (ti.DimensionExists(dim)) {
ti.DimensionDeleteAllElements(dim);
} else {
ti.DimensionCreate(dim);
}
return 0;
}
}
Thanks
- Michel Zijlema
- Site Admin
- Posts: 712
- Joined: Wed May 14, 2008 5:22 am
- OLAP Product: TM1, PALO
- Version: both 2.5 and higher
- Excel Version: 2003-2007-2010
- Location: Netherlands
- Contact:
Re: Run a Java program from TI process using ExecuteJavaN
Hi Mohan,
Have a look at the javaextensions.policy file in TM1-install-dir\configuration directory and make sure the grant permissions are set correctly.
See details here.
Michel
Have a look at the javaextensions.policy file in TM1-install-dir\configuration directory and make sure the grant permissions are set correctly.
See details here.
Michel