Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

RunBaseBatch job giving error

Posted on by 280

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

  • lukbel Profile Picture
    lukbel 280 on at
    RE: RunBaseBatch job giving error

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

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: RunBaseBatch job giving error

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

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans