Hi, The Stanbol Entityhub does not have an RDF to HTML serializer. Because of that it responds with
"The registered message body writers compatible with the MIME media type are: text/html; charset=utf-8" If you send an RDF mime type (e.g. text/turtle) as Accept header it should work just fine. Try to add "&header_Accept=text/turtle" to the end of your URL when requesting an Entity via the browser. e.g. http://localhost:8080/entityhub/lookup?id=file:///C:/Users/Acer/Documents/Semantic/Stanbol/EntityPerson/Marry.Smith.rdf%23Marry_Smith&header_Accept=text/turtle best Rupert On Thu, Jun 25, 2015 at 4:35 PM, Adrian Dinu <adr...@r-2.ca> wrote: > Hello, > I am not able to access my local named entities by ID. > > I create the entity Marry_Smith via cURL using this file (Marry.Smith.rdf) > ---------------------------------------------------------------------------- > <?xml version="1.0" encoding="UTF-8"?> > <rdf:RDF > xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" > xmlns:dc="http://purl.org/dc/elements/1.1/" > xmlns:foaf="http://xmlns.com/foaf/0.1/" > xml:base="file:///C:/Users/Acer/Documents/Semantic/Stanbol/EntityPerson/" >> > <NamedIndividual rdf:about="Marry.Smith.rdf#Marry_Smith"> > <rdf:label>Marry Smith</rdf:label> > <foaf:name>Marry Smith</foaf:name> > </NamedIndividual> > </rdf:RDF> > -------------------------------------------------------------------------------------- > The response frum cURL is > > C:\Users\Acer\Documents\Semantic\Stanbol\EntityPerson>curl -i -X PUT -H > "Content-Type:application/rdf+xml" -T Marry.Smith.rdf > "http://localhost:8080/entityhub/site/r2HR/entity" > HTTP/1.1 100 Continue > HTTP/1.1 201 Created > Date: Thu, 25 Jun 2015 13:21:27 GMT > Location: > http://localhost:8080/entityhub/site/r2HR/entity?id=file:///C:/Users/Acer/Documents/Semantic/Stanbol/EntityPerson/Marry.Smith.rdf%23Marry_Smith > Accept: application/json > Content-Length: 0 > Server: Jetty(7.x.y-SNAPSHOT) > > When I put > http://localhost:8080/entityhub/site/r2HR/entity?id=file:///C:/Users/Acer/Documents/Semantic/Stanbol/EntityPerson/Marry.Smith.rdf%23Marry_Smith > in the browser address box I get > > HTTP ERROR: 500 > Problem accessing /entityhub/site/r2HR/entity. Reason: > Internal Server Error > > and the following messages in the monitor window: > > 25-Jun-2015 11:03:25 AM com.sun.jersey.spi.container.ContainerResponse write > SEVERE: The registered message body writers compatible with the MIME media > type are: > text/html; charset=utf-8 -> > org.apache.stanbol.commons.viewable.writer.impl.ViewableWriter > org.apache.stanbol.commons.web.rdfviewable.writer.impl.LdViewableWriter > */* -> > com.sun.jersey.core.impl.provider.entity.FormProvider > com.sun.jersey.core.impl.provider.entity.MimeMultipartProvider > com.sun.jersey.core.impl.provider.entity.StringProvider > com.sun.jersey.core.impl.provider.entity.ByteArrayProvider > com.sun.jersey.core.impl.provider.entity.FileProvider > com.sun.jersey.core.impl.provider.entity.InputStreamProvider > com.sun.jersey.core.impl.provider.entity.DataSourceProvider > com.sun.jersey.core.impl.provider.entity.XMLJAXBElementProvider$General > com.sun.jersey.core.impl.provider.entity.ReaderProvider > com.sun.jersey.core.impl.provider.entity.DocumentProvider > com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider > com.sun.jersey.core.impl.provider.entity.SourceProvider$SourceWriter > com.sun.jersey.server.impl.template.ViewableMessageBodyWriter > com.sun.jersey.core.impl.provider.entity.XMLRootElementProvider$General > com.sun.jersey.core.impl.provider.entity.XMLListElementProvider$General > > 25-Jun-2015 11:03:25 AM com.sun.jersey.spi.container.ContainerResponse > logException > SEVERE: Mapped exception to response: 500 (Internal Server Error) > javax.ws.rs.WebApplicationException: com.sun.jersey.api.MessageException: A > message body writer for Java class > org.apache.stanbol.entityhub.core.model.EntityImpl, and Java type cla > ss org.apache.stanbol.entityhub.core.model.EntityImpl, and MIME media type > text/html; charset=utf-8 was not found > at > com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.java:285) > at > com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1448) > at > com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1360) > at > com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1350) > at > com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416) > at > com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538) > at > com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) > at > org.apache.felix.http.base.internal.handler.ServletHandler.doHandle(ServletHandler.java:96) > at > org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:79) > at > org.apache.felix.http.base.internal.dispatch.ServletPipeline.handle(ServletPipeline.java:42) > at > org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:49) > at > org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:33) > at > org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:78) > at > org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:47) > at > org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:33) > at > org.apache.stanbol.commons.httpqueryheaders.impl.QueryHeadersFilter.doFilter(QueryHeadersFilter.java:75) > at > org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:88) > at > org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:76) > at > org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:47) > at > org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:33) > at > org.apache.stanbol.commons.web.resources.ResourceServingFilter.doFilterHttp(ResourceServingFilter.java:148) > at > org.apache.stanbol.commons.web.resources.ResourceServingFilter.doFilter(ResourceServingFilter.java:91) > at > org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:88) > at > org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:76) > at > org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:47) > at > org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:33) > at > org.apache.stanbol.commons.security.auth.AuthenticatingFilter$1.run(AuthenticatingFilter.java:163) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAsPrivileged(Unknown Source) > at > org.apache.stanbol.commons.security.auth.AuthenticatingFilter.doFilter(AuthenticatingFilter.java:159) > at > org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:88) > at > org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:76) > at > org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:47) > at > org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:33) > at > org.apache.felix.http.base.internal.dispatch.FilterPipeline.dispatch(FilterPipeline.java:48) > at > org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:39) > at > org.apache.felix.http.base.internal.DispatcherServlet.service(DispatcherServlet.java:67) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) > at > org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:654) > at > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:445) > at > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:225) > at > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1044) > at > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:372) > at > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189) > at > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:978) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) > at > org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255) > at > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) > at org.eclipse.jetty.server.Server.handle(Server.java:369) > at > org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:486) > at > org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:933) > at > org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:995) > 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:668) > 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(Unknown Source) > Caused by: com.sun.jersey.api.MessageException: A message body writer for > Java class org.apache.stanbol.entityhub.core.model.EntityImpl, and Java type > class org.apache.stanbol.enti > tyhub.core.model.EntityImpl, and MIME media type text/html; charset=utf-8 was > not found > ... 61 more > > Is > > file:///C:/Users/Acer/Documents/Semantic/Stanbol/EntityPerson/Marry.Smith.rdf%23Marry_Smith > > the ID that Stanbol uses for this entity? > > Neither Entityhub Lookup does not work with it : > > http://localhost:8080/entityhub/lookup?id=file:///C:/Users/Acer/Documents/Semantic/Stanbol/EntityPerson/Marry.Smith.rdf%23Marry_Smith > > produces > "No symbol found for > 'file:///C:/Users/Acer/Documents/Semantic/Stanbol/EntityPerson/Marry.Smith.rdf#Marry_Smith'. > " > > > Can anybody explain to me please what is the actual ID I should use? > > Thank you, > Adrian > > -- | Rupert Westenthaler rupert.westentha...@gmail.com | Bodenlehenstraße 11 ++43-699-11108907 | A-5500 Bischofshofen | REDLINK.CO .......................................................................... | http://redlink.co/