This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 141734 - [65cat] com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '1' for key 'PRIMARY'
Summary: [65cat] com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationExce...
Status: RESOLVED FIXED
Alias: None
Product: db
Classification: Unclassified
Component: Show Data (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: _ ahimanikya
URL: http://statistics.netbeans.org/except...
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-25 22:35 UTC by sunbiz
Modified: 2008-07-30 17:14 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 82252


Attachments
stacktrace (2.62 KB, text/plain)
2008-07-27 02:08 UTC, sunbiz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sunbiz 2008-07-25 22:35:03 UTC
Build: NetBeans IDE Dev (Build 080725)
VM: Java HotSpot(TM) Client VM, 11.0-b12, Java(TM) SE Runtime Environment, 1.6.0_10-beta-b25
OS: Windows Vista, 6.0, x86

User Comments: 
Trying to execute single line SQL Statement

Stacktrace: 
com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '1' for key 'PRIMARY'
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(NativeConstructorAccessorImpl.java:0)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
        at com.mysql.jdbc.Util.getInstance(Util.java:381)
Comment 1 sunbiz 2008-07-27 02:08:18 UTC
Build: NetBeans IDE Dev (Build 080725)
VM: Java HotSpot(TM) Client VM, 11.0-b12, Java(TM) SE Runtime Environment, 1.6.0_10-beta-b25
OS: Windows Vista, 6.0, x86

User Comments: 
Add duplicate entry into table's primary key using the Insert Record GUI

Stacktrace: 
org.netbeans.modules.db.dataview.meta.DBException: Error code 1062, SQL state 23000Insert Commandfailed:Duplicate entry 'sunbiz' for key 'PRIMARY' -- com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry 'sunbiz' for key 'PRIMARY'
        at org.netbeans.modules.db.dataview.output.SQLStatementExecutor.commitOrRollback(SQLStatementExecutor.java:139)
        at org.netbeans.modules.db.dataview.output.SQLExecutionHelper$1.finished(SQLExecutionHelper.java:163)
        at org.netbeans.modules.db.dataview.output.SQLStatementExecutor.run(SQLStatementExecutor.java:107)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)
        at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)
Comment 2 sunbiz 2008-07-27 02:08:28 UTC
Created attachment 65735 [details]
stacktrace
Comment 3 _ ahimanikya 2008-07-30 10:06:18 UTC
http://hg.netbeans.org/main/rev/8f298b66e8f1
Comment 4 Roman Mostyka 2008-07-30 17:14:36 UTC
sunbiz, can You check the fix?