Java Error after moving PC to different lacation

Need help? Post your questions here.

Java Error after moving PC to different lacation

Unread postby LB66 » 11 Jan 2015, 20:13

Hi,

I just move to a new location and all of sudden am getting following error: Any help is appreciated

Exception org.springframework.dao.TransientDataAccessResourceException
Message PreparedStatementCallback; SQL [select id, path, folder, type, override, format, data, title, album, album_name, artist, album_artist, disc_number, track_number, year, genre, mood, 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, first_scanned, children_last_updated, present, version, rank from media_file where type in (?,?) and lower(genre)=? and present and folder in (select path from music_folder where id in (select music_folder_id from user_group_access where user_group_id=? and enabled)) limit ? offset ?]; java.lang.OutOfMemoryError: Java heap space; nested exception is java.sql.SQLException: java.lang.OutOfMemoryError: Java heap space
Java version Oracle Corporation 1.8.0_25
Operating system Windows 8 6.2
Server jetty/8.y.z-SNAPSHOT
Memory Used 27 of 310 MB
Stack trace org.springframework.dao.TransientDataAccessResourceException: PreparedStatementCallback; SQL [select id, path, folder, type, override, format, data, title, album, album_name, artist, album_artist, disc_number, track_number, year, genre, mood, 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, first_scanned, children_last_updated, present, version, rank from media_file where type in (?,?) and lower(genre)=? and present and folder in (select path from music_folder where id in (select music_folder_id from user_group_access where user_group_id=? and enabled)) limit ? offset ?]; java.lang.OutOfMemoryError: Java heap space; nested exception is java.sql.SQLException: java.lang.OutOfMemoryError: Java heap space 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:605) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:639) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:668) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:676) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:716) at org.madsonic.dao.AbstractDao.query(AbstractDao.java:91) at org.madsonic.dao.MediaFileDao.getArtistsByGenre(MediaFileDao.java:475) at org.madsonic.service.MediaFileService.getArtistsByGenre(MediaFileService.java:553) at org.madsonic.controller.GenresController.getArtistsByGenre(GenresController.java:186) at org.madsonic.controller.GenresController.handleRequestInternal(GenresController.java:155) 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:919) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:851) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:953) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:844) at javax.servlet.http.HttpServlet.service(HttpServlet.java:735) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:829) at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1496) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:146) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:50) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:106) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192) at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1484) at org.madsonic.filter.RequestEncodingFilter.doFilter(RequestEncodingFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1484) at org.madsonic.filter.ParameterDecodingFilter.doFilter(ParameterDecodingFilter.java:60) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1484) at org.madsonic.filter.BootstrapVerificationFilter.doFilter(BootstrapVerificationFilter.java:54) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1476) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:501) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:429) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) at org.eclipse.jetty.server.Server.handle(Server.java:370) at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494) at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:971) at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1033) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235) at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:696) at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:53) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543) at java.lang.Thread.run(Unknown Source) Caused by: java.sql.SQLException: java.lang.OutOfMemoryError: Java heap space at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source) at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source) at org.hsqldb.jdbc.JDBCPreparedStatement.fetchResult(Unknown Source) at org.hsqldb.jdbc.JDBCPreparedStatement.executeQuery(Unknown Source) at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:646) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:589) ... 82 more Caused by: org.hsqldb.HsqlException: java.lang.OutOfMemoryError: Java heap space at org.hsqldb.error.Error.error(Unknown Source) at org.hsqldb.persist.DataFileCache.getFromFile(Unknown Source) at org.hsqldb.persist.DataFileCache.get(Unknown Source) at org.hsqldb.persist.RowStoreAVLDisk.get(Unknown Source) at org.hsqldb.index.NodeAVLDisk.findNode(Unknown Source) at org.hsqldb.index.NodeAVLDisk.getLeft(Unknown Source) at org.hsqldb.index.IndexAVL.next(Unknown Source) at org.hsqldb.index.IndexAVL.next(Unknown Source) at org.hsqldb.index.IndexAVL$IndexRowIterator.getNextRow(Unknown Source) at org.hsqldb.RangeVariable$RangeIteratorMain.findNext(Unknown Source) at org.hsqldb.RangeVariable$RangeIteratorMain.next(Unknown Source) at org.hsqldb.QuerySpecification.buildResult(Unknown Source) at org.hsqldb.QuerySpecification.getSingleResult(Unknown Source) at org.hsqldb.QuerySpecification.getResult(Unknown Source) at org.hsqldb.StatementQuery.getResult(Unknown Source) at org.hsqldb.StatementDMQL.execute(Unknown Source) at org.hsqldb.Session.executeCompiledStatement(Unknown Source) at org.hsqldb.Session.execute(Unknown Source) ... 86 more Caused by: java.lang.OutOfMemoryError: Java heap space
LB66
 
Posts: 7
Joined: 17 Oct 2014, 21:08
Has thanked: 0 time
Been thanked: 1 time

Re: Java Error after moving PC to different lacation

Unread postby DoCC » 12 Jan 2015, 13:07

your database is fucked up, completely.

killall java and madsonic processes , rename the db folder.
start from scratch
User avatar
DoCC
Contributor
Contributor
 
Posts: 210
Joined: 25 Feb 2014, 14:41
Location: UpperBavaria : ))
Has thanked: 41 times
Been thanked: 71 times

Re: Java Error after moving PC to different lacation

Unread postby LB66 » 12 Jan 2015, 21:34

I could see this much ;) but redoing whole thing is what I wanted to avoid with modified theme, all the users etc. Thankfully while ago when I set it up and finished all I did a full backup (of which I forgot with Christmas Holidays etc.) and restore sorted all I just had to run scan for new file But thanks for advise DoCC :) It might come to that one day.

LB66
LB66
 
Posts: 7
Joined: 17 Oct 2014, 21:08
Has thanked: 0 time
Been thanked: 1 time

Re: Java Error after moving PC to different lacation

Unread postby Madevil » 28 Apr 2015, 23:38

depending on the installation of Madsonic and operating system, there are several solutions to increase used memory to avoid Java heap size errors (OutOfMemoryError)


Linux standalone

--> madsonic.sh

Windows standalone

--> madsonic.bat

Deb installer

--> /etc/default/madsonic

rpm installer

--> /etc/sysconfig/madsonic

OSX installer

--> /Applications/Madsonic.app/Contents/MacOS/universalJavaApplicationStub

Windows Installer

panel.png
User avatar
Madevil
Administrator
Administrator
 
Posts: 919
Joined: 07 Dec 2012, 03:58
Has thanked: 1341 times
Been thanked: 954 times

Re: Java Error after moving PC to different lacation

Unread postby nelgin » 12 Jan 2016, 21:47

Code: Select all
  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND                                                                         
32127 madsonic  20   0 4841652 1.263g   6376 S 257.5 35.3  69:51.79 java       


I think there's something wrong for it to take so much memory and cpu. What would you say is an acceptable size for MADSONIC_INIT_MEMORY and MADSONIC_MAX_MEMORY? I have 350/1024. This used to be fine for me on the 5.x but it's happening on 6.x for me.
nelgin
 
Posts: 30
Joined: 06 Jun 2013, 06:12
Has thanked: 1 time
Been thanked: 17 times


Return to Support 5.x

Who is online

Users browsing this forum: No registered users and 2 guests