javax.script.ScriptException: javax.script.ScriptException: com.orientechnologies.orient.core.storage.ORecordDuplicatedException: Cannot index record repository_blobstore{name:test6,type:File,attributes:[1]}: found duplicated key 'test6' in index 'repository_blobstore_name_idx' previously assigned to the record #20:6 RID=#20:6

Sonatype JIRA | Joe Tom | 9 months ago
  1. 0

    While testing the new provisioning API, I created a blobstore for a second time in a test to make sure updates could not be made. Script was: {code} blobStore.createFileBlobStore('test6','/Users/jtom/Documents/Work/temp') {code} The second time I ran this it gave the below error. In addition to this, I noticed that the location I gave /Users/jtom/Documents/Work/temp was deleted (folder and contents). The error didn't concern me as much as the deletion, which caused a bunch of test/temp data to be removed. In a real world scenario, it seems possible to accidentially delete your entire blobstore this way. This occurs if you do this from the UI as well as if you do this from the provisioning script. In the event you do this, you also see an error on the screen. I did not include this below but can if you like. I did not check this in older versions of NX3. Blobstores did not exist in NX2 so there's no check there. Note, you MUST use the same name and location. If you use a distinct name, no deletion/error occurs. Please be very careful reproing/testing this and make sure you don't care about the contents of whatever path you use. Luckily I didn't do /Users/jtom/ or something more broad spanning. Scary stuff. {quote} 2016-02-23 13:04:56,246-0500 ERROR [Karaf local console user karaf] org.apache.karaf.shell.support.ShellUtil - Exception caught while executing command javax.script.ScriptException: javax.script.ScriptException: com.orientechnologies.orient.core.storage.ORecordDuplicatedException: Cannot index record repository_blobstore{name:test6,type:File,attributes:[1]}: found duplicated key 'test6' in index 'repository_blobstore_name_idx' previously assigned to the record #20:6 RID=#20:6 at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:130) [na:na] at org.sonatype.nexus.internal.script.ScriptServiceImpl.eval(ScriptServiceImpl.java:153) [na:na] at org.sonatype.nexus.common.script.ScriptService$eval$1.call(Unknown Source) [na:na] at org.sonatype.nexus.internal.script.ScriptAction.execute(ScriptAction.groovy:119) [na:na] at org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:83) [na:na] at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:67) [na:na] at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:87) [na:na] at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:480) [na:na] at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:406) [na:na] at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108) [na:na] at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:182) [na:na] at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:119) [na:na] at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:94) [na:na] at org.apache.karaf.shell.impl.console.ConsoleSessionImpl.run(ConsoleSessionImpl.java:270) [na:na] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_40] Caused by: javax.script.ScriptException: com.orientechnologies.orient.core.storage.ORecordDuplicatedException: Cannot index record repository_blobstore{name:test6,type:File,attributes:[1]}: found duplicated key 'test6' in index 'repository_blobstore_name_idx' previously assigned to the record #20:6 RID=#20:6 at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:326) [na:na] at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:124) [na:na] ... 14 common frames omitted Caused by: com.orientechnologies.orient.core.storage.ORecordDuplicatedException: Cannot index record repository_blobstore{name:test6,type:File,attributes:[1]}: found duplicated key 'test6' in index 'repository_blobstore_name_idx' previously assigned to the record #20:6 at com.orientechnologies.orient.core.index.OIndexTxAwareOneValue.checkEntry(OIndexTxAwareOneValue.java:224) [na:na] at com.orientechnologies.orient.core.index.OClassIndexManager.checkIndexedPropertiesOnCreation(OClassIndexManager.java:341) [na:na] at com.orientechnologies.orient.core.index.OClassIndexManager.checkIndexes(OClassIndexManager.java:592) [na:na] at com.orientechnologies.orient.core.index.OClassIndexManager.onRecordBeforeCreate(OClassIndexManager.java:410) [na:na] at com.orientechnologies.orient.core.hook.ODocumentHookAbstract.onTrigger(ODocumentHookAbstract.java:226) [na:na] at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.callbackHooks(ODatabaseDocumentTx.java:1069) [na:na] at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.executeSaveRecord(ODatabaseDocumentTx.java:1966) [na:na] at com.orientechnologies.orient.core.tx.OTransactionNoTx.saveRecord(OTransactionNoTx.java:159) [na:na] at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.save(ODatabaseDocumentTx.java:2568) [na:na] at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.save(ODatabaseDocumentTx.java:121) [na:na] at com.orientechnologies.orient.core.record.impl.ODocument.save(ODocument.java:1768) [na:na] at com.orientechnologies.orient.core.record.impl.ODocument.save(ODocument.java:1759) [na:na] at org.sonatype.nexus.orient.entity.EntityAdapter.writeEntity(EntityAdapter.java:187) [na:na] at org.sonatype.nexus.orient.entity.EntityAdapter.addEntity(EntityAdapter.java:215) [na:na] at org.sonatype.nexus.internal.blobstore.BlobStoreConfigurationStoreImpl.create(BlobStoreConfigurationStoreImpl.java:82) [na:na] at org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39) [na:na] at org.sonatype.nexus.common.stateguard.StateGuard$GuardImpl.run(StateGuard.java:270) [na:na] at org.sonatype.nexus.common.stateguard.GuardedInterceptor.invoke(GuardedInterceptor.java:53) [na:na] at org.sonatype.nexus.internal.blobstore.BlobStoreManagerImpl.create(BlobStoreManagerImpl.java:139) [na:na] at org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39) [na:na] at org.sonatype.nexus.common.stateguard.StateGuard$GuardImpl.run(StateGuard.java:270) [na:na] at org.sonatype.nexus.common.stateguard.GuardedInterceptor.invoke(GuardedInterceptor.java:53) [na:na] at org.sonatype.nexus.blobstore.api.BlobStoreManager$create$6.call(Unknown Source) [na:na] at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) [na:na] at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) [na:na] at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125) [na:na] at org.sonatype.nexus.internal.provisioning.BlobStoreApiImpl.createFileBlobStore(BlobStoreApiImpl.groovy:40) [na:na] at org.sonatype.nexus.BlobStoreApi$createFileBlobStore.call(Unknown Source) [na:na] at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) [na:na] at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) [na:na] at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:133) [na:na] at Script34.run(Script34.groovy:10) [na:na] at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:323) [na:na] ... 15 common frames omitted {color:red}Error executing command: javax.script.ScriptException: com.orientechnologies.orient.core.storage.ORecordDuplicatedException: Cannot index record repository_blobstore{name:test6,type:File,attributes:[1]}: found duplicated key 'test6' in index 'repository_blobstore_name_idx' previously assigned to the record #20:6 RID=#20:6{color} {quote}

    Sonatype JIRA | 9 months ago | Joe Tom
    javax.script.ScriptException: javax.script.ScriptException: com.orientechnologies.orient.core.storage.ORecordDuplicatedException: Cannot index record repository_blobstore{name:test6,type:File,attributes:[1]}: found duplicated key 'test6' in index 'repository_blobstore_name_idx' previously assigned to the record #20:6 RID=#20:6
  2. 0

    GitHub comment 10#58617828

    GitHub | 2 years ago | NathanielMichael
    com.orientechnologies.orient.etl.OETLProcessHaltedException: com.orientechnologies.orient.core.storage.ORecordDuplicatedException: Cannot index record #11:491: found duplicated key 'Charlie Hunnam' in index 'Interest.interest_name' previously assigned to the record #11:490 RID=#11:490
  3. 0

    ETL duplicate key error:

    GitHub | 1 year ago | lambdapilgrim
    com.orientechnologies.orient.etl.OETLProcessHaltedException: Halt
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    ORecordDuplicatedException upon new record after cluster has been truncated but index still has it

    GitHub | 12 months ago | mecp
    com.orientechnologies.orient.core.storage.ORecordDuplicatedException: Cannot index record Some_Class{xxxxx}: found duplicated key 'xxxxx' in index 'some_key' previously assigned to the record #28:0 RID=#28:0
  6. 0

    ORecordDuplicateException for non-duplicate record

    GitHub | 7 months ago | nsitanurag
    com.orientechnologies.orient.core.storage.ORecordDuplicatedException: Cannot index record contact_info#17:9387{phoneNumber:`*141*10`,lastname:loan,firstname:Air tel,spamScore:0.0,circle:null,fullname:Airtel loan,city:null,in_contact_link:[#38:9373]} v1: found duplicated key '`*141*10`' in index 'contact_info.phoneNumber ' previously assigned to the record #24:117 RID=#24:117

    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. com.orientechnologies.orient.core.storage.ORecordDuplicatedException

      Cannot index record repository_blobstore{name:test6,type:File,attributes:[1]}: found duplicated key 'test6' in index 'repository_blobstore_name_idx' previously assigned to the record #20:6

      at com.orientechnologies.orient.core.index.OIndexTxAwareOneValue.checkEntry()
    2. OrientDB Core
      ODocument.save
      1. com.orientechnologies.orient.core.index.OIndexTxAwareOneValue.checkEntry(OIndexTxAwareOneValue.java:224)[na:na]
      2. com.orientechnologies.orient.core.index.OClassIndexManager.checkIndexedPropertiesOnCreation(OClassIndexManager.java:341)[na:na]
      3. com.orientechnologies.orient.core.index.OClassIndexManager.checkIndexes(OClassIndexManager.java:592)[na:na]
      4. com.orientechnologies.orient.core.index.OClassIndexManager.onRecordBeforeCreate(OClassIndexManager.java:410)[na:na]
      5. com.orientechnologies.orient.core.hook.ODocumentHookAbstract.onTrigger(ODocumentHookAbstract.java:226)[na:na]
      6. com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.callbackHooks(ODatabaseDocumentTx.java:1069)[na:na]
      7. com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.executeSaveRecord(ODatabaseDocumentTx.java:1966)[na:na]
      8. com.orientechnologies.orient.core.tx.OTransactionNoTx.saveRecord(OTransactionNoTx.java:159)[na:na]
      9. com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.save(ODatabaseDocumentTx.java:2568)[na:na]
      10. com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.save(ODatabaseDocumentTx.java:121)[na:na]
      11. com.orientechnologies.orient.core.record.impl.ODocument.save(ODocument.java:1768)[na:na]
      12. com.orientechnologies.orient.core.record.impl.ODocument.save(ODocument.java:1759)[na:na]
      12 frames
    3. org.sonatype.nexus
      BlobStoreManager$create$6.call
      1. org.sonatype.nexus.orient.entity.EntityAdapter.writeEntity(EntityAdapter.java:187)[na:na]
      2. org.sonatype.nexus.orient.entity.EntityAdapter.addEntity(EntityAdapter.java:215)[na:na]
      3. org.sonatype.nexus.internal.blobstore.BlobStoreConfigurationStoreImpl.create(BlobStoreConfigurationStoreImpl.java:82)[na:na]
      4. org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39)[na:na]
      5. org.sonatype.nexus.common.stateguard.StateGuard$GuardImpl.run(StateGuard.java:270)[na:na]
      6. org.sonatype.nexus.common.stateguard.GuardedInterceptor.invoke(GuardedInterceptor.java:53)[na:na]
      7. org.sonatype.nexus.internal.blobstore.BlobStoreManagerImpl.create(BlobStoreManagerImpl.java:139)[na:na]
      8. org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39)[na:na]
      9. org.sonatype.nexus.common.stateguard.StateGuard$GuardImpl.run(StateGuard.java:270)[na:na]
      10. org.sonatype.nexus.common.stateguard.GuardedInterceptor.invoke(GuardedInterceptor.java:53)[na:na]
      11. org.sonatype.nexus.blobstore.api.BlobStoreManager$create$6.call(Unknown Source)[na:na]
      11 frames
    4. Groovy
      AbstractCallSite.call
      1. org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)[na:na]
      2. org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)[na:na]
      3. org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)[na:na]
      3 frames
    5. org.sonatype.nexus
      BlobStoreApiImpl.createFileBlobStore
      1. org.sonatype.nexus.internal.provisioning.BlobStoreApiImpl.createFileBlobStore(BlobStoreApiImpl.groovy:40)[na:na]
      1 frame
    6. ${project.groupId}:${project.artifactId}
      BlobStoreApi$createFileBlobStore.call
      1. org.sonatype.nexus.BlobStoreApi$createFileBlobStore.call(Unknown Source)[na:na]
      1 frame
    7. Groovy
      AbstractCallSite.call
      1. org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)[na:na]
      2. org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)[na:na]
      3. org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:133)[na:na]
      3 frames
    8. Unknown
      Script34.run
      1. Script34.run(Script34.groovy:10)[na:na]
      1 frame
    9. Groovy
      GroovyScriptEngineImpl.eval
      1. org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:323)[na:na]
      2. org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:124)[na:na]
      2 frames
    10. org.sonatype.nexus
      ScriptAction.execute
      1. org.sonatype.nexus.internal.script.ScriptServiceImpl.eval(ScriptServiceImpl.java:153)[na:na]
      2. org.sonatype.nexus.common.script.ScriptService$eval$1.call(Unknown Source)[na:na]
      3. org.sonatype.nexus.internal.script.ScriptAction.execute(ScriptAction.groovy:119)[na:na]
      3 frames
    11. org.apache.karaf
      SecuredCommand.execute
      1. org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:83)[na:na]
      2. org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:67)[na:na]
      3. org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:87)[na:na]
      3 frames
    12. Apache Felix Gogo Runtime
      CommandSessionImpl.execute
      1. org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:480)[na:na]
      2. org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:406)[na:na]
      3. org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[na:na]
      4. org.apache.felix.gogo.runtime.Closure.execute(Closure.java:182)[na:na]
      5. org.apache.felix.gogo.runtime.Closure.execute(Closure.java:119)[na:na]
      6. org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:94)[na:na]
      6 frames
    13. org.apache.karaf
      ConsoleSessionImpl.run
      1. org.apache.karaf.shell.impl.console.ConsoleSessionImpl.run(ConsoleSessionImpl.java:270)[na:na]
      1 frame
    14. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:745)[na:1.8.0_40]
      1 frame