Bad Sql Grammar Exception

Need help? Post your questions here.

Bad Sql Grammar Exception

Unread postby kayvee » 02 Nov 2015, 23:38

Hello guys,
I am a long-time subsonic user considering to switch to madsonic and I need help in getting it up and running... I removed my subsonic installation (saved the /var/subsonic folder) and installed madsonic using the .deb package. After installation, when I try to go to localhost:4040 I get the following error. It appears like some kind of bad database issue but I don't understand why this is happening with a fresh madsonic installation.

Code: Select all
Exception    org.springframework.jdbc.BadSqlGrammarException
Message    PreparedStatementCallback; bad SQL grammar [select username, password, email, ldap_authenticated, bytes_streamed, bytes_downloaded, bytes_uploaded, group_id, locked, comment from user where username=?]; nested exception is java.sql.SQLSyntaxErrorException: user lacks privilege or object not found: GROUP_ID
Java version    Oracle Corporation 1.7.0_85
Operating system    Linux 4.2.0-16-generic
Server    jetty/8.y.z-SNAPSHOT
Memory    Used 25 of 316 MB
Stack trace    org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [select username, password, email, ldap_authenticated, bytes_streamed, bytes_downloaded, bytes_uploaded, group_id, locked, comment from user where username=?]; nested exception is java.sql.SQLSyntaxErrorException: user lacks privilege or object not found: GROUP_ID
   at org.springframework.jdbc.support.SQLExceptionSubclassTranslator.doTranslate(SQLExceptionSubclassTranslator.java:92)
   at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
   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.AbstractDao.queryOne(AbstractDao.java:129)
   at org.madsonic.dao.UserDao.getUserByName(UserDao.java:78)
   at org.madsonic.service.SecurityService.getUserByName(SecurityService.java:168)
   at org.madsonic.controller.MultiController.login(MultiController.java:101)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:606)
   at org.springframework.web.servlet.mvc.multiaction.MultiActionController.invokeNamedMethod(MultiActionController.java:471)
   at org.springframework.web.servlet.mvc.multiaction.MultiActionController.handleRequestInternal(MultiActionController.java:408)
   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:933)
   at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:867)
   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:139)
   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(Thread.java:745)
Caused by: java.sql.SQLSyntaxErrorException: user lacks privilege or object not found: GROUP_ID
   at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)
   at org.hsqldb.jdbc.JDBCUtil.sqlException(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:1447)
   at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:583)
   ... 88 more
Caused by: org.hsqldb.HsqlException: user lacks privilege or object not found: GROUP_ID
   at org.hsqldb.error.Error.error(Unknown Source)
   at org.hsqldb.error.Error.error(Unknown Source)
   at org.hsqldb.ExpressionColumn.checkColumnsResolved(Unknown Source)
   at org.hsqldb.QueryExpression.resolve(Unknown Source)
   at org.hsqldb.ParserDQL.compileCursorSpecification(Unknown Source)
   at org.hsqldb.ParserCommand.compilePart(Unknown Source)
   at org.hsqldb.ParserCommand.compileStatement(Unknown Source)
   at org.hsqldb.Session.compileStatement(Unknown Source)
   at org.hsqldb.StatementManager.compile(Unknown Source)
   at org.hsqldb.Session.execute(Unknown Source)
   ... 92 more

kayvee
 
Posts: 3
Joined: 29 Jan 2015, 03:50
Has thanked: 0 time
Been thanked: 3 times

Re: Bad Sql Grammar Exception

Unread postby kayvee » 06 Nov 2015, 14:36

Apparently this was happening because I had remnants of an old installation still lurking around that I did not delete completely. It is now fixed and my installation works very well.
kayvee
 
Posts: 3
Joined: 29 Jan 2015, 03:50
Has thanked: 0 time
Been thanked: 3 times


Return to Support 5.x

Who is online

Users browsing this forum: Yahoo [Bot] and 2 guests

cron