java.sql.SQLIntegrityConstraintViolationException: The statement was aborted because it would have caused a duplicate key value in a unique or primary key constraint or unique index identified by 'DEFAULT_PROP_IDX' defined on 'DEFAULT_PROP'.

JFrog JIRA | Clive Jevons | 8 years ago
  1. 0

    We're building some pretty big EARs and deploying them nightly to our Artifactory server. Once an EAR gets bigger than 50MB it won't deploy any more. At first I though this was a Jetty issue, as I was getting an HTTP code 413, so I configured Jetty to accept requests up to 100MB (roughly) following a tip from someone on their mailing list: -Dorg.mortbay.jetty.Request.maxFormContentSize=100000000 Upon inspecting the artifactoy log file, I found this, which *roughly* matches the time the deployment should be occurring: 2008-06-09 19:32:23,562 [ERROR] (RepoFilter.java:151{10}) - Upload request failed java.io.IOException: Es steht nicht genug Speicherplatz auf dem Datentr?ger zur Verf?gung at java.io.FileOutputStream.writeBytes(Native Method) at java.io.FileOutputStream.write(FileOutputStream.java:260) at org.apache.jackrabbit.core.value.BLOBFileValue.<init>(BLOBFileValue.java:152) at org.apache.jackrabbit.core.value.BLOBFileValue.<init>(BLOBFileValue.java:121) at org.apache.jackrabbit.core.value.InternalValue.create(InternalValue.java:197) at org.apache.jackrabbit.core.PropertyImpl.setValue(PropertyImpl.java:753) at org.apache.jackrabbit.core.NodeImpl.setProperty(NodeImpl.java:2340) at org.artifactory.jcr.JcrHelper.importStream(JcrHelper.java:338) at org.artifactory.repo.JcrRepo$8.doInJcr(JcrRepo.java:406) Which is followed shortly after by this: 2008-06-09 19:32:39,640 [ERROR] (MultiIndex.java:1057{10}) - Unable to commit volatile index java.io.IOException: Unable to create directory: C:\Program Files\artifactory-1.2.5\bin\..\data\jcr\workspaces\default\index\_j9f at org.apache.jackrabbit.core.query.lucene.MultiIndex.newIndexFolder(MultiIndex.java:1020) at org.apache.jackrabbit.core.query.lucene.MultiIndex.getOrCreateIndex(MultiIndex.java:524) at org.apache.jackrabbit.core.query.lucene.MultiIndex$CreateIndex.execute(MultiIndex.java:1575) ... the disk in question has about 15GB left and the file I'm trying to upload is just over 50MB, so all should be well. I'm also seeing some other exceptions in the log, but I'm thinking they're unrelated; I've included them here because maybe I'm mistaken and they are relevant ;) 2008-06-10 01:20:49,890 [ERROR] (DatabasePersistenceManager.java:472{10}) - failed to write property state: 25fd6399-bb8a-4cc7-be2d-3646668c5dc8/{http://www.jcp.org/jcr/1.0}data java.sql.SQLIntegrityConstraintViolationException: The statement was aborted because it would have caused a duplicate key value in a unique or primary key constraint or unique index identified by 'DEFAULT_PROP_IDX' defined on 'DEFAULT_PROP'. at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source) at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source) at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)

    JFrog JIRA | 8 years ago | Clive Jevons
    java.sql.SQLIntegrityConstraintViolationException: The statement was aborted because it would have caused a duplicate key value in a unique or primary key constraint or unique index identified by 'DEFAULT_PROP_IDX' defined on 'DEFAULT_PROP'.
  2. 0

    We're building some pretty big EARs and deploying them nightly to our Artifactory server. Once an EAR gets bigger than 50MB it won't deploy any more. At first I though this was a Jetty issue, as I was getting an HTTP code 413, so I configured Jetty to accept requests up to 100MB (roughly) following a tip from someone on their mailing list: -Dorg.mortbay.jetty.Request.maxFormContentSize=100000000 Upon inspecting the artifactoy log file, I found this, which *roughly* matches the time the deployment should be occurring: 2008-06-09 19:32:23,562 [ERROR] (RepoFilter.java:151{10}) - Upload request failed java.io.IOException: Es steht nicht genug Speicherplatz auf dem Datentr?ger zur Verf?gung at java.io.FileOutputStream.writeBytes(Native Method) at java.io.FileOutputStream.write(FileOutputStream.java:260) at org.apache.jackrabbit.core.value.BLOBFileValue.<init>(BLOBFileValue.java:152) at org.apache.jackrabbit.core.value.BLOBFileValue.<init>(BLOBFileValue.java:121) at org.apache.jackrabbit.core.value.InternalValue.create(InternalValue.java:197) at org.apache.jackrabbit.core.PropertyImpl.setValue(PropertyImpl.java:753) at org.apache.jackrabbit.core.NodeImpl.setProperty(NodeImpl.java:2340) at org.artifactory.jcr.JcrHelper.importStream(JcrHelper.java:338) at org.artifactory.repo.JcrRepo$8.doInJcr(JcrRepo.java:406) Which is followed shortly after by this: 2008-06-09 19:32:39,640 [ERROR] (MultiIndex.java:1057{10}) - Unable to commit volatile index java.io.IOException: Unable to create directory: C:\Program Files\artifactory-1.2.5\bin\..\data\jcr\workspaces\default\index\_j9f at org.apache.jackrabbit.core.query.lucene.MultiIndex.newIndexFolder(MultiIndex.java:1020) at org.apache.jackrabbit.core.query.lucene.MultiIndex.getOrCreateIndex(MultiIndex.java:524) at org.apache.jackrabbit.core.query.lucene.MultiIndex$CreateIndex.execute(MultiIndex.java:1575) ... the disk in question has about 15GB left and the file I'm trying to upload is just over 50MB, so all should be well. I'm also seeing some other exceptions in the log, but I'm thinking they're unrelated; I've included them here because maybe I'm mistaken and they are relevant ;) 2008-06-10 01:20:49,890 [ERROR] (DatabasePersistenceManager.java:472{10}) - failed to write property state: 25fd6399-bb8a-4cc7-be2d-3646668c5dc8/{http://www.jcp.org/jcr/1.0}data java.sql.SQLIntegrityConstraintViolationException: The statement was aborted because it would have caused a duplicate key value in a unique or primary key constraint or unique index identified by 'DEFAULT_PROP_IDX' defined on 'DEFAULT_PROP'. at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source) at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source) at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)

    JFrog JIRA | 8 years ago | Clive Jevons
    java.sql.SQLIntegrityConstraintViolationException: The statement was aborted because it would have caused a duplicate key value in a unique or primary key constraint or unique index identified by 'DEFAULT_PROP_IDX' defined on 'DEFAULT_PROP'.
  3. 0

    In italy we have names with single quote in patient names like " ' ": d'onofrio, d'avellano,d'allonzo ..... The error I receive is: Aug 11, 2010 10:50:06 AM in.raster.mayam.util.database.DatabaseHandler insertPatientData SEVERE: null java.sql.SQLSyntaxErrorException: Syntax error: Encountered "onofrio" at line 1, column 59. at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source) .......... at java.lang.Thread.run(Thread.java:619) Caused by: java.sql.SQLException: Syntax error: Encountered "onofrio" at line 1, column 59. at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source) at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source) ... 24 more Aug 11, 2010 10:50:06 AM in.raster.mayam.util.database.DatabaseHandler insertStudyData SEVERE: null java.sql.SQLIntegrityConstraintViolationException: INSERT on table 'STUDY' caused a violation of foreign key constraint 'SQL100616050025040' for key (CTPETPI1_CTPET-0074684728). The statement has been rolled back. at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source) at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source) at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source) we need a method to escape the characters in a String to be suitable to pass to an SQL query. If I do (from jdbc docs) : static public String escapeLine(String s) { String retvalue = s; if (s.indexOf ("'") != -1 ) { StringBuffer hold = new StringBuffer(); char c; for(int i=0; i < s.length(); i++ ) { if ((c=s.charAt(i)) == '\'' ) { hold.append ("''"); }else { hold.append(c); } } retvalue = hold.toString(); } return retvalue; } conn.createStatement().execute("insert into " + patientTable + " values('" + escapeLine(dataset.getString(Tag.PatientID)) + "','" +escapeLine( dataset.getString(Tag.PatientName)) + "'," + dat + ",'" + dataset.getString(Tag.PatientSex) + "')"); it works !! Do you know some other method in order to do so ?? (PreparedStatement ??) Or I can Commit this? Paolo

    JIRA | 6 years ago | Paolo Marcheschi
    java.sql.SQLIntegrityConstraintViolationException: INSERT on table 'STUDY' caused a violation of foreign key constraint 'SQL100616050025040' for key (CTPETPI1_CTPET-0074684728). The statement has been rolled back.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    CRAFTERCMS-2126: Uploading images to /static-assets/images/ will throw a DB exception

    GitHub | 1 month ago | russdanner
    java.sql.SQLIntegrityConstraintViolationException: The statement was aborted because it would have caused a duplicate key value in a unique or primary key constraint or unique index identified by 'SQL160822110851171' defined on 'CSTUDIO_OBJECTSTATE'. ; SQL []; The statement was aborted because it would have caused a duplicate key value in a unique or primary key constraint or unique index identified by 'SQL160822110851171' defined on 'CSTUDIO_OBJECTSTATE'.; nested exception is java.sql.SQLIntegrityConstraintViolationException: The statement was aborted because it would have caused a duplicate key value in a unique or primary key constraint or unique index identified by 'SQL160822110851171' defined on 'CSTUDIO_OBJECTSTATE'.
  6. 0

    Re: Derby DB up-to-date?

    manifoldcf-user | 4 years ago | Karl Wright
    java.sql.SQLIntegrityConstraintViolationException: The statement was aborted because it would have caused a duplicate key value in a unique or primary key constraint or unique index identified by 'XXXXXXXX' defined on 'EVENTS'.

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.sql.SQLIntegrityConstraintViolationException

      The statement was aborted because it would have caused a duplicate key value in a unique or primary key constraint or unique index identified by 'DEFAULT_PROP_IDX' defined on 'DEFAULT_PROP'.

      at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException()
    2. Derby
      EmbedConnection.handleException
      1. org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
      2. org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
      3. org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
      4. org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
      5. org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
      5 frames