Upgraded to

Need help? Post your questions here.
MediocreFred
Posts: 8
Joined: 27 Jan 2013, 17:22
Has thanked: 0
Been thanked: 3 times

Upgraded to

Unread post by MediocreFred »

Hello,

I just upgraded Madsonic and Java to:
Version 5.0.3490.beta2
Server jetty-6.1.x, java 1.7.0_21, Windows 7 (241.3 MB / 989.9 MB)

I was previously on a Madsonic 4.7 build on Java 1.7.

Rebooted my PC after the install and Madsonic starts up with no errors in the log (it did upgrade the database and all that successfully).

However, when I attempt to access Madsonic, I get the following error in both panes/panels/frames:

Code: Select all

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

Exception	org.springframework.jdbc.BadSqlGrammarException
Message	PreparedStatementCallback; bad SQL grammar [select id, path, folder, type, override, format, 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 from media_file where type=? 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)) order by created desc limit ? offset ?]; nested exception is java.sql.SQLException: Column not found: MOOD in statement [select id, path, folder, type, override, format, 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 from media_file where type=? 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)) order by created desc limit ? offset ?]
Java version	Oracle Corporation 1.7.0_21
Operating system	Windows 7 6.1
Server	jetty-6.1.x
Memory	Used 981 of 989 MB
Stack trace	org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [select id, path, folder, type, override, format, 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 from media_file where type=? 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)) order by created desc limit ? offset ?]; nested exception is java.sql.SQLException: Column not found: MOOD in statement [select id, path, folder, type, override, format, 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 from media_file where type=? 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)) order by created desc limit ? offset ?]
	at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:220)
	at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
	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.getNewestAlbums(MediaFileDao.java:282)
	at net.sourceforge.subsonic.service.MediaFileService.getNewestAlbums(MediaFileService.java:436)
	at net.sourceforge.subsonic.controller.HomeController.getNewest(HomeController.java:302)
	at net.sourceforge.subsonic.controller.HomeController.handleRequestInternal(HomeController.java:128)
	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:124)
	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:142)
	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:174)
	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.ResponseHeaderFilter.doFilter(ResponseHeaderFilter.java:47)
	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: Column not found: MOOD in statement [select id, path, folder, type, override, format, 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 from media_file where type=? 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)) order by created desc limit ? offset ?]
	at org.hsqldb.jdbc.Util.throwError(Unknown Source)
	at org.hsqldb.jdbc.jdbcPreparedStatement.(Unknown Source)
	at org.hsqldb.jdbc.jdbcConnection.prepareStatement(Unknown Source)
	at org.springframework.jdbc.core.JdbcTemplate$SimplePreparedStatementCreator.createPreparedStatement(JdbcTemplate.java:1322)
	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:585)
	... 64 more
Short of deleting the database and starting over, is there anything I can do to get this fixed?

Thanks,
MediocreFred.
User avatar
Madsonic
Administrator
Administrator
Posts: 984
Joined: 07 Dec 2012, 03:58
Answers: 7
Has thanked: 1201 times
Been thanked: 470 times

Re: Upgraded to

Unread post by Madsonic »

hi,

it looks like you missed some DB-Upgrades.

Try to delete the DB-Upgrade codes, maybe this will help you

go to your internal DB Viewer as Admin User -> http://localhost/db.view
and execute this query

Code: Select all

delete FROM version where version >= 123
then restart your server, at your log you will see something like this

Code: Select all

[6/6/13 6:31:33 PM CEST]	INFO	DaoHelper	Checking database schema.
[6/6/13 6:31:35 PM CEST]	INFO	SchemaMadsonic	Updating database schema to version 123.
[6/6/13 6:31:35 PM CEST]	INFO	SchemaMadsonic	Updating database schema to version 124.
[6/6/13 6:31:35 PM CEST]	INFO	SchemaMadsonic	Updating database schema to version 125.
[6/6/13 6:31:35 PM CEST]	INFO	DaoHelper	Done checking database schema.
Image

best regards
These users thanked the author Madsonic for the post:
etyrnal
Rating: 7.69%
MediocreFred
Posts: 8
Joined: 27 Jan 2013, 17:22
Has thanked: 0
Been thanked: 3 times

Re: Upgraded to

Unread post by MediocreFred »

Thanks for the suggestion. In the mean time, I restored both subsonic folders (c: root and Program File) from my backup and ran the installer again. This time, I waited patiently and after about half an hour or so, all the upgrades were done and I don't see these errors anymore.

The first time I did it, I think I got a little impatient when the service took too long to start. So, I stopped and started it and that must have aborted the upgrade scripts.

One suggestion - will it be possible to display a message in the Madsonic control panel when the upgrade scripts are running. Now, it says "Started - Autorun" or something like that, but, the memory used field is empty and the web pages are not accessible,

Thanks,
MediocreFred.
These users thanked the author MediocreFred for the post:
etyrnal
Rating: 7.69%
Post Reply