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
Ah, we are running two batch servers! I'm going to try specifying one server in the batch group and see if it's only failing if it runs on one.
Not sure about the assembly files, I assumed they were all up to date, possibly because I'm only compiling CIL on one server?
Thanks for this hint :)
Are you running multiple batch servers and do all of them have new assembly files?
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,900 Super User 2024 Season 2
Martin Dráb 229,275 Most Valuable Professional
nmaenpaa 101,156