java.sql.SQLException: Unable to run insert stmt on object MetricsBinaryTypeDevice(sensorVariable=SensorVariable(id=7, sensor=Sensor(id=8, sensorId=4, type=S_BINARY, name=Status salon, lastSeen=1472052735701, node=Node(id=4, eui=2, gatewayTable=GatewayTable(id=1, enabled=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=S_ARDUINO_REPEATER_NODE, libVersion=2.0.0, batteryLevel=null, eraseConfig=null, firmware=null, state=UP, lastSeen=1472052735707, rssi=null, properties={}, parentNodeEui=null, registrationState=REGISTERED), room=null, variableTypes=[Status]), variableType=V_STATUS, metricType=BINARY, timestamp=1472052735738, value=0, previousValue=0, unitType=U_NONE, readOnly=false, offset=0.0, priority=100, graphProperties={color=#ff7f0e, interpolate=linear, subType=line, useGlobal=true, type=lineChart}), timestamp=1472052735738, state=false, timestampFrom=null, timestampTo=null): INSERT INTO `metrics_binary_type_device` (`sensorVariableId` ,`timestamp` ,`state` ) VALUES (?,?,?)

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

,
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 Stack Overflow by Rubicon
, 2 years ago
Unable to run insert stmt on object com.myapp.tester.Article@7a36824: INSERT INTO `articles` (`category` ,`storyid` ,`body` ,`added` ) VALUES (?,?,?,?)
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
via Stack Overflow by Vibhay Sachan
, 1 year ago
Unable to run insert stmt on object com.limetray.pos.models.PosOrderDetails@64031751: INSERT INTO `pos_order_details` (`price` ,`product_id` ,`product_price_id` ,`product_description` ,`product_name` ,`tag_name` ,`quantity` ,`complimentary_quantity` ,`charge_group_id` ,`user_comments` ,`pos_order_id` ) VALUES (?,?,?,?,?,?,?,?,?,?,?)
java.sql.SQLException: Unable to run insert stmt on object MetricsBinaryTypeDevice(sensorVariable=SensorVariable(id=7, sensor=Sensor(id=8, sensorId=4, type=S_BINARY, name=Status salon, lastSeen=1472052735701, node=Node(id=4, eui=2, gatewayTable=GatewayTable(id=1, enabled=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=S_ARDUINO_REPEATER_NODE, libVersion=2.0.0, batteryLevel=null, eraseConfig=null, firmware=null, state=UP, lastSeen=1472052735707, rssi=null, properties={}, parentNodeEui=null, registrationState=REGISTERED), room=null, variableTypes=[Status]), variableType=V_STATUS, metricType=BINARY, timestamp=1472052735738, value=0, previousValue=0, unitType=U_NONE, readOnly=false, offset=0.0, priority=100, graphProperties={color=#ff7f0e, interpolate=linear, subType=line, useGlobal=true, type=lineChart}), timestamp=1472052735738, state=false, timestampFrom=null, timestampTo=null): INSERT INTO `metrics_binary_type_device` (`sensorVariableId` ,`timestamp` ,`state` ) VALUES (?,?,?)
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)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
Once, 6 months ago
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
150 more bugmates

Know the solutions? Share your knowledge to help other developers to debug faster.