Magento Call to setStore() on Non-Object – How to Fix

magento-1.7

I have created custom shipping module and gets following error:

Fatal error: Call to a member function setStore() on a non-object in /home/devjoand/public_html/includes/src/Mage_Shipping_Model_Shipping.php on line 421

I removed all files including .xml for this shipping module and it still gives me the same error. It doesn't send me to shipping method and stops execution from savebilling controller with above error. I have cleared cache/session and recompile but nothing works. Any help would be appreciated. Thanks in advance!

NOTE: It works fine in my local machine but not working on production server.

Best Answer

Even if you remove the files there are still the config settings that remain the core_config_data table.
When checking the available shipping methods magento looks for the values from the config on this path carriers/{carrier_code_here}/active. Then for all carrier codes that the value on the path mentioned above is 1 it tries to load the shipping method model.
If you deleted the files it does not exist anymore.
So make sure you delete the values from the core_config_data where path like 'carriers/{carrier_code_here}/%'