traccar 4.11 - device registration error

Jose B5 years ago

Hi Anton,

After update the traccar to 4.11, my devices do not register anymore: (Homologation enviroment)

	<!-- SQL - banco de dados -->
			<entry key='database.driver'>org.h2.Driver</entry>
			<entry key='database.url'>jdbc:h2:./data/database</entry>
			<entry key='database.user'>sa</entry>
			<entry key='database.password'></entry>
			
	<!-- SQL - banco de dados -->
2020-11-04 11:09:59  WARN: Automatic device registration error - 
org.h2.jdbc.JdbcSQLIntegrityConstraintViolationException: Referential integrity constraint violation: "FK_DEVICES_GROUPID: PUBLIC.TC_DEVICES FOREIGN KEY(GROUPID) REFERENCES PUBLIC.TC_GROUPS(ID) (1)"; SQL statement:
INSERT INTO tc_devices (model, category, name, uniqueId, attributes, groupId, contact, disabled, lastUpdate, phone) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [23506-200]
	at org.h2.message.DbException.getJdbcSQLException(DbException.java:459)
	at org.h2.message.DbException.getJdbcSQLException(DbException.java:429)
	at org.h2.message.DbException.get(DbException.java:205)
	at org.h2.message.DbException.get(DbException.java:181)
	at org.h2.constraint.ConstraintReferential.checkRowOwnTable(ConstraintReferential.java:319)
	at org.h2.constraint.ConstraintReferential.checkRow(ConstraintReferential.java:261)
	at org.h2.table.Table.fireConstraints(Table.java:1057)
	at org.h2.table.Table.fireAfterRow(Table.java:1075)
	at org.h2.command.dml.Insert.insertRows(Insert.java:211)
	at org.h2.command.dml.Insert.update(Insert.java:151)
	at org.h2.command.CommandContainer.executeUpdateWithGeneratedKeys(CommandContainer.java:272)
	at org.h2.command.CommandContainer.update(CommandContainer.java:191)
	at org.h2.command.Command.executeUpdate(Command.java:251)
	at org.h2.jdbc.JdbcPreparedStatement.execute(JdbcPreparedStatement.java:240)
	at com.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44)
	at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.execute(HikariProxyPreparedStatement.java)
	at org.traccar.database.QueryBuilder.executeUpdate(QueryBuilder.java:452)
	at org.traccar.database.DataManager.addObject(DataManager.java:458)
	at org.traccar.database.BaseObjectManager.addItem(BaseObjectManager.java:123)
	at org.traccar.database.DeviceManager.addUnknownDevice(DeviceManager.java:90)
	at org.traccar.BaseProtocolDecoder.findDeviceId(BaseProtocolDecoder.java:127)
	at org.traccar.BaseProtocolDecoder.getDeviceSession(BaseProtocolDecoder.java:185)
	at org.traccar.BaseProtocolDecoder.getDeviceSession(BaseProtocolDecoder.java:150)
	at org.traccar.protocol.Gps103ProtocolDecoder.decode(Gps103ProtocolDecoder.java:393)
	at org.traccar.ExtendedObjectDecoder.channelRead(ExtendedObjectDecoder.java:52)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
	at org.traccar.WrapperContext.fireChannelRead(WrapperContext.java:102)
	at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
	at org.traccar.WrapperInboundHandler.channelRead(WrapperInboundHandler.java:57)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
	at org.traccar.WrapperContext.fireChannelRead(WrapperContext.java:102)
	at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:324)
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:296)
	at org.traccar.WrapperInboundHandler.channelRead(WrapperInboundHandler.java:57)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
	at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:93)
	at org.traccar.handler.StandardLoggingHandler.channelRead(StandardLoggingHandler.java:43)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
	at org.traccar.handler.NetworkMessageHandler.channelRead(NetworkMessageHandler.java:37)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:714)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:615)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:578)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:834)

JB

Jose B5 years ago

Please, disconsider this topic