freme-project / e-Link

Apache License 2.0
0 stars 0 forks source link

ConcurrentModificationException in e-Link/DataEnricher #51

Closed josauder closed 9 years ago

josauder commented 9 years ago

I get this error message when calling e-Link/documents with

INFO    2015-10-19 15:43:42,924 [main] eu.freme.broker.integration_tests.EServiceTest  - try to enrich via private template as template owner... should work
DEBUG   2015-10-19 15:43:43,825 [http-nio-8000-exec-10] com.github.isrsal.logging.LoggingFilter  - Request: request id=11; content type=null; uri=/mockups/sparql?query=PREFIX++geo-pos%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2003%2F01%2Fgeo%2Fwgs84_pos%23%3E%0A%0ACONSTRUCT+%0A++%7B+%3Chttp%3A%2F%2Fdbpedia.org%2Fresource%2FBerlin%3E+geo-pos%3Alat+%3Flat+.%0A++++%3Chttp%3A%2F%2Fdbpedia.org%2Fresource%2FBerlin%3E+geo-pos%3Along+%3Flong+.%7D%0AWHERE%0A++%7B+%3Chttp%3A%2F%2Fdbpedia.org%2Fresource%2FBerlin%3E+geo-pos%3Alat+%3Flat+.%0A++++%3Chttp%3A%2F%2Fdbpedia.org%2Fresource%2FBerlin%3E+geo-pos%3Along+%3Flong%0A++%7D%0A; payload=
DEBUG   2015-10-19 15:43:43,826 [http-nio-8000-exec-10] com.github.isrsal.logging.LoggingFilter  - Response: request id=11; payload=@prefix dsp:   <http://dublincore.org/dc-dsp#> .
@prefix schema: <http://schema.org/> .
@prefix olia:  <http://purl.org/olia/olia.owl#> .
@prefix rutg:  <http://rdfunit.aksw.org/data/generators#> .
@prefix owl:   <http://www.w3.org/2002/07/owl#> .
@prefix rlog:  <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/rlog#> .
@prefix xsd:   <http://www.w3.org/2001/XMLSchema#> .
@prefix itsrdf: <http://www.w3.org/2005/11/its/rdf#> .
@prefix nif:   <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#> .
@prefix rutp:  <http://rdfunit.aksw.org/data/patterns#> .
@prefix rdfs:  <http://www.w3.org/2000/01/rdf-schema#> .
@prefix oslc:  <http://open-services.net/ns/core#> .
@prefix p:     <http://127.0.0.1:9995/spotlight#> .
@prefix rut:   <http://rdfunit.aksw.org/ns/core#> .
@prefix rutr:  <http://rdfunit.aksw.org/data/results#> .
@prefix rdf:   <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rutt:  <http://rdfunit.aksw.org/data/tests#> .
@prefix spin:  <http://spinrdf.org/spin#> .
@prefix ruts:  <http://rdfunit.aksw.org/data/testsuite#> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix prov:  <http://www.w3.org/ns/prov#> .
@prefix dc:    <http://purl.org/dc/elements/1.1/> .

<http://freme-project.eu/#char=0,15>
        a                     nif:RFC5147String , nif:Context , nif:Sentence ;
        nif:anchorOf          "This is Germany" ;
        nif:beginIndex        "0" ;
        nif:endIndex          "15" ;
        nif:firstWord         <http://freme-project.eu/#char=0,4> ;
        nif:isString          "This is Germany" ;
        nif:lastWord          <http://freme-project.eu/#char=8,15> ;
        nif:referenceContext  <http://freme-project.eu/#char=0,15> ;
        nif:word              <http://freme-project.eu/#char=5,7> .

<http://freme-project.eu/#char=5,7>
        a                     nif:RFC5147String , nif:Word ;
        nif:anchorOf          "is" ;
        nif:beginIndex        "5" ;
        nif:endIndex          "7" ;
        nif:nextWord          <http://freme-project.eu/#char=8,15> ;
        nif:previousWord      <http://freme-project.eu/#char=0,4> ;
        nif:referenceContext  <http://freme-project.eu/#char=0,15> ;
        nif:sentence          <http://freme-project.eu/#char=0,15> .

<http://freme-project.eu/#char=0,4>
        a                     nif:RFC5147String , nif:Word ;
        nif:anchorOf          "This" ;
        nif:beginIndex        "0" ;
        nif:endIndex          "4" ;
        nif:nextWord          <http://freme-project.eu/#char=5,7> ;
        nif:referenceContext  <http://freme-project.eu/#char=0,15> ;
        nif:sentence          <http://freme-project.eu/#char=0,15> ;
        itsrdf:taIdentRef     <http://dbpedia.org/resource/Sathya_Sai_Baba> .

<http://freme-project.eu/#char=8,15>
        a                     nif:RFC5147String , nif:Word ;
        nif:anchorOf          "Germany" ;
        nif:beginIndex        "8" ;
        nif:endIndex          "15" ;
        nif:previousWord      <http://freme-project.eu/#char=5,7> ;
        nif:referenceContext  <http://freme-project.eu/#char=0,15> ;
        nif:sentence          <http://freme-project.eu/#char=0,15> ;
        itsrdf:taIdentRef     <http://dbpedia.org/resource/Germany> .

ERROR   2015-10-19 15:43:43,855 [http-nio-8000-exec-9] eu.freme.eservices.elink.api.DataEnricher  - java.util.ConcurrentModificationException
    at com.hp.hpl.jena.mem.ArrayBunch$2.hasNext(ArrayBunch.java:118)
    at com.hp.hpl.jena.util.iterator.WrappedIterator.hasNext(WrappedIterator.java:90)
    at com.hp.hpl.jena.util.iterator.Map1Iterator.hasNext(Map1Iterator.java:48)
    at com.hp.hpl.jena.util.iterator.WrappedIterator.hasNext(WrappedIterator.java:90)
    at eu.freme.eservices.elink.api.DataEnricher.enrichWithTemplateSPARQL(DataEnricher.java:94)
    at eu.freme.eservices.elink.api.DataEnricher.enrichWithTemplate(DataEnricher.java:72)
    at eu.freme.broker.eservices.ELink.enrich(ELink.java:114)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)
    at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137)
    at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110)
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:776)
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:705)
    at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:967)
    at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:869)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:843)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
    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.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 eu.freme.broker.security.ManagementEndpointAuthenticationFilter.doFilter(ManagementEndpointAuthenticationFilter.java:83)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at eu.freme.broker.security.AuthenticationFilter.doFilter(AuthenticationFilter.java:92)
    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.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:57)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    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.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:50)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    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.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at eu.freme.broker.tools.internationalization.EInternationalizationFilter.doFilter(EInternationalizationFilter.java:173)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at eu.freme.broker.tools.CORSFilter.doFilter(CORSFilter.java:46)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at com.github.isrsal.logging.LoggingFilter.doFilterInternal(LoggingFilter.java:46)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:668)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1521)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1478)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:745)

Steps to reproduce: checkout integration-tests branch run ELinkSecurityTest as JUnitTest error comes at testELinkDocuments

m1ci commented 9 years ago

It seems this is related to https://github.com/freme-project/e-Link/issues/52 @ArneBinder can you please comment if this is also related to https://github.com/freme-project/e-Link/issues/52 ?

ArneBinder commented 9 years ago

@josauder which test in ELinkSecurityTest fails exactly?

josauder commented 9 years ago

The function DoElink produces this error when being called in testAnonymousUser and testELinkDocuments