SBX - Search With Button

SBX - Forum Post Title

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

Microsoft Dynamics AX Forum

shanawaz davood basha asked a question on 13 Jun 2019 1:00 AM
My Badges

Question Status

Unanswered

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)

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

Any idea to solve this error.

Thanks

Shan

Reply

Hello Shan,

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

Best regards,

Ludwig

Reply
shanawaz davood basha responded on 13 Jun 2019 6:41 AM
My Badges

Hi Ludwig,

Issue replicate in the test environment.

Any idea to solve this error.

Thanks

Shan

Reply

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?

Reply
shanawaz davood basha responded on 13 Jun 2019 9:04 AM
My Badges

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

Reply

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?

Reply

SBX - Two Col Forum

SBX - Migrated JS