If, after upgrading Sage CRM from 7.1 to any later version of Sage CRM, an error message appears after opening the gadget template in the Dashboard, then the issue is likely caused by data issues on the Notification gadgets in the LPGadget table.

In order to eliminate this error,  the following 4 gadget records need to set as Deleted.

 

Post Sage CRM Upgrade Gadget Template Error

 

The Tomcat log shows:

ERROR [http-apr-11009-exec-8]: 13-Mar-2017 18:57:27.532 com.sage.scrm.model.layout.error.SageInvalidGadgetDataSourceException: java.lang.NullPointerException
com.sage.scrm.model.layout.error.SageInvalidGadgetDataSourceException: java.lang.NullPointerException
at com.sage.scrm.model.layout.GadgetDataSource.initialize(GadgetDataSource.java:341)
at com.sage.scrm.model.layout.GadgetDataSourceFactory.updateDataSource(GadgetDataSourceFactory.java:121)
at com.sage.scrm.model.layout.GadgetDataSourceFactory.createDataSource(GadgetDataSourceFactory.java:421)
at com.sage.scrm.model.layout.GadgetDataSourceFactory.createDataSourcesForNotifications(GadgetDataSourceFactory.java:371)
at com.sage.scrm.model.layout.GadgetDataSourceFactory.createDataSources(GadgetDataSourceFactory.java:494)
at com.sage.scrm.model.layout.GadgetDataSourceFactory$$FastClassBySpringCGLIB$$e9537248.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)

Caused by: java.lang.NullPointerException
at com.sage.scrm.model.layout.GadgetDataSource.getNotificationColumn(GadgetDataSource.java:958)
at com.sage.scrm.model.layout.GadgetDataSource.addNotificationColumns(GadgetDataSource.java:939)
at com.sage.scrm.model.layout.GadgetDataSource.initializeNotification(GadgetDataSource.java:919)
at com.sage.scrm.model.layout.GadgetDataSource.initialize(GadgetDataSource.java:323)
… 113 more

First, lets find all the notification gadgets,

Select * From LPGadget Where LPGad_Type like ‘%NotificationGadget’

 

Sage CRM Gadget Template Error

 

We then need to set the gadgets from the above sql statement as Deleted.

Update LPGadget Set LPGad_Delete = 1 where LPGade_GadgetId in ([The Gadget IDs will go here])

Now, the next time the user clicks on the Gadget Template button/link on the Dashboard, the gadgets will be rebuilt, and the error will be resolved.

 

If you still have questions, or the error is still occurring, contact the Sage CRM experts at Azamba to get help.