web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

RunBaseBatch job giving error

(0) ShareShare
ReportReport
Posted on by 282

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

I have the same question (0)
  • Verified answer
    Community Member Profile Picture
    on at

    Are you running multiple batch servers and do all of them have new assembly files?

  • lukbel Profile Picture
    282 on at

    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 :)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
Ali Zaidi Profile Picture

Ali Zaidi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans