Custom scripting not opening file for output (eScript)
(Doc ID 1999536.1)
Last updated on FEBRUARY 09, 2018
Applies to:Siebel CRM - Version 220.127.116.11 [IP2014] and later
Information in this document applies to any platform.
Custom scripting in opening a system file for logging crashes the application.
The issue has been reproduced using two different flows, as described below:
FLOW A. Using Dedicated > Administration - Business Service > Details > Simulator
1. Added in System preference of Siebel Application (Name = Value) - Allow File System Access* = TRUE**
2. Created Business Service "SC_CLIB", with the following script:
if(MethodName == "Execute")
var file = Clib.fopen("c:\\Test\\Test.txt", "awt");
3. Added method "Execute"
4. Went to Simulator, created a new line for this Service
5. Clicked Run and error appeared.
* In IP2013 version the Allow File System Access preference is set to True by default, but in latest versions it's replaced by 2 other preferences that target server and client side scripts:
- Runtime Scripts System Access (default is false)
- Compiled Scripts System Access (default is true)
** This was set for testing purposes, because in IP2013 it used to solve the issue of writing to system files. For reference please visit: Siebel eScript: "Access Denied: Cannot access file system file or shell" error in file i/o method of the Clib object (Doc ID 1594198.1)
FLOW B. Using Siebel Tools, added the following lines in "WebApplet_PreInvokeMethod" from Bookshelf 8.1/8.2 > Siebel eScript Language Reference > C Language Library Reference > Clib File and Directory Methods > Clib Open File Method
if (null != oFile)
var sHello = "Hello";
var nLen = sHello.length;
Clib.fgets (nLen, sHello);
And Siebel Application fails with a Crash:
Siebel Mobile Client
Siebel Mobile Client has stopped working
A problem caused the program to stop working correctly. Please close the program.
[Close the program]
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!
In this Document