Skip to Main Content

Analytics Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

CDF to run Batch / Shell scripts

1003078Aug 12 2014 — edited Aug 14 2014

Hi Friends,

I am in need of serious help here with regards to CDF function.

I've created a JAR file to execute batch/shell scripts via Calculation script.

I've tested the JAR file and it works perfectly while executed without the calculation script, but I am getting errors while including it in Calc script, I am getting error.

Initially the error was: Java Virtual Machine error and later it is class not found.

Here are the steps I followed to register the CDF:

1. Placed the JAR file at the location: E:\Oracle\Middleware\EPMSystem11R1\products\Essbase\EssbaseServer\java\udf\

2. Updated the udf.policy file with the following entry:

// Grant all permissions to BatEx

grant codeBase "file:${essbase.java.home}/BatEx.jar" {

permission java.security.AllPermission;

};

3. Restarted the Essbase services.

4. I am trying to create this function at Global level so did not mention the Application name in the MaxL while registering:

create or replace function '@BatEx' as

'BatEx'

spec '@BatEx(Complete path in double quotes)'

comment 'A CDF functions that executes batch file in Essbase Server';

5. Here is the calc script:

@BatEx "E:/Oracle/Middleware/EPMSystem11R1/common/utilities/Test.bat"; - this gives an error: Error: 1012000 Invalid Syntax - Not a CALC command [@BatEx]

I tried another way:

RUNJAVA @BatEx "E:/Oracle/Middleware/EPMSystem11R1/common/utilities/Test.bat"; - Gives an error: Problem running [@BatEx "E:/Oracle/Middleware/EPMSystem11R1/common/utilities/Test.bat"]: [Can not find class @BatEx]

Where am I wrong here? Please help me here.

Regards,

RB

This post has been answered by 1003078 on Aug 14 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 11 2014
Added on Aug 12 2014
8 comments
3,038 views