Page 1 of 1

Java related bug with Subsonic 4.8

PostPosted: Thu Apr 25, 2013 10:31 pm
by pinesol
As soon as I upgraded and restored database from 4.7, entire left hand panel had this error message:

Error
Subsonic encountered an internal error. You can report this error in the Subsonic Forum. Please include the information below.

Exception org.springframework.dao.TransientDataAccessResourceException
Message PreparedStatementCallback; SQL [select 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 from media_file where parent_path=? and present]; out of memory; nested exception is java.sql.SQLException: out of memory
Java version Oracle Corporation 1.7.0_10
Operating system Windows Server 2012 6.2
Server jetty-6.1.x
Memory Used 14 of 57 MB
Stack trace org.springframework.dao.TransientDataAccessResourceException: PreparedStatementCallback; SQL [select 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 from media_file where parent_path=? and present]; out of memory; nested exception is java.sql.SQLException: out of memory
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.query(JdbcTemplate.java:641)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:670)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:678)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:710)
at net.sourceforge.subsonic.dao.AbstractDao.query(AbstractDao.java:83)
at net.sourceforge.subsonic.dao.MediaFileDao.getChildrenOf(MediaFileDao.java:79)
at net.sourceforge.subsonic.service.MediaFileService.getChildrenOf(MediaFileService.java:196)
at net.sourceforge.subsonic.service.MusicIndexService.createSortableArtists(MusicIndexService.java:146)
at net.sourceforge.subsonic.service.MusicIndexService.getIndexedArtists(MusicIndexService.java:61)
at net.sourceforge.subsonic.controller.LeftController.getMusicFolderContent(LeftController.java:220)
at net.sourceforge.subsonic.controller.LeftController.handleRequestInternal(LeftController.java:142)
at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265)
at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:166)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:135)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:81)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:173)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.ui.logout.LogoutFilter.doFilter(LogoutFilter.java:110)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149)
at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at net.sourceforge.subsonic.filter.RequestEncodingFilter.doFilter(RequestEncodingFilter.java:43)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at net.sourceforge.subsonic.filter.ParameterDecodingFilter.doFilter(ParameterDecodingFilter.java:54)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at net.sourceforge.subsonic.filter.BootstrapVerificationFilter.doFilter(BootstrapVerificationFilter.java:54)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:313)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:830)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396)
at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
Caused by: java.sql.SQLException: out of memory
at org.hsqldb.jdbc.Util.throwError(Unknown Source)
at org.hsqldb.jdbc.jdbcPreparedStatement.executeQuery(Unknown Source)
at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:648)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:591)
... 64 more


First thought was that it updated improperly, so I removed c:\subsonic folder, removed Java (I had 1.7.0_21 installed) and installed fresh. First open, everything looked good, so I restored my database once more, and error came back. Even stranger, my mobile still sees all of my media, and can stream it just fine.

For now, I'll reinstall 4.7, but wanted to submit this to see if I can get it fixed somehow.

Thanks,
Michael

Re: Java related bug with Subsonic 4.8

PostPosted: Thu Apr 25, 2013 10:44 pm
by pinesol
Edit. Even after reinstalling 4.7, error persists. Totally stumped now. I've tried several versions of Java and rebooted (of course) just to test.

Re: Java related bug with Subsonic 4.8

PostPosted: Thu Apr 25, 2013 10:56 pm
by transmobius
Just a guess - have you tried increasing the memory available?
http://forum.subsonic.org/forum/viewtopic.php?f=6&t=3939

Re: Java related bug with Subsonic 4.8

PostPosted: Thu Apr 25, 2013 11:19 pm
by pinesol
I did not. Never saw that option, though my error indicates that may have been the problem. For now, I've just created a new database. I still have a backup of the old one that I may try to restore using that. The only real issue with a new database is recreating my 25ish users.

Edit: Good thought. However, even when upping memory limit to 1 GB, same problem when database is restored.

Re: Java related bug with Subsonic 4.8

PostPosted: Fri Apr 26, 2013 2:22 am
by gurutech
This may help with recreating users:

Code: Select all
::::::::::::::::::::::::::::
:: Create Madsonic Acount ::
::::::::::::::::::::::::::::

:: Create Madsonic Useraccounts
:: edit username/password/serverlink to your need
@echo off
set username=admin
set password=(your password)
set serverlink=http://yoursubsonic.subsonic.org

set /p user= "Username: "
set /p userpw= "Password: "
set /p useremail= "E-Mail: "

:::::::::::::::::::::::::::::::::::::::::::::::::

set wgetsettings=--spider --no-check-certificate --cookies=on --keep-session-cookies --save-cookies=%temp%\cookie.txt

.\bin\wget %wgetsettings% --user-agent=Mozilla "%serverlink%/login.view?user=%username%&password=%password%"

:: Create Custom (Prompted)
.\bin\wget %wgetsettings% --load-cookies=%temp%\cookie.txt --referer="%serverlink%" "%serverlink%/rest/createUser.view?u=%username%&p=%password%&v=1.8.0&c=remoteregister&username=%user%&password=%userpw%$&email=%useremail%&settingsRole=true&streamRole=true&jukeboxRole=false&downloadRole=false&uploadRole=false&playlistRole=true&coverartRole=false&commentRole=false&podcastRole=false&shareRole=true&commentRole=true&searchRole=true" >nul