Hi all
Running AX 2012 R3 CU9, and getting a bit of a problem with a custom batch job I built using RunBaseBatch, due to run every half hour, to update a field in the SalesTable.
After building it, running incremental/full CIL compile, then deploying it through a job, it works fine. But after a while it breaks with seemingly no code changes on our AOT, giving the following message:
"Unable to construct an object from the class TEE_CreditBatch_210217 in the batch framework. Make sure that the X++ code has been compiled to Microsoft .NET Framework CIL, and that the constructor does not require any parameters.
Microsoft.Dynamics.Ax.Xpp.ErrorException: Exception of type 'Microsoft.Dynamics.Ax.Xpp.ErrorException' was thrown.
at Dynamics.Ax.Application.BatchRun.runJobStaticCode(Int64 batchId) in BatchRun.runJobStaticCode.xpp:line 32
at Dynamics.Ax.Application.BatchRun.runJobStatic(Int64 batchId) in BatchRun.runJobStatic.xpp:line 13
at BatchRun::runJobStatic(Object[] )
at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeStaticCall(Type type, String MethodName, Object[] parameters)
at BatchIL.taskThreadEntry(Object threadArg)"
This confuses me because we already ran CIL and when you run incremental after it gives the error, it's already up to date (because we haven't made any changes since). At any rate, we run full CIL and it seems to fix it (until it breaks again later that day/early next morning). We've had to run full CIL compile during office hours previously and it's causing issues. But I can't work out what's causing it to fall over. Is the CIL a red herring? Is there situations where this has happened before?
Thanks in advance for all your help
Luke
*This post is locked for comments