ERROR MediaScannerService Failed to scan media library.

General discussions.

Moderator: moderators

ERROR MediaScannerService Failed to scan media library.

Postby seth.feinberg » Sun Oct 14, 2012 2:17 am

My subsonic installation is spit out "ERROR MediaScannerService Failed to scan media library." in the middle of scanning my Media Folder. It got through about 100 of the 240gb of Music in my Music folder. Now if I try to "Scan media folders now" under settings I get "ERROR MediaScannerService Failed to scan media library." immediately.

I'm have this installed on a Synology NAS and found the following in the log:


Code: Select all
[2012-10-13 23:05:00,013] ERROR MediaScannerService - Failed to scan media library.                                                                                                                                                     
org.springframework.dao.TransientDataAccessResourceException: PreparedStatementCallback; SQL [insert into media_file (id, path, folder, type, override, format, title, album, album_name, artist, album_artist, disc_number, track_number
        at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:106)                                                                                                         
        at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)                                                                                             
        at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)                                                                                             
        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:71)                                                                                                                                                         
        at net.sourceforge.subsonic.dao.MediaFileDao.createOrUpdateMediaFile(MediaFileDao.java:153)                                                                                                                                     
        at net.sourceforge.subsonic.service.MediaFileService.updateChildren(MediaFileService.java:375)                                                                                                                                   
        at net.sourceforge.subsonic.service.MediaFileService.getChildrenOf(MediaFileService.java:220)                                                                                                                                   
        at net.sourceforge.subsonic.service.MediaScannerService.scanFile(MediaScannerService.java:216)                                                                                                                                   
        at net.sourceforge.subsonic.service.MediaScannerService.scanFile(MediaScannerService.java:220)                                                                                                                                   
        at net.sourceforge.subsonic.service.MediaScannerService.doScanLibrary(MediaScannerService.java:171)                                                                                                                             
        at net.sourceforge.subsonic.service.MediaScannerService.access$000(MediaScannerService.java:48)                                                                                                                                 
        at net.sourceforge.subsonic.service.MediaScannerService$2.run(MediaScannerService.java:147)                                                                                                                                     
Caused by: java.sql.SQLException: S1000 General error java.lang.NullPointerException in statement [insert into media_file (id, path, folder, type, override, format, title, album, album_name, artist, album_artist, disc_number, track_n
        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           


Any help would be GREATLY appreciated.
seth.feinberg
 
Posts: 15
Joined: Mon Jul 30, 2012 5:42 pm

Re: ERROR MediaScannerService Failed to scan media library.

Postby hakko » Sun Oct 14, 2012 7:00 am

The reason is Sindre's choice of database, HSQLDB 1.8.0.7. It has a couple of known bugs, like intermittent NullPointerExceptions just as the one you see.

All of you running this database for media storage run the risk of getting this without previous warnings.

The best solution I can think of for Subsonic 4.7 users is to read this guide: viewtopic.php?f=6&t=10338. Move your db folder to somewhere else, start anew fresh and then import your previous settings.
MusicCabinet developer
hakko
 
Posts: 1416
Joined: Tue Apr 17, 2012 7:05 pm
Location: Sweden

Re: ERROR MediaScannerService Failed to scan media library.

Postby seth.feinberg » Mon Oct 15, 2012 2:16 pm

@hakko,

Thanks so much for the response but I'm a little confused. I HAVE been starting anew and I'm not overly concerned with importing any settings, seeing as this is literally a completely fresh install. The post you linked to seems super useful, but mostly focused on recovering some settings after a fresh install. I'm fully prepared, and even want, to start with a fresh install of subsonic, but I just can't get it to scan my entire music folder. It stalls about 100gb in and doesn't seem to go any further even if I click "scan media folders now" again after it stalls the first time. Perhaps I'm missing something and you're suggestions can still be attempted to get it to finish, perhaps a clarification would help me better understand.
seth.feinberg
 
Posts: 15
Joined: Mon Jul 30, 2012 5:42 pm

Re: ERROR MediaScannerService Failed to scan media library.

Postby hakko » Mon Oct 15, 2012 2:56 pm

I'm sorry, but if the error persists on subsequent scans, I can't really think of any fail-safe way to get the default 4.7 to work (you have removed all traces of your previous installation, including the db directory, right?).

Subsonic is (as always with computer programs) as weak as the weakest link in the chain of components it consists of. A quick google search for your error message (http://www.google.se/search?q=S1000+Gen ... +statement) shows that you're clearly not the first person to run into this error. The solution I would propose is either "well don't use HSQLDB" or at least "well don't use a version released 2006.09.27 which has since been patched for a lot of bugs".

The database shipped with Subsonic 4.7 is about as old as Internet Exporer 6 or Firefox 2.0...
MusicCabinet developer
hakko
 
Posts: 1416
Joined: Tue Apr 17, 2012 7:05 pm
Location: Sweden

Re: ERROR MediaScannerService Failed to scan media library.

Postby seth.feinberg » Mon Oct 15, 2012 4:05 pm

I'm attempting to install it on my Synology NAS and the Linux file hierarchy isn't overly familiar to me, but I'm pretty sure I've removed all subsonic files in between installations (used rm -r /volume1/@appstore/Subsonic). However the current install is actually the Mashup Mod, not 4.7 (but I've done all the steps multiple times with both installations). I'm pretty sure it was also happening with the regular 4.7 install, but can't be sure since the regular 4.7 install doesn't have a Library summary on the left hand side, so its possible I simply wasn't aware it had stalled 40% of the way through. I'm gonna give it another shot tonight. Thanks for your help so far...
seth.feinberg
 
Posts: 15
Joined: Mon Jul 30, 2012 5:42 pm


Return to General

Who is online

Users browsing this forum: No registered users and 7 guests