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 cimba007
, 1 year ago
, registrationState=REGISTERED), room=null, variableTypes=[Variable 1, Variable 2]), variableType=V_VAR1, metricType=DOUBLE, timestamp=1472079118275, value=16.13, previousValue=220.28, unitType=U_NONE, readOnly=false, offset=0.0, priority=100, graphProperties={color
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
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
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 (?,?,?,?,?,?,?,?,?,?,?)
org.h2.jdbc.JdbcSQLException: Unique index or primary key violation: "CONSTRAINT_INDEX_4B ON PUBLIC.METRICS_DOUBLE_TYPE_DEVICE(SENSORVARIABLEID, TIMESTAMP, AGGREGATIONTYPE) VALUES ( /* key:63052 */ 2, 1472079118275, null, null, null, null, 0)"; SQL statement:
INSERT INTO `metrics_double_type_device` (`sensorVariableId` ,`timestamp` ,`samples` ,`min` ,`max` ,`avg` ,`aggregationType` ) 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: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)