Serviio cannot add videofiles with a comma in the name

Issue #395 invalid
Former user created an issue

I tried to add a file with a comma > , < in the name, but got an exception from the database. After renaming the file, it was added without problems. Extract from the log is included.

2011-08-29 09:47:17,794 WARN [LibraryAdditionsCheckerThread] Cannot add file S01E16 - Der Mann, der nicht fliehen wollte.mkv because of an unexpected error. Message: Cannot add Person with name Unknown to media item 2346 org.serviio.db.dao.PersistenceException: Cannot add Person with name Unknown to media item 2346 at org.serviio.library.dao.PersonDAOImpl.addPersonToMedia(PersonDAOImpl.java:134) at org.serviio.library.service.VideoService.addVideoToLibrary(VideoService.java:115) at org.serviio.library.metadata.LibraryAdditionsCheckerThread.searchForNewFiles(LibraryAdditionsCheckerThread.java:152) at org.serviio.library.metadata.LibraryAdditionsCheckerThread.searchForNewFiles(LibraryAdditionsCheckerThread.java:123) at org.serviio.library.metadata.LibraryAdditionsCheckerThread.searchForNewFiles(LibraryAdditionsCheckerThread.java:123) at org.serviio.library.metadata.LibraryAdditionsCheckerThread.run(LibraryAdditionsCheckerThread.java:73) Caused by: java.sql.SQLTransactionRollbackException: A lock could not be obtained due to a deadlock, cycle of locks and waiters is: Lock : TABLE, MEDIA_ITEM, Tablelock Waiting XID : {11399942, IS} , APP, INSERT INTO person_role (ROLE_TYPE, PERSON_ID, MEDIA_ITEM_ID) VALUES (?,?,?) Granted XID : {11399943, X} Lock : TABLE, PERSON_ROLE, Tablelock Waiting XID : {11399943, X} , APP, DELETE FROM cover_image WHERE id = ? Granted XID : {11399942, IX} . The selected victim is XID : 11399942. 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) at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source) at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source) at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown Source) at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeUpdate(Unknown Source) at org.serviio.library.dao.PersonDAOImpl.addPersonToMedia(PersonDAOImpl.java:128) ... 5 more Caused by: java.sql.SQLException: A lock could not be obtained due to a deadlock, cycle of locks and waiters is: Lock : TABLE, MEDIA_ITEM, Tablelock Waiting XID : {11399942, IS} , APP, INSERT INTO person_role (ROLE_TYPE, PERSON_ID, MEDIA_ITEM_ID) VALUES (?,?,?) Granted XID : {11399943, X} Lock : TABLE, PERSON_ROLE, Tablelock Waiting XID : {11399943, X} , APP, DELETE FROM cover_image WHERE id = ? Granted XID : {11399942, IX} . The selected victim is XID : 11399942. at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source) at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source) ... 15 more Caused by: ERROR 40001: A lock could not be obtained due to a deadlock, cycle of locks and waiters is: Lock : TABLE, MEDIA_ITEM, Tablelock Waiting XID : {11399942, IS} , APP, INSERT INTO person_role (ROLE_TYPE, PERSON_ID, MEDIA_ITEM_ID) VALUES (?,?,?) Granted XID : {11399943, X} Lock : TABLE, PERSON_ROLE, Tablelock Waiting XID : {11399943, X} , APP, DELETE FROM cover_image WHERE id = ? Granted XID : {11399942, IX} . The selected victim is XID : 11399942. at org.apache.derby.iapi.error.StandardException.newException(Unknown Source) at org.apache.derby.impl.services.locks.Deadlock.buildException(Unknown Source) at org.apache.derby.impl.services.locks.ConcurrentLockSet.lockObject(Unknown Source) at org.apache.derby.impl.services.locks.AbstractPool.lockObject(Unknown Source) at org.apache.derby.impl.services.locks.ConcurrentPool.lockObject(Unknown Source) at org.apache.derby.impl.store.raw.xact.RowLocking2.lockContainer(Unknown Source) at org.apache.derby.impl.store.raw.data.BaseContainerHandle.useContainer(Unknown Source) at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.openContainer(Unknown Source) at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.openContainer(Unknown Source) at org.apache.derby.impl.store.raw.xact.Xact.openContainer(Unknown Source) at org.apache.derby.impl.store.access.conglomerate.OpenConglomerate.init(Unknown Source) at org.apache.derby.impl.store.access.heap.Heap.open(Unknown Source) at org.apache.derby.impl.store.access.RAMTransaction.openConglomerate(Unknown Source) at org.apache.derby.impl.store.access.RAMTransaction.openCompiledConglomerate(Unknown Source) at org.apache.derby.impl.store.access.btree.index.B2IForwardScan.init(Unknown Source) at org.apache.derby.impl.store.access.btree.index.B2I.openScan(Unknown Source) at org.apache.derby.impl.store.access.RAMTransaction.openScan(Unknown Source) at org.apache.derby.impl.store.access.RAMTransaction.openCompiledScan(Unknown Source) at org.apache.derby.impl.sql.execute.GenericRIChecker.getScanController(Unknown Source) at org.apache.derby.impl.sql.execute.ForeignKeyRIChecker.doCheck(Unknown Source) at org.apache.derby.impl.sql.execute.GenericRIChecker.doCheck(Unknown Source) at org.apache.derby.impl.sql.execute.RISetChecker.doFKCheck(Unknown Source) at org.apache.derby.impl.sql.execute.InsertResultSet.normalInsertCore(Unknown Source) at org.apache.derby.impl.sql.execute.InsertResultSet.open(Unknown Source) at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source) at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source) ... 9 more


Renamed the file to the same name without the comma

2011-08-29 10:00:49,440 INFO [LibraryAdditionsCheckerThread] Added file 'S01E16 - Der Mann der nicht fliehen wollte.mkv' (title: Der Mann, der nicht fliehen wollte) to Library

The title came from a .nfo-File:

--- including nfo --- <?xml version="1.0" encoding="UTF-8"?> <episodedetails> <title>Der Mann, der nicht fliehen wollte</title> <season>1</season> <episode>16</episode> <genre>Krimi</genre> </episodedetails> --- end of include ---

Comments (1)

  1. Petr Nejedly repo owner

    this is a DB deadlock which was caused by something else. I bet if you rename the file back to include the coma it'll work.

  2. Log in to comment