error NullPointerException

error - NullPointerException (NotificationManager:49 < *:76 < *:105 < ConnectionManager:109 < BaseProtocolDecoder:216 < ...)
error - NullPointerException (NotificationManager:49 < *:76 < *:105 < ConnectionManager:109 < *:68 < MainEventHandler:97 < ...)

My version Traccar : 3.15
System: CentOS release 6.9
openjdk version "1.8.0_151"
OpenJDK Runtime Environment (build 1.8.0_151-b12)
OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)
OS : Linux/2.6.32-696.16.1.el6.x86_64/amd64
JVM : Oracle Corporation/1.8.0_151//usr/lib/jvm/java-1.8.0-openjdk-1.8.0.151-1.b12.el6_9.x86_64/jre/64
MYSQL: 5.6.30 with Engine InnoDB and Collation utf8

Anton Tananaev7 years ago

It indicates that you have some inconsistency in notification settings. Are you sure all Traccar tables are InnoDB?

yes

When I upgraded to version 3.15, all tables became myisam
I did these steps:
1ยบ - Backup the database without the tables of DATABASECHELOGLOCK and DATABASECHELOG,
2nd - I installed the new version of Traccar 3.15
3rd - I created a new database with utf8 and InnoDB and gave the necessary permissions
4th - I typed the command /etc/init.d/traccar start

But when I went to Log, he was stopped for 2 days with this information:

2017-12-15 23:41:18 INFO: Operating system name: Linux version: 2.6.32-696.16.1.el6.x86_64 architecture: amd64
2017-12-15 23:41:18 INFO: Java runtime name: OpenJDK 64-Bit VM Server vendor: Oracle Corporation version: 25.151-b12
2017-12-15 23:41:18 INFO: Memory limit heap: 853mb non-heap: 0mb
2017-12-15 23:41:18 INFO: Character encoding: UTF-8 charset: UTF-8
2017-12-15 23:41:18 INFO: Version: 3.15-SNAPSHOT

I created a base from the start, I left the system to create the database, and I imported the data in mysql with backup worksheets that I had ... more did not work very well :(

Anton Tananaev7 years ago

Do you have any constraints on the "DEVICE_NOTIFICATION" table?

Hegle Melgar7 years ago

I have exactly the same problem.
Chrystian, could you solve it?

Only a device with tk103 tracker throw this error (Is in 5002 port).
Until yesterday it work ok, but today the server don't can translate the message.

Other devices with gps103 (5001), meiligao, etc. work well.

This is part of log file:

2017-12-29 18:22:32  WARN: [AB848ED0] error - NullPointerException (NotificationManager:49 < *:76 < *:105 < ConnectionManager:109 < BaseProtocolDecoder:211 < ...)
2017-12-29 18:22:32  INFO: [AB848ED0] disconnected
2017-12-29 18:22:32  WARN: [AB848ED0] error - NullPointerException (NotificationManager:49 < *:76 < *:105 < ConnectionManager:109 < *:68 < MainEventHandler:97 < ...)

Thanks.

Anton Tananaev7 years ago

Are you using MySQL with MyISAM engine?

Hegle Melgar7 years ago

Thanks for your reply Anton.

No, I'm using MySQL with InnoDB:

'DATABASECHANGELOG'	 'InnoDB'
'DATABASECHANGELOGLOCK'	 'InnoDB'
'V_dtcDiario'	 NULL
'V_dtcMesResumen'	 NULL
'V_dtcTotal'	 NULL
'attributes'	 'InnoDB'
'calendars'	 'InnoDB'
'commands'	 'InnoDB'
'device_attribute'	 'InnoDB'
'device_command'	 'InnoDB'
'device_driver'	 'InnoDB'
'device_geofence'	 'InnoDB'
'device_notification'	 'InnoDB'
'devices'	 'InnoDB'
'drivers'	 'InnoDB'
'events'	 'InnoDB'
'geofences'	 'InnoDB'
'group_attribute'	 'InnoDB'
'group_command'	 'InnoDB'
'group_driver'	 'InnoDB'
'group_geofence'	 'InnoDB'
'group_notification'	 'InnoDB'
'groups'	 'InnoDB'
'notifications'	 'InnoDB'
'positions'	 'InnoDB'
'servers'	 'InnoDB'
'statistics'	 'InnoDB'
'user_attribute'	 'InnoDB'
'user_calendar'	 'InnoDB'
'user_command'	 'InnoDB'
'user_device'	 'InnoDB'
'user_driver'	 'InnoDB'
'user_geofence'	 'InnoDB'
'user_group'	 'InnoDB'
'user_notification'	 'InnoDB'
'user_user'	 'InnoDB'
'users'	 'InnoDB'
Anton Tananaev7 years ago

Do you have foreign key constraints in the database?

Hegle Melgar7 years ago

No, I don't have FKs in the DDBB.
I execute the following sentence and result is 0 rows:

select *
from information_schema.referential_constraints
where constraint_schema = 'track';
Anton Tananaev7 years ago

It means that your database was not InnoDB when you installed Traccar. That's your problem.

Hegle Melgar7 years ago

It's all ok now....!!!!
I put parameter " default-storage-engine = innodb " on /etc/my.cnf , restart mysql server, and start Traccar server with empty BBDD.
The FKs was created and de error disappeared.

Anton, thank you very much...
You free me from a big headache.
Regards from Uruguay.