by watzupdok » Sun Sep 01, 2019 9:56 pm
Just in case somebody can help me with this problem, here are the lines of the log file when the error occurs.
[2019-09-01 17:37:50,652] INFO MediaScannerService - Scanned media library with 70250 entries.
[2019-09-01 17:37:51,264] ERROR MediaScannerService - Failed to scan media library.
org.springframework.dao.DataIntegrityViolationException: PreparedStatementCallback; SQL [insert into media_file (id, path, folder, type, format, title, album, artist, album_artist, disc_number, track_number, year, genre, bit_rate, variable_bit_rate, duration_seconds, file_size, width, height, cover_art_path, parent_path, play_count, last_played, comment, created, changed, last_scanned, children_last_updated, present, version) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]; Violation of unique constraint $$: duplicate value(s) for column(s) $$: SYS_PK_128 in statement [insert into media_file (id, path, folder, type, format, title, album, artist, album_artist, disc_number, track_number, year, genre, bit_rate, variable_bit_rate, duration_seconds, file_size, width, height, cover_art_path, parent_path, play_count, last_played, comment, created, changed, last_scanned, children_last_updated, present, version) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]; nested exception is java.sql.SQLException: Violation of unique constraint $$: duplicate value(s) for column(s) $$: SYS_PK_128 in statement [insert into media_file (id, path, folder, type, format, title, album, artist, album_artist, disc_number, track_number, year, genre, bit_rate, variable_bit_rate, duration_seconds, file_size, width, height, cover_art_path, parent_path, play_count, last_played, comment, created, changed, last_scanned, children_last_updated, present, version) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]
at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:100)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:607)
at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:792)
at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:850)
at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:858)
at net.sourceforge.subsonic.dao.AbstractDao.update(AbstractDao.java:68)
at net.sourceforge.subsonic.dao.MediaFileDao.createOrUpdateMediaFile(MediaFileDao.java:165)
at net.sourceforge.subsonic.service.MediaFileService.updateChildren(MediaFileService.java:385)
at net.sourceforge.subsonic.service.MediaFileService.getChildrenOf(MediaFileService.java:183)
at net.sourceforge.subsonic.service.MediaScannerService.scanFile(MediaScannerService.java:219)
at net.sourceforge.subsonic.service.MediaScannerService.scanFile(MediaScannerService.java:223)
at net.sourceforge.subsonic.service.MediaScannerService.doScanLibrary(MediaScannerService.java:161)
at net.sourceforge.subsonic.service.MediaScannerService.access$000(MediaScannerService.java:31)
at net.sourceforge.subsonic.service.MediaScannerService$2.run(MediaScannerService.java:130)
Caused by: java.sql.SQLException: Violation of unique constraint $$: duplicate value(s) for column(s) $$: SYS_PK_128 in statement [insert into media_file (id, path, folder, type, format, title, album, artist, album_artist, disc_number, track_number, year, genre, bit_rate, variable_bit_rate, duration_seconds, file_size, width, height, cover_art_path, parent_path, play_count, last_played, comment, created, changed, last_scanned, children_last_updated, present, version) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]
at org.hsqldb.jdbc.Util.throwError(Unknown Source)
at org.hsqldb.jdbc.jdbcPreparedStatement.executeUpdate(Unknown Source)
at org.springframework.jdbc.core.JdbcTemplate$2.doInPreparedStatement(JdbcTemplate.java:798)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:591)
... 12 more
Thanks!