Something wrong with DB

Post your Server Bug Report

Something wrong with DB

Unread postby digitalirony » 28 Oct 2014, 14:03

My DB keeps breaking. To the point where I have to re-install subsonic/re-initialize a new DB to get it to work....
I have tried pulling just the user accounts of the DB and putting it in the new one so that I can move them over...but that seems to break it.
The errors I am seeing is:
Error
Madsonic encountered an internal error. You can report this error in the Madsonic Forum. Please include the information below.

Code: Select all
Exception   org.springframework.jdbc.BadSqlGrammarException
Message   PreparedStatementCallback; bad SQL grammar [select id, name, type, username, ip_address, auto_control_enabled, last_seen, cover_art_scheme, transcode_scheme, dynamic_ip, technology, client_id from player where id=?]; nested exception is java.sql.SQLException: Wrong data type: java.lang.NumberFormatException: For input string: ""
Java version   Sun Microsystems Inc. 1.6.0_27
Operating system   Linux 2.6.32-5-amd64
Server   jetty/8.y.z-SNAPSHOT
Memory   Used 38 of 191 MB
Stack trace   org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [select id, name, type, username, ip_address, auto_control_enabled, last_seen, cover_art_scheme, transcode_scheme, dynamic_ip, technology, client_id from player where id=?]; nested exception is java.sql.SQLException: Wrong data type: java.lang.NumberFormatException: For input string: ""
   at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:97)
   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.AbstractDao.queryOne(AbstractDao.java:120)
   at net.sourceforge.subsonic.dao.PlayerDao.getPlayerById(PlayerDao.java:88)
   at net.sourceforge.subsonic.service.PlayerService.getPlayerById(PlayerService.java:177)
   at net.sourceforge.subsonic.service.PlayerService.getPlayer(PlayerService.java:96)
   at net.sourceforge.subsonic.service.PlayerService.getPlayer(PlayerService.java:66)
   at net.sourceforge.subsonic.controller.LeftController.handleRequestInternal(LeftController.java:153)
   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:735)
   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.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.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1484)
   at net.sourceforge.subsonic.filter.RequestEncodingFilter.doFilter(RequestEncodingFilter.java:43)
   at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1484)
   at net.sourceforge.subsonic.filter.ParameterDecodingFilter.doFilter(ParameterDecodingFilter.java:54)
   at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1484)
   at net.sourceforge.subsonic.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:499)
   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:428)
   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:667)
   at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
   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:679)
Caused by: java.sql.SQLException: Wrong data type: java.lang.NumberFormatException: For input string: ""
   at org.hsqldb.jdbc.Util.throwError(Unknown Source)
   at org.hsqldb.jdbc.jdbcPreparedStatement.setParameter(Unknown Source)
   at org.hsqldb.jdbc.jdbcPreparedStatement.setString(Unknown Source)
   at org.springframework.jdbc.core.StatementCreatorUtils.setValue(StatementCreatorUtils.java:335)
   at org.springframework.jdbc.core.StatementCreatorUtils.setParameterValueInternal(StatementCreatorUtils.java:217)
   at org.springframework.jdbc.core.StatementCreatorUtils.setParameterValue(StatementCreatorUtils.java:145)
   at org.springframework.jdbc.core.ArgPreparedStatementSetter.setValues(ArgPreparedStatementSetter.java:51)
   at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:646)
   at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:591)
   ... 72 more



Anyone shed some light on this? Is some asshat sql injecting me with bad data into my DB? Is there a file I downloaded with something that isn't escaping correctly?
digitalirony
 
Posts: 2
Joined: 08 Oct 2014, 07:12
Has thanked: 0 time
Been thanked: 0 time

Re: Something wrong with DB

Unread postby digitalirony » 28 Oct 2014, 16:31

So, after digging into this more....
This issue seems to only happen in chrome when I login as the non admin user, while using apache proxy.
If I login directly to port 4040(without using apache), or if I login as the admin user, there is no issue.

Also, If I login with firefox, also no issue.

Also, this is 5.0, I tried to update to 5.1 and 5.2, however the debian packages provided are missing quite a bit of the files(such as tomcat.....)
digitalirony
 
Posts: 2
Joined: 08 Oct 2014, 07:12
Has thanked: 0 time
Been thanked: 0 time

Re: Something wrong with DB

Unread postby DoCC » 18 Dec 2014, 09:02

i have used the apache proxy since 4.6 with chrome as main browser. no problems.
but i have always run ubuntu x64 not pure debian.

i did install madsonic via dpkg .
updates via standalone files.

never any major problems like this.
User avatar
DoCC
Contributor
Contributor
 
Posts: 210
Joined: 25 Feb 2014, 14:41
Location: UpperBavaria : ))
Has thanked: 41 times
Been thanked: 71 times


Return to Bug Reports 5.x

Who is online

Users browsing this forum: No registered users and 1 guest

cron