geosolutions-it / MapStore2-C028

Sistema Informativo Territoriale del Comune di Bolzano
Other
2 stars 8 forks source link

Error on first login in LDAP #69

Open offtherailz opened 6 years ago

offtherailz commented 6 years ago

Note: this issue is present also in production.

Steps to reproduce

expected result

current result

Details:

localhost.log

lug 13, 2018 4:30:00 PM org.apache.catalina.core.StandardWrapperValve invoke
GRAVE: Servlet.service() for servlet [CXFServlet] in context with path [/mapstore2] threw exception
com.google.common.util.concurrent.UncheckedExecutionException: java.lang.NullPointerException
        at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2203)
        at com.google.common.cache.LocalCache.get(LocalCache.java:3937)
        at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3941)
        at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4824)
        at it.geosolutions.geostore.services.rest.security.TokenAuthenticationFilter.authenticate(TokenAuthenticationFilter.java:142)
        at it.geosolutions.geostore.services.rest.security.GeoStoreAuthenticationFilter.doFilter(GeoStoreAuthenticationFilter.java:85)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
        at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
        at it.geosolutions.geostore.services.rest.security.GeoStoreAuthenticationFilter.doFilter(GeoStoreAuthenticationFilter.java:87)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
        at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
        at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
        at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:169)
        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
        at com.googlecode.psiprobe.Tomcat70AgentValve.invoke(Tomcat70AgentValve.java:38)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
        at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2466)
        at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2455)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException
        at it.geosolutions.geostore.services.rest.security.SessionTokenAuthenticationFilter.checkToken(SessionTokenAuthenticationFilter.java:64)
        at it.geosolutions.geostore.services.rest.security.TokenAuthenticationFilter$1.load(TokenAuthenticationFilter.java:126)
        at it.geosolutions.geostore.services.rest.security.TokenAuthenticationFilter$1.load(TokenAuthenticationFilter.java:124)
        at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3527)
        at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2319)
        at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2282)
        at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2197)

Referenced code in the error is: https://github.com/geosolutions-it/geostore/blob/master/src/modules/rest/impl/src/main/java/it/geosolutions/geostore/services/rest/security/TokenAuthenticationFilter.java#L142

tdipisa commented 4 years ago

This simply requires an update of the geostore dependencies to the version currently used in MS stable branch 2020.01.xx

tdipisa commented 4 years ago

This still doesn't work, as far as I can see the error is the same reported above: are maybe the jars not properly updated in mvn repo?

HTTP Status 500 - java.lang.NullPointerException
type Exception report

message java.lang.NullPointerException

description The server encountered an internal error that prevented it from fulfilling this request.

exception

com.google.common.util.concurrent.UncheckedExecutionException: java.lang.NullPointerException
    com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2203)
    com.google.common.cache.LocalCache.get(LocalCache.java:3937)
    com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3941)
    com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4824)
    it.geosolutions.geostore.services.rest.security.TokenAuthenticationFilter.authenticate(TokenAuthenticationFilter.java:142)
    it.geosolutions.geostore.services.rest.security.GeoStoreAuthenticationFilter.doFilter(GeoStoreAuthenticationFilter.java:85)
    org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187)
    org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    it.geosolutions.geostore.services.rest.security.GeoStoreAuthenticationFilter.doFilter(GeoStoreAuthenticationFilter.java:87)
    org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
    org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)
    org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:169)
    org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
    org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
root cause

java.lang.NullPointerException
    it.geosolutions.geostore.services.rest.security.SessionTokenAuthenticationFilter.checkToken(SessionTokenAuthenticationFilter.java:64)
    it.geosolutions.geostore.services.rest.security.TokenAuthenticationFilter$1.load(TokenAuthenticationFilter.java:126)
    it.geosolutions.geostore.services.rest.security.TokenAuthenticationFilter$1.load(TokenAuthenticationFilter.java:124)
    com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3527)
    com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2319)
    com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2282)
    com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2197)
    com.google.common.cache.LocalCache.get(LocalCache.java:3937)
    com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3941)
    com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4824)
    it.geosolutions.geostore.services.rest.security.TokenAuthenticationFilter.authenticate(TokenAuthenticationFilter.java:142)
    it.geosolutions.geostore.services.rest.security.GeoStoreAuthenticationFilter.doFilter(GeoStoreAuthenticationFilter.java:85)
    org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187)
    org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    it.geosolutions.geostore.services.rest.security.GeoStoreAuthenticationFilter.doFilter(GeoStoreAuthenticationFilter.java:87)
    org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
    org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)
    org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:169)
    org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
    org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)