Skip to main content

Following a move to version 7 of Visual COBOL,  an Ant-based build has been failing as shown below.  A compile failure is not obvious, but in reviewing a "-debug" log produced by Ant, noticed was the following exit code.
This exit code presents randomly in programs undergoing a Db2 pre-compile. Micro Focus support has been engaged, but no joy yet. Has anyone encountered this and, if so, can please offer a solution?

[cobol] Compilation complete with 0 errors, 0 warnings, 0 notices and an exit code of 255



BUILD FAILED
D:\\bamboo-agent-home\\xml-data\\build-dir\\ICING-IN5614-JOB1\\.cobolbuild1:68184: The following error occurred while executing this line:
D:\\bamboo-agent-home\\xml-data\\build-dir\\ICING-IN5614-JOB1\\.cobolbuild1:57176: Compilation errors have occurred
        at com.microfocus.ant.AntUtil.createMfBuildException(AntUtil.java:490)
        at com.microfocus.ant.AbstractMatchingTask.invokeRunners(AbstractMatchingTask.java:195)
        at com.microfocus.ant.AbstractCompilingMatchingTask.execute(AbstractCompilingMatchingTask.java:588)
        at com.microfocus.ant.TaskCobol.execute(TaskCobol.java:357)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
        at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
        at org.apache.tools.ant.Task.perform(Task.java:350)
        at org.apache.tools.ant.Target.execute(Target.java:449)
        at org.apache.tools.ant.Target.performTasks(Target.java:470)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1388)
        at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:36)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:437)
        at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
        at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
        at org.apache.tools.ant.Task.perform(Task.java:350)
        at org.apache.tools.ant.Target.execute(Target.java:449)
        at org.apache.tools.ant.Target.performTasks(Target.java:470)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1388)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1361)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
        at org.apache.tools.ant.Main.runBuild(Main.java:834)
        at org.apache.tools.ant.Main.startAnt(Main.java:223)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:284)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:101)

Following a move to version 7 of Visual COBOL,  an Ant-based build has been failing as shown below.  A compile failure is not obvious, but in reviewing a "-debug" log produced by Ant, noticed was the following exit code.
This exit code presents randomly in programs undergoing a Db2 pre-compile. Micro Focus support has been engaged, but no joy yet. Has anyone encountered this and, if so, can please offer a solution?

[cobol] Compilation complete with 0 errors, 0 warnings, 0 notices and an exit code of 255



BUILD FAILED
D:\\bamboo-agent-home\\xml-data\\build-dir\\ICING-IN5614-JOB1\\.cobolbuild1:68184: The following error occurred while executing this line:
D:\\bamboo-agent-home\\xml-data\\build-dir\\ICING-IN5614-JOB1\\.cobolbuild1:57176: Compilation errors have occurred
        at com.microfocus.ant.AntUtil.createMfBuildException(AntUtil.java:490)
        at com.microfocus.ant.AbstractMatchingTask.invokeRunners(AbstractMatchingTask.java:195)
        at com.microfocus.ant.AbstractCompilingMatchingTask.execute(AbstractCompilingMatchingTask.java:588)
        at com.microfocus.ant.TaskCobol.execute(TaskCobol.java:357)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
        at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
        at org.apache.tools.ant.Task.perform(Task.java:350)
        at org.apache.tools.ant.Target.execute(Target.java:449)
        at org.apache.tools.ant.Target.performTasks(Target.java:470)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1388)
        at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:36)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:437)
        at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
        at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
        at org.apache.tools.ant.Task.perform(Task.java:350)
        at org.apache.tools.ant.Target.execute(Target.java:449)
        at org.apache.tools.ant.Target.performTasks(Target.java:470)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1388)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1361)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
        at org.apache.tools.ant.Main.runBuild(Main.java:834)
        at org.apache.tools.ant.Main.startAnt(Main.java:223)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:284)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:101)

Hi Bob,

Working with Fano, I just started looking at your support incident for this problem. We will most likely need to get some additional trace files from you in order to analyze this further. We will work with you directly through the case.

Thanks


Hi Bob,

Working with Fano, I just started looking at your support incident for this problem. We will most likely need to get some additional trace files from you in order to analyze this further. We will work with you directly through the case.

Thanks

Thanks  .  Our support team doesn't have direct control over this build server but we have requested installation of Patch Update 20.

We have noticed that when the exit code of 255 is received that a zero byte length COBOL compile listing file is created and no obj file is produced.  This seems to be enough to cause the Ant build to fail with a return code of 1.


Following a move to version 7 of Visual COBOL,  an Ant-based build has been failing as shown below.  A compile failure is not obvious, but in reviewing a "-debug" log produced by Ant, noticed was the following exit code.
This exit code presents randomly in programs undergoing a Db2 pre-compile. Micro Focus support has been engaged, but no joy yet. Has anyone encountered this and, if so, can please offer a solution?

[cobol] Compilation complete with 0 errors, 0 warnings, 0 notices and an exit code of 255



BUILD FAILED
D:\\bamboo-agent-home\\xml-data\\build-dir\\ICING-IN5614-JOB1\\.cobolbuild1:68184: The following error occurred while executing this line:
D:\\bamboo-agent-home\\xml-data\\build-dir\\ICING-IN5614-JOB1\\.cobolbuild1:57176: Compilation errors have occurred
        at com.microfocus.ant.AntUtil.createMfBuildException(AntUtil.java:490)
        at com.microfocus.ant.AbstractMatchingTask.invokeRunners(AbstractMatchingTask.java:195)
        at com.microfocus.ant.AbstractCompilingMatchingTask.execute(AbstractCompilingMatchingTask.java:588)
        at com.microfocus.ant.TaskCobol.execute(TaskCobol.java:357)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
        at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
        at org.apache.tools.ant.Task.perform(Task.java:350)
        at org.apache.tools.ant.Target.execute(Target.java:449)
        at org.apache.tools.ant.Target.performTasks(Target.java:470)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1388)
        at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:36)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:437)
        at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
        at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
        at org.apache.tools.ant.Task.perform(Task.java:350)
        at org.apache.tools.ant.Target.execute(Target.java:449)
        at org.apache.tools.ant.Target.performTasks(Target.java:470)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1388)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1361)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
        at org.apache.tools.ant.Main.runBuild(Main.java:834)
        at org.apache.tools.ant.Main.startAnt(Main.java:223)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:284)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:101)

This looks to have been caused by the unwitting use of an older version of Db2 client. Following an upgrade of Db2 Client from version 11.1.0 to version 11.5.7 and application of patch update 20 to Visual COBOL Build tools 7.0, our Ant-based builds began working without error. I suspect this APAR related to the Db2 11.1 client *might* have had some bearing, but don't know this for certain:
www.ibm.com/.../dt158798. Thanks for your support.

Case closed.