Installing policy to a device from Management Center fails with the error Failed to install policy: Policy compilation failed: /BC/MC/CORE/POLICY/C
An invalid expression is contained within a nested CPL Fragment shared object.
For example, the following Local File policy includes a CPL Fragment.
The CPL Fragment contains a typo on line 4 such that a space was placed after the colon when calling another CPL Fragment, which makes it an invalid expression.
The Local File policy will install successfully after correcting the typo in the CPL Fragment. For the example above, the space was removed in the include statement for the nested CPL Fragment.
The log.log file can be used to identify the source of the error.
Download the log from Administration > Logs and search for logs similar to the following:
[2024-03-18 20:01:10.396] ERROR http-nio-8080-exec-1 com.floreysoft.jmte.message.DefaultErrorHandler Error while parsing 'include: space_before_name' at location (4:3): Invalid expression!
[2024-03-18 20:01:10.402] ERROR http-nio-8080-exec-1 ch.ralscha.extdirectspring.controller.RouterController Error calling method: installPolicy com.bluecoat.cm.model.config.PolicyException: /BC/MC/CORE/POLICY/COMPILATION_ERROR: {errorMessage=/BC/MC/CORE/POLICY/C}
<stack trace>
Caused by: com.bluecoat.cm.model.config.PolicyException: /BC/MC/CORE/POLICY/COMPILATION_ERROR: {errorMessage=Error while parsing 'include: space_before_name' at location (4:3)}
<stack trace>
Caused by: com.floreysoft.jmte.message.ParseException: Error while parsing 'include: space_before_name' at location (4:3): Invalid expression!