Duplicate artwork Index, should not occur

Description

19/10/2017 04.54.19:CDT:com.jthink.songkong.analyse.musicbrainz.MusicBrainzUpdateSong:lookupDirectArtworkForRelease:SEVERE: could not execute statement
org.hibernate.exception.ConstraintViolationException: could not execute statement
at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:129)
at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:126)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:112)
at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:211)
at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:62)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3124)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3581)
at org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:104)
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:465)
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:351)
at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:350)
at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:56)
at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1258)
at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:425)
at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.beforeTransactionCommit(JdbcTransaction.java:101)
at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.commit(AbstractTransactionImpl.java:177)
at com.jthink.songkong.db.SongCache.saveNewCoverImage(SongCache.java:656)
at com.jthink.songkong.analyse.musicbrainz.MusicBrainzUpdateSong.lookupDirectArtworkForRelease(MusicBrainzUpdateSong.java:1284)
at com.jthink.songkong.analyse.musicbrainz.MusicBrainzUpdateSong.lookupArtwork(MusicBrainzUpdateSong.java:1384)
at com.jthink.songkong.analyse.musicbrainz.UpdateTrackFromMusicbrainzRelease.updateSongsFromRelease(UpdateTrackFromMusicbrainzRelease.java:51)
at com.jthink.songkong.analyse.analyser.AbstractMusicBrainzGroupMatcher.scoreAndUpdateWithBestMatch(AbstractMusicBrainzGroupMatcher.java:218)
at com.jthink.songkong.analyse.analyser.AbstractMusicBrainzGroupMatcher.matchSongsToRelease(AbstractMusicBrainzGroupMatcher.java:160)
at com.jthink.songkong.analyse.analyser.AbstractMusicBrainzGroupMatcher.matchSongs(AbstractMusicBrainzGroupMatcher.java:89)
at com.jthink.songkong.analyse.analyser.MusicBrainzSongGroupMatcher3.doTask(MusicBrainzSongGroupMatcher3.java:97)
at com.jthink.songkong.analyse.analyser.MusicBrainzSongGroupMatcher.call(MusicBrainzSongGroupMatcher.java:438)
at com.jthink.songkong.analyse.analyser.MusicBrainzSongGroupMatcher3.call(MusicBrainzSongGroupMatcher3.java:120)
at com.jthink.songkong.analyse.analyser.MusicBrainzSongGroupMatcher3.call(MusicBrainzSongGroupMatcher3.java:24)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.h2.jdbc.JdbcSQLException: Unique index or primary key violation: "PRIMARY_KEY_6 ON PUBLIC.COVERIMAGE(DATAKEY)"; SQL statement:
insert into CoverImage (height, imageData, isLinked, mimeType, resizedHeight, resizedImageData, resizedWidth, source, thumbnailData, version, width, dataKey) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [23505-172]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
at org.h2.message.DbException.get(DbException.java:169)
at org.h2.message.DbException.get(DbException.java:146)
at org.h2.index.BaseIndex.getDuplicateKeyException(BaseIndex.java:83)
at org.h2.index.PageBtree.find(PageBtree.java:121)
at org.h2.index.PageBtreeLeaf.addRow(PageBtreeLeaf.java:148)
at org.h2.index.PageBtreeLeaf.addRowTry(PageBtreeLeaf.java:101)
at org.h2.index.PageBtreeNode.addRowTry(PageBtreeNode.java:201)
at org.h2.index.PageBtreeNode.addRowTry(PageBtreeNode.java:201)
at org.h2.index.PageBtreeIndex.addRow(PageBtreeIndex.java:104)
at org.h2.index.PageBtreeIndex.add(PageBtreeIndex.java:95)
at org.h2.index.MultiVersionIndex.add(MultiVersionIndex.java:52)
at org.h2.table.RegularTable.addRow(RegularTable.java:124)
at org.h2.command.dml.Insert.insertRows(Insert.java:126)
at org.h2.command.dml.Insert.update(Insert.java:86)
at org.h2.command.CommandContainer.update(CommandContainer.java:79)
at org.h2.command.Command.executeUpdate(Command.java:235)
at org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:154)
at org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:140)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:147)
at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:208)
... 27 more

Environment

None

Status

Assignee

Unassigned

Reporter

IJabz

Labels

None

Forum Username

Deadhead

os

None

Components

Priority

Major