D365 v10 Batch job execution error

Hi!

We are running the batch job which includes 2 tasks, the second should be run after the first is completed. Consultant is getting the error for the first task:

Error in collecting infolog Microsoft.Dynamics.Ax.Xpp.BreakException at Microsoft.Dynamics.Ax.MSIL.Interop.throwException(Int32 ExceptionValue, interpret* ip) at Microsoft.Dynamics.Ax.MSIL.cqlClassIL.Call(IntPtr c, String methodName, Object[] parameters, Type[] types, Object[] varargs, Type[] varargsTypes) at Microsoft.Dynamics.Ax.Xpp.XppObjectBase.Call(String methodName, Object[] parameters, Type[] types, Object[] varargs) at Dynamics.AX.Application.xInfo.copy(Int32 _from, Int32 _to) at Dynamics.AX.Application.Info.copy(Int32 _from, Int32 _to) in xppSource://Source/ApplicationPlatform\AxClass_Info.xpp:line 860 at Dynamics.AX.Application.Info.copy(Int32 _from, Int32 _to) at Dynamics.AX.Application.BatchRun.getInfoLog() in xppSource://Source/ApplicationPlatform\AxClass_BatchRun.xpp:line 1062 at Dynamics.AX.Application.BatchRun.getInfoLog() at Microsoft.Dynamics.AX.Batch.Batch.InvokeServerFinishTaskInNewSession(BatchTaskInfoWrapper taskInfo, Boolean isErrorCaught, Int32 exceptionval, Int64 elapsedMilliSeconds).

When I run it by myself - the execution ends successfully. What could be the source of error and where should I check?

When consultant tried to create the new batch from Batch jobs form he got a warning “The specified class is not fully designed for use in the Batch job form. Execution might provide unexpected results”. The class is of RunBaseBatch type and has canRunInNewSession = false. Could the first error be related to RunBaseBatch framework?

I’m not familiar with the error, but the comment of the label suggests that the class may be used in a wrong place. The comment says: “Warning message displayed for end user when they attempt to create a batch task from the UI that was designed to be created elsewhere.”. It sounds like the task shouldn’t be created manually.

Regarding the first error, consider debugging the code. It seems that you get something in infolog (and we don’t know what) and when the system tries to process the messages, it fails for some reason. Debugging might bring new information.

Thank you for the fast reply.

For the second message, there is a validation in Batch class that RunBaseBatch classes added manually as tasks should have canGoBatch method overridden on the class, that method was skipped on the class I’m looking into.

But it still doesn’t solve the main issue, the debugging is definitely always good idea, but, firstly, the error isn’t reproducing on dev box and secondly the batch job is running for several hours which makes debugging complicated… Will go on trying to reproduce it…