Exit Geofence Exception

Giovanni G.a year ago

When the device leaves the geofence I get this error in the logs, I noticed it because I didn't receive the set notification

2022-12-27 18:12:18  INFO: [Tba770b80] error - Cannot invoke "org.traccar.model.Geofence.getCalendarId()" 
because the return value of "org.traccar.session.cache.CacheManager.getObject(java.lang.Class, long)" is null -
 NullPointerException (GeofenceEventHandler:96 < BaseEventHandler:38 < BaseDataHandler:27 < ...)

If I link the geoarea to the device I receive the notification correctly, but as soon as I disconnect the geoarea it goes into error, the error is not related to the notification system

Thanks,
Giovanni

Anton Tananaeva year ago

Are you sure you're using the latest version?

Giovanni G.a year ago

Hi Anton,
yes I'm on 5.6 version

Anton Tananaeva year ago

Interesting... the latest official version is 5.5.

Giovanni G.a year ago

I'm on branch master, i found this exception running 5.5 version, then I did an update from master to the latest version

Anton Tananaeva year ago

The error could indicate that you removed or unlinked a geofence.

Giovanni G.a year ago

Ok, to test the notifications I followed these steps:
-I created the geofece above a stationary vehicle.
-I have linked the geofence to the vehicle, the geofence enter notification arrives.
Subsequently, to test the geofece exit notification, I unlinked the geofence from the vehicle and I expected to receive the notification in this case too.

Maybe I was wrong to carry out these tests with a stationary vehicle.

Thanks for the support

Anton Tananaeva year ago

That's exactly why you get the error. Removing geofence is not the same as exit.

Next time you should probably provide full context upfront.

Giovanni G.a year ago

You are right, thanks for the support!