Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[e-link][explore][ldf] broken on freme 0.4 and later? #10

Open
ArneBinder opened this issue Apr 11, 2016 · 12 comments
Open

[e-link][explore][ldf] broken on freme 0.4 and later? #10

ArneBinder opened this issue Apr 11, 2016 · 12 comments
Labels

Comments

@ArneBinder
Copy link
Contributor

post /e-link/explore ldf seems to be broken. The following curl does not work:

`curl -X POST "http://api.freme-project.eu/0.4/e-link/explore?resource=http://dbpedia.org/resource/Berlin&endpoint=http://fragments.dbpedia.org/2014/en&endpoint-type=ldf"

result:

{
  "exception": "eu.freme.broker.exception.InternalServerErrorException",
  "path": "/e-link/explore",
  "message": "Unknown problem. Please contact us.",
  "error": "Internal Server Error",
  "status": 500,
  "timestamp": 1460391260772
}

explore sparql still works:

curl -X POST "http://api.freme-project.eu/0.4/e-link/explore?resource=http://dbpedia.org/resource/Berlin&endpoint=http://dbpedia.org/sparql&endpoint-type=sparql"
@ArneBinder ArneBinder added the bug label Apr 11, 2016
@ArneBinder ArneBinder changed the title [e-link][explore][ldf] broken on freme 0.4 and following? [e-link][explore][ldf] broken on freme 0.4 and later? Apr 11, 2016
@ArneBinder
Copy link
Contributor Author

I un-ignored the JUnit tests, they work (with the mockup endpoint).

@jnehring
Copy link
Member

**I can reproduce the problem.

Explore sparql endpoint works:

curl -X POST "http://api.freme-project.eu/current/e-link/explore?resource=http%3A%2F%2Fdbpedia.org%2Fresource%2FBerlin&endpoint=http%3A%2F%2Fdbpedia.org%2Fsparql&endpoint-type=sparql"

I checked the logfiles. There is a NullPointerException and a stack trace:

2016-04-12 16:01:49 [INFO] eu.freme.bservices.filters.logging.LoggingFilter.logRequest(LoggingFilter.java:142) Request: request id=2; content type=text/plain;charset=UTF-8; uri=/e-link/explore?resource=http://dbpedia.org/resource/Berlin&endpoint=http://fragments.dbpedia.org&endpoint-type=ldf; payload=
2016-04-12 16:02:25 [WARN] org.apache.jena.riot.system.ErrorHandlerFactory$ErrorLogger.logWarning(ErrorHandlerFactory.java:77) Only triples or default graph data expected : named graph data ignored
2016-04-12 16:02:50 [ERROR] eu.freme.eservices.elink.api.DataEnricher.enrichViaLDFExplore(DataEnricher.java:216) java.lang.NullPointerException
    at java.nio.CharBuffer.wrap(CharBuffer.java:487)
    at com.github.fge.uritemplate.parse.URITemplateParser.parse(URITemplateParser.java:55)
    at com.github.fge.uritemplate.URITemplate.<init>(URITemplate.java:52)
    at org.linkeddatafragments.model.LinkedDataFragment.setTemplate(LinkedDataFragment.java:140)
    at org.linkeddatafragments.model.LinkedDataFragment.hydraParse(LinkedDataFragment.java:85)
    at org.linkeddatafragments.model.LinkedDataFragment.<init>(LinkedDataFragment.java:77)
    at org.linkeddatafragments.model.LinkedDataFragmentFactory.create(LinkedDataFragmentFactory.java:18)
    at org.linkeddatafragments.client.LinkedDataFragmentsClient.getBaseFragment(LinkedDataFragmentsClient.java:60)
    at org.linkeddatafragments.model.LinkedDataFragmentGraph.graphBaseSize(LinkedDataFragmentGraph.java:102)
    at com.hp.hpl.jena.graph.impl.GraphBase.size(GraphBase.java:344)
    at org.linkeddatafragments.solver.ReorderTransformationLDF.<init>(ReorderTransformationLDF.java:41)
    at org.linkeddatafragments.model.LinkedDataFragmentGraph.<init>(LinkedDataFragmentGraph.java:37)
    at eu.freme.eservices.elink.api.DataEnricher.enrichViaLDFExplore(DataEnricher.java:207)
    at eu.freme.eservices.elink.api.DataEnricher.exploreResource(DataEnricher.java:183)
    at eu.freme.eservices.elink.LinkingController.exploreResource(LinkingController.java:148)
    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:222)
    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.invokeHandlerMethod(RequestMappingHandlerAdapter.java:775)
    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:965)
    at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:867)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:841)
    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 eu.freme.bservices.filters.cors.CORSFilter.doFilter(CORSFilter.java:33)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at eu.freme.bservices.filters.postprocessing.PostprocessingFilter.doFilter(PostprocessingFilter.java:58)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at eu.freme.bservices.filters.internationalizationfilter.InternationalizationFilter.doFilter(InternationalizationFilter.java:218)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at eu.freme.bservices.filters.logging.LoggingFilter.doFilterInternal(LoggingFilter.java:86)
    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.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.common.security.ManagementEndpointAuthenticationFilter.doFilter(ManagementEndpointAuthenticationFilter.java:83)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at eu.freme.common.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 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:212)
    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:141)
    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:521)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1096)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:674)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
    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)

@m1ci any idea whats wrong?

@m1ci
Copy link
Contributor

m1ci commented Apr 12, 2016

hard to say, no changes has been done in the recent period

@m1ci
Copy link
Contributor

m1ci commented Apr 19, 2016

I tried to find the issue but without success.
The issue seems to be between Jena/LDF dependencies in FREME.
Probably something has changed during the migration to the new architecture.

@jnehring
Copy link
Member

Probably something has changed during the migration to the new architecture.

The problem happens on FREME live which still runs the old architecture. Sorry milan this is an old bug :)

Does the bug occur on dbpedia only or is the endpoint LDF explore generally broken?

@m1ci
Copy link
Contributor

m1ci commented Apr 19, 2016

The problem happens on FREME live which still runs the old architecture. Sorry milan this is an old bug :)

not really, see bellow :)

Does the bug occur on dbpedia only or is the endpoint LDF explore generally broken?

Very valid question, just checked and this particular LDF endpoint is broken. The LDF explore API is OK. For example, the ORCID endpoint (http://rv2622.1blu.de:5000/orcid) is working. Here is example:

curl -X POST --header "Content-Type: application/json" --header "Accept: text/turtle" "http://api.freme-project.eu/0.5/e-link/explore?resource=http%3A%2F%2Forcid.org%2F0000-0001-5000-0736&endpoint=http%3A%2F%2Frv2622.1blu.de%3A5000%2Forcid&endpoint-type=ldf" -v

@jnehring
Copy link
Member

When it happens only at DBPedia then I guess the problem lies within DBPedia LDF endpoint and not within our codes. So we can do nothing about it. I leave the issue open so we can test it again in a few weeks. Maybe it solves itself by the next update in DBPedia.

@jnehring
Copy link
Member

Maybe this will be fixed by updating Jena: freme-project/e-Link#69

@ArneBinder
Copy link
Contributor Author

ArneBinder commented Jun 27, 2016

I can not reproduce this anymore, is it fixed? Can we close this?

@jnehring
Copy link
Member

The error still occurs. Now the CURL (see first comment) produces

{
  "exception": "eu.freme.common.exception.BadRequestException",
  "path": "/e-link/explore",
  "message": "Something went wrong when retrieving the content. Please contact the maintainers.",
  "error": "Bad Request",
  "status": 400,
  "timestamp": 1468505897979
}

I still think that the problem originates from within DBPedia.

@jnehring jnehring removed their assignment Jul 14, 2016
@ArneBinder
Copy link
Contributor Author

It is really strange that I get a result if endpointType is set to sparql (but using the ldf endpoint!):

curl -X POST "http://api-dev.freme-project.eu/current/e-link/explore?resource=http://dbpedia.org/resource/Berlin&endpoint=http://fragments.dbpedia.org/2014/en&endpoint-type=sparql"

Btw using endpointType=ldf gives this:

INFO    2016-07-18 11:25:08,093 [http-nio-8084-exec-2] eu.freme.bservices.filters.logging.LoggingFilter  - Request: request id=53; uri=/e-link/explore?resource=http://dbpedia.org/resource/Berlin&endpoint=http://fragments.dbpedia.org/2014/en&endpoint-type=ldf; payload=
WARN    2016-07-18 11:25:08,499 [http-nio-8084-exec-2] org.apache.jena.riot  - Only triples or default graph data expected : named graph data ignored
ERROR   2016-07-18 11:25:08,544 [http-nio-8084-exec-2] eu.freme.eservices.elink.api.DataEnricher  - java.lang.NullPointerException

especially: Only triples or default graph data expected : named graph data ignored
Perhaps this can help in resolving this.

@jnehring
Copy link
Member

@ArneBinder please do not invest more time on this. We think that this problem is dbpedia specific and the feature is not used by anyone anyways.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants