Page 1 of 1

Object reference not set to an instance of an object

PostPosted: Tue Dec 13, 2016 6:40 pm
by jak
Hi,

when we were trying to run action it says this error
"Object reference not set to an instance of an object."

we have already checked all our configuration,
can you please tell me steps to fix this issue.

Thank you in Advance!

Re: Object reference not set to an instance of an object

PostPosted: Tue Dec 13, 2016 8:31 pm
by Mike.Sheen
Hi jak,

You're not giving us much to go on here. There are a number of possible reasons why you're getting that error.

Is this caused by a plugin you have written?, or is it one of our standard plugins? Or is it a stand-alone application?

What version of Jiwa is this occurring in?

Mike

Re: Object reference not set to an instance of an object

PostPosted: Tue Dec 13, 2016 11:34 pm
by jak
Hi!

thanks for your quick reply,
i'm using jiwa version 7, and this error caused on magento integration standard plugin,
on every action given there, when we try to run any of the action it throws this message in logs,

I have attached is snapshot here,

this is happening for every action available in "Available Actions",

can you please tell me steps to fix this issue.

Thank you,

Re: Object reference not set to an instance of an object  Topic is solved

PostPosted: Sat Dec 17, 2016 12:20 pm
by Mike.Sheen
Hi jak,

To debug this, add some additional logging to the plugin.

In the plugin, search for a method named "CreateMagentoCategoriesFromJiwa" - there is a find tool on the toolbar of the code editor you can use to do this.

The last successful verbose log in your screenshot is "Finished retrieving Catalog tree from magento" - you can see where that is within CreateMagentoCategoriesFromJiwa - it'll look this this:

Code: Select all
MagentoIntegration.LogActivity(String.Format("Finished retrieving Catalog tree from magento"), JiwaMagento.IntegrationAction.LoggingPolicyTypes.Verbose, IntegrationAction);


Copy that line and paste it in various places in the code following to isolate where the issue is. Make sure you change the log text from "Finished retrieving Catalog tree from magento" to something identifiable - I generally use "checkpoint 1", "checkpoint 2", et cetera.

Then run the integration again (you'll need to log out and back into Jiwa after editing the plugin and before running the integration).

This should give us a better idea of that is causing the error. Try to isolate the exact line of code causing the problem, and report back here your findings.

Mike