Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

  1. ,
    Expert tip

    Check if you're not creating unused SQL entities, as it might cause this exception.

Solutions on the web

via GitHub by gbrd
, 1 year ago
=true, name=g1, networkType=MY_SENSORS, timestamp=null, state=UP, statusMessage=Connected Successfully, statusSince=1471813237223, type=SERIAL, properties={br=115200, rdr=pi4j, rf=120, dr=Auto, pn=/dev/ttyUSB0}), name=Thermostat, version=1.1, type
via GitHub by cimba007
, 1 year ago
Unable to run insert stmt on object MetricsDoubleTypeDevice(sensorVariable=SensorVariable(id=2, sensor=Sensor(id=2, sensorId=0, type=S_MOTION, name=, lastSeen=1472079238564, node=Node(id=2, eui=20, gatewayTable=GatewayTable(id=1, enabled=true, name
via GitHub by cimba007
, 1 year ago
Unable to run insert stmt on object MetricsDoubleTypeDevice(sensorVariable=SensorVariable(id=46, sensor=Sensor(id=35, sensorId=0, type=S_LIGHT_LEVEL, name=Photoresistor GL5549 (v4), lastSeen=1471356147821, node=Node(id=12, eui=11, gatewayTable
via GitHub by yd1234
, 1 year ago
Unable to run insert stmt on object MetricsBatteryUsage(node=Node(id=16, eui=254, gatewayTable=GatewayTable(id=1, enabled=true, name=MyGw, networkType=MY_SENSORS, timestamp=null, state=UP, statusMessage=Connected Successfully, statusSince
org.h2.jdbc.JdbcSQLException: Unique index or primary key violation: "CONSTRAINT_INDEX_47 ON PUBLIC.METRICS_BINARY_TYPE_DEVICE(SENSORVARIABLEID, TIMESTAMP) VALUES ( /* key:26871 */ 7, 1472052735738, null)"; SQL statement:
INSERT INTO `metrics_binary_type_device` (`sensorVariableId` ,`timestamp` ,`state` ) VALUES (?,?,?) [23505-176]	at org.h2.message.DbException.getJdbcSQLException(DbException.java:344)	at org.h2.message.DbException.get(DbException.java:178)	at org.h2.message.DbException.get(DbException.java:154)	at org.h2.index.BaseIndex.getDuplicateKeyException(BaseIndex.java:103)	at org.h2.index.PageBtree.find(PageBtree.java:121)	at org.h2.index.PageBtreeLeaf.addRow(PageBtreeLeaf.java:151)	at org.h2.index.PageBtreeLeaf.addRowTry(PageBtreeLeaf.java:104)	at org.h2.index.PageBtreeNode.addRowTry(PageBtreeNode.java:206)	at org.h2.index.PageBtreeNode.addRowTry(PageBtreeNode.java:206)	at org.h2.index.PageBtreeIndex.addRow(PageBtreeIndex.java:97)	at org.h2.index.PageBtreeIndex.add(PageBtreeIndex.java:88)	at org.h2.table.RegularTable.addRow(RegularTable.java:120)	at org.h2.command.dml.Insert.insertRows(Insert.java:157)	at org.h2.command.dml.Insert.update(Insert.java:115)	at org.h2.command.CommandContainer.update(CommandContainer.java:79)	at org.h2.command.Command.executeUpdate(Command.java:254)	at org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:158)	at org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:144)	at com.j256.ormlite.jdbc.JdbcDatabaseConnection.insert(JdbcDatabaseConnection.java:170)	at com.j256.ormlite.stmt.mapped.MappedCreate.insert(MappedCreate.java:91)	at com.j256.ormlite.stmt.StatementExecutor.create(StatementExecutor.java:450)	at com.j256.ormlite.dao.BaseDaoImpl.create(BaseDaoImpl.java:310)	at org.mycontroller.standalone.db.dao.BaseAbstractDaoImpl.create(BaseAbstractDaoImpl.java:184)	at org.mycontroller.standalone.message.McMessageEngine.recordSetTypeData(McMessageEngine.java:848)	at org.mycontroller.standalone.message.McMessageEngine.execute(McMessageEngine.java:116)	at org.mycontroller.standalone.message.McMessageEngine.run(McMessageEngine.java:962)	at java.lang.Thread.run(Thread.java:745)