user3824908
user3824908

Reputation:

Batch job and batch classes in 2012 r3

I have problem with my batch job. It was designed for AX 2009 and added to 2012 r3, but after migration it stopped working despite it was working fine in 2009.

First errors after trying to run job: "Can not construct an object based on classItemTableUpdate batch processing environment . Make sure that the X ++ code was compiled to CIL format of the Microsoft .NET Framework, and the constructor does not require any parameters."

When I generated CIL there was warnig: "Warning: Recursive local methods are not supported in X++ CIL. ClassName: UpperItemTable, MethodName: eraseAndFillTable".

Class is working - table is updated after I manually run it but doing this each morning is quite meaningless.

EDIT:

I cant remove eraseAndFillTable() - this method is called by run() and without this method my batch job has no sense.

Upvotes: 1

Views: 1379

Answers (1)

Jan B. Kjeldsen
Jan B. Kjeldsen

Reputation: 18051

First I would eliminate the warning in method eraseAndFillTable, a method of your batch job, I presume. Substitute the recursion with a processing list of items or whatever it needs.

All batch is executed in CIL, so paying attention to CIL errors and warnings is first priority.

Upvotes: 1

Related Questions