Page 1 of 1

File Watcher error

PostPosted: Thu Sep 11, 2014 5:38 pm
by DannyC
Hi,
version 7.0.78

I am getting this error importing a journal CSV. It worked previousy & without any changes that we're aware of, it now isn't working. How can we diagnose the cause?

It is using a plugin that is a slightly modded version of the shipped Jiwa File Watcher plugin just to change the watched folder & slight formatting differences in the source CSV file. The plugin was working fine, and is also working fine on another test PC, but somehow the attached error is now showing in Event Viewer.

Cheers

Re: File Watcher error

PostPosted: Fri Sep 12, 2014 12:54 pm
by Mike.Sheen
DannyC wrote:How can we diagnose the cause?


I'd start by putting some logging into the event log at various points in the plugin to isolate where the cause of the exception is.

E.g.: Scatter something like this around the plugin - before and after things which would be candidates for an exception (such as before and after moving a file, before and after calling the jiwa objects to import, etc).
Code: Select all
Dim Log As New System.Diagnostics.EventLog("Application")
Log.Source = "Attkey Plugin Diagnostic"
Log.WriteEntry("Checkpoint 1 - Before file copy")
 Log.Close()


Once you've found where the problem occurs, put a try catch around the problem code and log to the event log the exception - it might give more information.

Because the file watcher plugin is run in the context of a service, make sure your plugin isn't trying to do something which normally requires a user context - things like displaying message boxes, forms are forbidden, as is emailing using Outlook.

If none of this helps, copy the plugin, modify it to be launched from the menu instead and test to see if the error occurs when not run as a service. If you get to that point and the error still occurs, then you can put a System.Diagnostics.Debugger.Break line in your code and this will have Visual Studio load up and allow you to step through the code to further debug.

Mike

Re: File Watcher error

PostPosted: Wed Sep 17, 2014 10:52 pm
by Mike.Sheen
Did you have any luck with your troubleshooting, Danny?

Re: File Watcher error

PostPosted: Thu Sep 18, 2014 1:51 pm
by DannyC
No luck yet. I am still getting the error.
I have put in those Log.WriteEntry lines but nothing is getting written to the Event log.

I am suspecting that the plugin is not even firing. I tried a repair installation of Jiwa because I think the service was playing up. As it turned out, during the repair installation the JiwaPluginSchedulerService.exe would not reinstall - an error happened on that specific file!

I am checking with their IT team if any permissions have changed anywhere - else I will do a complete removal of Jiwa 7 & try reinstalling.

Cheers

Danny

Re: File Watcher error  Topic is solved

PostPosted: Thu Oct 16, 2014 1:12 pm
by DannyC
A reinstall fixed it.

Thanks