Exception when an LDAP user tries to visit the "Admin Panel"

Post your Server Bug Report
w1ll14m
Posts: 1
Joined: 09 Aug 2013, 12:44
Has thanked: 0
Been thanked: 1 time

Exception when an LDAP user tries to visit the "Admin Panel"

Unread post by w1ll14m »

Hi!

Recently I started using LDAP (just because we can) and set my LDAP user to be an admin, so now when i logon as that user and go to settings/admin panel i get the following error:

I'm running: 20161208_madsonic-6.2.9040-standalone

Bug report:

Code: Select all

=========================================================================================
 VERSION:      MADSONIC 6.2 | BUILD: 9040 
 SERVLET:      JETTY
 SERVER:       CPU: AMD Phenom(tm) II X6 1090T Processor | ARCH: X86_64 | MEMORY: 16GB | HDD: 12TB
 OS:           Gentoo
 SYSTEM:       tower/desktop hardware
 INSTALLER:    standalone
 JAVA:         ORACLE JDK 1.7.0_17 
 BROWSER:      chrome Version 55.0.2883.87 m (64-bit)
 CLIENT:       MADSONIC 6.2
 DESCRIPTION:  Exception when an LDAP user tries to visit the "Admin Panel"
 REPRODUCIBLE: YES 
=========================================================================================

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.dao.TransientDataAccessResourceException
Message	PreparedStatementCallback; SQL [select id, music_folder_id, artist_all, artist_album, albums, genre, music_files, music_files_size, video_files, video_files_size, podcast_files, podcast_files_size, audiobooks_files, audiobooks_files_size from statistic_server]; java.lang.ArrayIndexOutOfBoundsException; nested exception is java.sql.SQLException: java.lang.ArrayIndexOutOfBoundsException
Java version	Oracle Corporation 1.7.0_17
Operating system	Linux 4.3.0-gentoo-wLLm-Custom-x86_64
Server	jetty/8.y.z-SNAPSHOT
Memory	Used 71 of 210 MB
Stack trace	org.springframework.dao.TransientDataAccessResourceException: PreparedStatementCallback; SQL [select id, music_folder_id, artist_all, artist_album, albums, genre, music_files, music_files_size, video_files, video_files_size, podcast_files, podcast_files_size, audiobooks_files, audiobooks_files_size from statistic_server]; java.lang.ArrayIndexOutOfBoundsException; nested exception is java.sql.SQLException: java.lang.ArrayIndexOutOfBoundsException
	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:107)
	at org.madsonic.dao.MusicFolderStatisticsDao.getAllFolderStatistics(MusicFolderStatisticsDao.java:40)
	at org.madsonic.controller.AdminSettingsController.referenceData(AdminSettingsController.java:74)
	at org.springframework.web.servlet.mvc.SimpleFormController.referenceData(SimpleFormController.java:218)
	at org.springframework.web.servlet.mvc.AbstractFormController.showForm(AbstractFormController.java:578)
	at org.springframework.web.servlet.mvc.SimpleFormController.showForm(SimpleFormController.java:201)
	at org.springframework.web.servlet.mvc.SimpleFormController.showForm(SimpleFormController.java:178)
	at org.springframework.web.servlet.mvc.AbstractFormController.showNewForm(AbstractFormController.java:341)
	at org.springframework.web.servlet.mvc.AbstractFormController.handleRequestInternal(AbstractFormController.java:281)
	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:951)
	at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:842)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:735)
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:827)
	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:1507)
	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.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:1495)
	at org.madsonic.filter.RequestEncodingFilter.doFilter(RequestEncodingFilter.java:43)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1495)
	at org.madsonic.filter.ParameterDecodingFilter.doFilter(ParameterDecodingFilter.java:54)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1495)
	at org.madsonic.filter.BootstrapVerificationFilter.doFilter(BootstrapVerificationFilter.java:58)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1487)
	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:427)
	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:973)
	at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1035)
	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:641)
	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:231)
	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:722)
Caused by: java.sql.SQLException: java.lang.ArrayIndexOutOfBoundsException
	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.ArrayIndexOutOfBoundsException
	at org.hsqldb.error.Error.error(Unknown Source)
	at org.hsqldb.result.Result.newErrorResult(Unknown Source)
	at org.hsqldb.result.Result.newErrorResult(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.ArrayIndexOutOfBoundsException
Edit: removed *, it was used because my first post detected "BoundsEx" as "sex" so flagged as spam, this however is no longer required.
These users thanked the author w1ll14m for the post:
Madsonic
Rating: 7.69%
User avatar
Madsonic
Administrator
Administrator
Posts: 984
Joined: 07 Dec 2012, 03:58
Answers: 7
Has thanked: 1201 times
Been thanked: 470 times

Re: Exception when an LDAP user tries to visit the "Admin Pa

Unread post by Madsonic »

Hi there,

Try the following:

go to Settings > Reset > Reset Access Control

go to Settings > Reset > Cleanup Statistics

go to Settings > Reset > Cleanup History

go to Settings > Access (recheck security for LDAP group)

go to Settings > Media Tools > Normal Rescan

wait until scan is finished, restart the Madsonic service and try again.

http://beta.madsonic.org/pages/ldap.jsp#3

btw: ... also uploading new build with LDAP library update!

best regards
Post Reply