Question Status

Suggested Answer
ChrisAX asked a question on 13 Jun 2014 12:31 PM
Hello, I have a class, creating an csv file. when I run it normaly it works, but running the class in a Batch I get the following error: Microsoft.Dynamics.Ax.Xpp.InvalidRemoteCallException: Exception of type 'Microsoft.Dynamics.Ax.Xpp.InvalidRemoteCallException' was thrown. at Dynamics.Ax.Application.AX_CMRObjectExport.Unpack(Object[] packedClass)
Reply
Suggested Answer
Oleksandr Nazarov responded on 13 Jun 2014 1:00 PM

It looks like AX tries to pop up a dialog, and client calls are not allowed in batch. I have seen issues when a Query object unpack resulted in a Query form shown. After I reset usage data, the window stopped popping up.

Reply
ChrisAX responded on 13 Jun 2014 1:43 PM

yes, deleting usage data fixed this but now I get a different one:

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 42

  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)

Reply
ChrisAX responded on 15 Jun 2014 11:33 AM

Any ideas? I have several batch classes and they work...but this not. Why?

Reply
Suggested Answer
Nitesh Ranjan responded on 15 Jun 2014 7:12 PM

I suggest you to perform incremental CIL compile for you Dynamics AX

You van do it from development workspace, under build menu.

ensure that you dont have any compilation error.

Reply
ChrisAX responded on 15 Jun 2014 10:03 PM

Hi I already did that...without success. The error still exists

Reply
Martin Dráb responded on 15 Jun 2014 11:10 PM

What code do you have at line 42 in BatchRun.runJobStaticCode()? What if you actually use debugger to debug it?

Reply
ChrisAX responded on 15 Jun 2014 11:18 PM

code is the following:

isRunBaseBatch = SysDictClass::isEgualOrSuperclass(classIdGet(batchClass), classNum(RunBaseBatch));

Debugging...how can you debug a batchjob?

Reply
Suggested Answer
Kumar Gaurav responded on 16 Jun 2014 12:24 AM

Check your pack and unpack method, if they seems alright than look for any client side code calling , eg. WINAPI class. Once that is not an issue then see if you have made run on property of class on client. After fixing everything try to generate CIL, restart aos and try it.

Reply
Suggested Answer
Oleksandr Nazarov responded on 13 Jun 2014 1:00 PM

It looks like AX tries to pop up a dialog, and client calls are not allowed in batch. I have seen issues when a Query object unpack resulted in a Query form shown. After I reset usage data, the window stopped popping up.

Reply
Suggested Answer
Nitesh Ranjan responded on 15 Jun 2014 7:12 PM

I suggest you to perform incremental CIL compile for you Dynamics AX

You van do it from development workspace, under build menu.

ensure that you dont have any compilation error.

Reply
Suggested Answer
Kumar Gaurav responded on 16 Jun 2014 12:24 AM

Check your pack and unpack method, if they seems alright than look for any client side code calling , eg. WINAPI class. Once that is not an issue then see if you have made run on property of class on client. After fixing everything try to generate CIL, restart aos and try it.

Reply