java.sql.SQLException: Unable to run insert stmt on object MetricsDoubleTypeDevice(sensorVariable=SensorVariable(id=3, sensor=Sensor(id=2, sensorId=0, type=S_MOTION, name=, lastSeen=1472079176717, node=Node(id=2, eui=20, gatewayTable=GatewayTable(id=1, enabled=true, name=mosquitto, networkType=MY_SENSORS, timestamp=1472065324018, state=UP, statusMessage=Connected Successfully, statusSince=1472078288689, type=MQTT, properties={p=, u=, bh=tcp://localhost:1883, tp=mygateway-in, cid=mycontroller_mqtt_client, ts=mygateway-out}), name=MicrowaveTest, version=Aug 25 2016 | 00:52:22, type=S_ARDUINO_NODE, libVersion=2.0.0, batteryLevel=null, eraseConfig=null, firmware=null, state=UP, lastSeen=1472079174284, rssi=100%|100%, properties={}, parentNodeEui=0, registrationState=REGISTERED), room=null, variableTypes=[Variable 1, Variable 2]), variableType=V_VAR2, metricType=DOUBLE, timestamp=1472079176762, value=1.0, previousValue=4.0, unitType=U_NONE, readOnly=false, offset=0.0, priority=100, graphProperties={color=#ff7f0e, interpolate=linear, subType=line, useGlobal=true, type=lineChart}), timestamp=1472079176762, samples=1, min=1.0, max=1.0, avg=1.0, aggregationType=RAW, timestampFrom=null, timestampTo=null): INSERT INTO `metrics_double_type_device` (`sensorVariableId` ,`timestamp` ,`samples` ,`min` ,`max` ,`avg` ,`aggregationType` ) 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 cimba007
, 1 year ago
-out}), name=MicrowaveTest, version=Aug 25 2016 | 00:52:22, type=S_ARDUINO_NODE, libVersion=2.0.0, batteryLevel=null, eraseConfig=null, firmware=null, state=UP, lastSeen=1472079174284, rssi=100%|100%, properties={}, parentNodeEui=0, registrationState
via GitHub by cimba007
, 1 year ago
=GatewayTable(id=1, enabled=true, name=mosquitto, networkType=MY_SENSORS, timestamp=1470659030270, state=UP, statusMessage=Connected Successfully, statusSince=1471002435640, type=MQTT, properties={p=, u=, bh=tcp://localhost:1883, tp=mysensors-in, cid
via GitHub by gbrd
, 1 year ago
]), 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
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 MetricsDoubleTypeDevice(sensorVariable=SensorVariable(id=3, sensor=Sensor(id=2, sensorId=0, type=S_MOTION, name=, lastSeen=1472079176717, node=Node(id=2, eui=20, gatewayTable=GatewayTable(id=1, enabled=true, name=mosquitto, networkType=MY_SENSORS, timestamp=1472065324018, state=UP, statusMessage=Connected Successfully, statusSince=1472078288689, type=MQTT, properties={p=, u=, bh=tcp://localhost:1883, tp=mygateway-in, cid=mycontroller_mqtt_client, ts=mygateway-out}), name=MicrowaveTest, version=Aug 25 2016 | 00:52:22, type=S_ARDUINO_NODE, libVersion=2.0.0, batteryLevel=null, eraseConfig=null, firmware=null, state=UP, lastSeen=1472079174284, rssi=100%|100%, properties={}, parentNodeEui=0, registrationState=REGISTERED), room=null, variableTypes=[Variable 1, Variable 2]), variableType=V_VAR2, metricType=DOUBLE, timestamp=1472079176762, value=1.0, previousValue=4.0, unitType=U_NONE, readOnly=false, offset=0.0, priority=100, graphProperties={color=#ff7f0e, interpolate=linear, subType=line, useGlobal=true, type=lineChart}), timestamp=1472079176762, samples=1, min=1.0, max=1.0, avg=1.0, aggregationType=RAW, timestampFrom=null, timestampTo=null): INSERT INTO `metrics_double_type_device` (`sensorVariableId` ,`timestamp` ,`samples` ,`min` ,`max` ,`avg` ,`aggregationType` ) 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:847)
at org.mycontroller.standalone.message.McMessageEngine.execute(McMessageEngine.java:116)
at org.mycontroller.standalone.message.McMessageEngine.run(McMessageEngine.java:973)
at java.lang.Thread.run(Thread.java:745)

Users with the same issue

Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Once, 7 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
17 times, 8 months ago

Write tip

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