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)

Releasing production for multiple orders in batch causes a stop error on the first order (AX2012 R2 CU9)

(0) ShareShare
ReportReport
Posted on by 561

Hi,

Releasing production for multiple orders in batch causes a stop error on the first order,  (AX2012 R2 CU9)

Path:
Production orders ->Any production order in released status ->Select 2 ->Production tab > Process group > Release button->General tab > select PrintRouteCard && Batch tab > select batch processing.
Batch job errors out:
Microsoft.Dynamics.Ax.Xpp.InvalidRemoteCallException: Exception of type 'Microsoft.Dynamics.Ax.Xpp.InvalidRemoteCallException' was thrown.  
at Dynamics.Ax.Application.ANA_ProductionRouteCardControll2.main(Args _args)  
at ANA_ProductionRouteCardControll2::Main(Object[] )  
at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeStaticCall(Type type, String MethodName, Object[] parameters)  
at Dynamics.Ax.Application.MenuFunction.Run(xArgs _args, Boolean ) in MenuFunction.run.xpp:line 76  
at Dynamics.Ax.Application.MenuFunction.Run(xArgs _args)  
at Dynamics.Ax.Application.ProdUpd.printoutReportFromMenuItem(String _menuItemStr, XppObjectBase _caller, Common _buffer, Boolean ) in ProdUpd.printoutReportFromMenuItem.xpp:line 27  
at Dynamics.Ax.Application.ProdUpd.printoutReportFromMenuItem(String _menuItemStr, XppObjectBase _caller, Common _buffer)  
at Dynamics.Ax.Application.ProdUpdRelease.Printout() in ProdUpdRelease.printout.xpp:line 52  
at Dynamics.Ax.Application.ProdUpdRelease.Run() in ProdUpdRelease.run.xpp:line 35  
at Dynamics.Ax.Application.ProdTableType.Runrelease(ProdParmRelease prodParmRelease, RunbaseRecsMapable _multi, Boolean ) in ProdTableType.runRelease.xpp:line 24  
at Dynamics.Ax.Application.ProdTableType.Runrelease(ProdParmRelease prodParmRelease, RunbaseRecsMapable _multi)  
at Dynamics.Ax.Application.ProdStatusType.Runrelease(ProdParmRelease _prodParmRelease, Boolean _ask, ProdPurch _prodPurch, RunbaseRecsMapable _multi, Boolean _runningPreviousJob, Boolean , Boolean , Boolean , Boolean ) in ProdStatusType.runRelease.xpp:line 43  
at Dynamics.Ax.Application.ProdStatusType.@Runrelease(ProdParmRelease _prodParmRelease, Boolean _ask, ProdPurch _prodPurch, RunbaseRecsMapable _multi, Boolean , Boolean , Boolean )  
at Dynamics.Ax.Application.ProdStatusType.Runrelease(ProdParmRelease _prodParmRelease, Boolean _ask, ProdPurch _prodPurch, RunbaseRecsMapable _multi)  
at Dynamics.Ax.Application.ProdMultiRelease.Run() in ProdMultiRelease.run.xpp:line 20  
at Dynamics.Ax.Application.BatchRun.runJobStaticCode(Int64 batchId) in BatchRun.runJobStaticCode.xpp:line 54  
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)
3630.pp.png

Controller main method is declared as : Public client static void main

2072.p1.png

Any idea to solve this error.

Thanks

Shan

*This post is locked for comments

I have the same question (0)
  • Ludwig Reinhard Profile Picture
    Microsoft Employee on at

    Hello Shan,

    Can you replicate the issue in a demo/test environment?

    Best regards,

    Ludwig

  • shanawaz davood basha Profile Picture
    561 on at

    Hi Ludwig,

    Issue replicate in the test environment.

    Any idea to solve this error.

    Thanks

    Shan

  • André Arnaud de Calavon Profile Picture
    301,088 Super User 2025 Season 2 on at

    Hi Shan,

    The 'ANA_ProductionRouteCardControl2' object is not standard. Is this part of an ISV solution or customization (or both)? If you need to have a class being able to run in batch, it should be based on IL code. Have you managed to build the CIL without errors?

  • shanawaz davood basha Profile Picture
    561 on at

    Hi Andre,

    It's customized object not ISV Solution. I have build CIL with out any errors.

    When I removed the client keyword from the main method "Public client static void main"

    as "Public static void main"

    Now no any error in the batch job. but its still in executing state for long time...

    Any idea to solve this issue.

    Thanks

    Shan

  • André Arnaud de Calavon Profile Picture
    301,088 Super User 2025 Season 2 on at

    Hi Shan,

    I did miss the fact that you used the keyword 'client'. That was indeed wrong. Can you tell if the batch job eventually ended correctly? If not, check if there are blocking SQL statements. If it did end, can you review the coding or share details what the batch job should do and what coding is used in the actual processing?

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
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans