Home
»
Microsoft Dynamics AX
»
Dilip's blog on MICROSOFT DYNAMICS AX
»
Troubleshooting Batch Client error ClrObject static method invocation error System.Reflection.TargetInvocationException Exception has been thrown by the target of an invocation
Troubleshooting Batch Client error ClrObject static method invocation error System.Reflection.TargetInvocationException Exception has been thrown by the target of an invocation
About
Dilip's blog on MICROSOFT DYNAMICS AX
Greetings! Welcome to my Microsoft Dynamics AX and related Microsoft Technologies blog.
Options
RSS for posts
Related Posts
AX for Retail: Bulk insert error in Store connect when running P job (error 32769)
by
Becky Newell
on
1 Jun 2012
0
comments
P job Error 32769 in Retail Store Connect
by
Becky Newell
on
3 Dec 2012
0
comments
How can i install Ax2009 EP
by
jun dv
on
4 Dec 2010
Not Answered
View More
Troubleshooting Batch Client error ClrObject static method invocation error System.Reflection.TargetInvocationException Exception has been thrown by the target of an invocation
Dilip
28 Jan 2012 4:12 AM
Comments
0
Recently, we shifted our Dynamics AX 4.0 Batch Clients from a Server box to Windows 7 Client. After the move, all other batches were running successfully except this batch which has some custom code to do FTP transmission and then move the files to a different directory
Error:
The batch Client was showing this error “ClrObject static method invocation error” and the inner exception revealed the below detailed error
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.IOException: The process cannot access the file because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.__Error.WinIOError()
at System.IO.File.Move(String sourceFileName, String destFileName)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Refle! ction.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at ClrBridgeImpl.InvokeClrStaticMethod(ClrBridgeImpl* , Char* pszClassName, Char* pszMethodName, Char* assemblyName, Int32 argsLength, ObjectWrapper** arguments, Boolean* isException)
Troubleshooting Steps:
Tried Restarting Batch Client box and AOS Service but without any luck.
Solution:
As the issue was with the FTP batch job and all other batches were working fine, we tried introducing
sleep
method with 10 secs of delay before the file move process kicked in. Still didn’t work, increased the delay interval for a further of 60 secs and now the batch started working again.
$core_v2_language.FormatString($core_v2_language.GetResource('Blog_PostQuestionAnswerView_CommentsCountFormatString'), $post.CommentCount)
Read the complete post at
daxdilip.blogspot.com/.../troubleshooting-batch-client-error.html
Tips and Tricks
,
AX General
,
Dynamics AX
,
Troubleshooting