Business Object Listeners failed to compile

Posted by sjigesh on 10-Sep-2015 15:35

Hi All,

I am getting the below error when I am calling the precompile method to generate the eds file.However  when  I am  precompiling the same file using deployment console, it is able to generate the eds file successfully

Error Details

*** Business Object Listeners failed to compile. Decision Service SNAP_Ruleflow major version 1 minor version 0 is deployed to only accept XML Payloads.
Please review log file for compiler errors.

Code 

package com;

import com.corticon.service.ccdeploy.exception.CcDeployFileOrDirNotFoundException;
import com.corticon.service.ccdeploy.exception.CcDeployInvalidArgumentException;
import com.corticon.service.ccdeploy.exception.CcDeployInvalidDecisionServiceException;
import com.corticon.service.ccserver.exception.CcServerInvalidSandboxException;
import com.corticon.eclipse.server.core.ICcServer;
import com.corticon.eclipse.server.core.impl.CcServerImpl;
import com.corticon.eclipse.studio.deployment.swing.ICcDeploy;
import com.corticon.eclipse.studio.deployment.swing.impl.CcDeploy;

public class TestPrecompile
{
public static void main(String[] args) throws CcServerInvalidSandboxException, CcDeployFileOrDirNotFoundException, CcDeployInvalidArgumentException {
TestPrecompile TCP = new TestPrecompile();

TCP.checkPrecimplileService();

}


public void checkPrecimplileService() throws CcServerInvalidSandboxException, CcDeployFileOrDirNotFoundException, CcDeployInvalidArgumentException
{

ICcDeploy deploy = new CcDeploy();
ICcServer server= new CcServerImpl();


try {
deploy.precompileDecisionService("C:\\Jigesh....P_Ruleflow.erf", "SNAP_Ruleflow", "C:\\Jigesh...Rule_Flow", true); //have removed the full path
} catch (CcDeployInvalidDecisionServiceException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}

.eds file generation through Console

Also I am unable to find the error logsI.what location should i search

All Replies

Posted by Jan Krishnamurthy on 10-Sep-2015 15:52

This error occurs if your rules use business objects and they are not in the class path when compiling the ruleflow to .eds

- Jan

Posted by aparekh on 10-Sep-2015 15:54

The Vocab that you have used for the .eds  creation, has OM metadata. If this is indeed the case that you will have to add the BO s to your Classpath in order to not see this error message. Alternatively, you can clear the JOM metadata from the Vocab being used for .eds creation and then creating the .eds.

Posted by sjigesh on 11-Sep-2015 02:02

I have tried adding the BOs but now m getting the below error

Cc|2015-09-11 12:17:58.701|Thread:Thread-7|Version: 5.4.1.0 -b6506(5.4.6506)|sjigesh|ERROR|com.corticon.eclipse.server.core.compile.AntCompileImpl$AntProcessRunner|AntProcessRunner.run() - Unable to compile Java code (return value 1):

InputMessages:

ErrorMessages:

no main manifest attribute, in C:/Users/sjigesh/workspace/Corticon/Corticon/lib/CorticonServer.jar

Cc|2015-09-11 12:18:03.057|Thread:main|Version: 5.4.1.0 -b6506(5.4.6506)|sjigesh|ERROR||com.corticon.eclipse.server.core.compile.CcJavaCompilerException: AntProcessRunner.run() - Unable to compile Java code (return value 1):

InputMessages:

ErrorMessages:

no main manifest attribute, in C:/Users/sjigesh/workspace/Corticon/Corticon/lib/CorticonServer.jar

Object state for: null: null

at com.corticon.eclipse.server.core.compile.AntCompileImpl.callJavaCompileOutOfProcess(AntCompileImpl.java:243)

at com.corticon.eclipse.server.core.compile.AntCompileImpl.callJavaCompile(AntCompileImpl.java:156)

at com.corticon.eclipse.server.core.compile.AntCompileImpl.compileInternal(AntCompileImpl.java:116)

at com.corticon.eclipse.server.core.compile.AntCompileImpl.compile(AntCompileImpl.java:88)

at com.corticon.eclipse.server.core.CcServerUtils.compileRuleflow(CcServerUtils.java:585)

at com.corticon.eclipse.server.core.CcServerUtils.compileRuleflow(CcServerUtils.java:239)

at com.corticon.eclipse.server.core.impl.CcServerImpl.precompileDecisionService(CcServerImpl.java:11960)

at com.corticon.eclipse.server.core.impl.CcServerImpl.precompileDecisionService(CcServerImpl.java:11826)

at com.TestPrecompile.checkPrecimplileService(TestPrecompile.java:43)

at com.TestPrecompile.main(TestPrecompile.java:20)

Original Compilation Exception

Posted by Jan Krishnamurthy on 11-Sep-2015 08:34

I'd encourage you to open a support case to resolve these issues occurring during compile.

- Jan

Posted by sjigesh on 11-Sep-2015 08:41

But the same thing is working when I am creating a eds through console.I feel that it should be  work here also

Posted by sjigesh on 11-Sep-2015 10:08

Additionaly, I have also tried removing the Business Object jars to check if I am getting the Business Object error  mentioned above. But even after removing them I m still getting the "no main manifest attribute" error.

I feel some files/ data/  cache  needs to be cleared

Posted by sjigesh on 12-Sep-2015 12:50

Guys need your help to get this issues resolved.I am unable to figure out the issue I am getting  for PrecompileService.

When I call the precompile method it is throwing Failed to compile Ruleflow earliexception

Earlier , I was getting “Business Object Listeners failed to compile” error. When I added the BO jars I didn’t got the same error however I am getting “Failed to compile Ruleflow earliexception”

I even tried to reproduce the BO error by removing BO jars but even after removing the Jars I am still getting “Failed to compile Ruleflow exception” Do I need to clear any files/cache?

When I try to convert the erf file to eds through Deployment Console with the same erf file that I used for calling precompile method it worked fine.

I am unable to understand how I can get this issue resolved.I firmly believe that if console is able to convert the files then precompile method should also be able to convert it.

Is there some other way I can convert erf to eds programmatically?

This thread is closed