|
From: Mike P. <mi...@sy...> - 2015-09-14 14:07:19
|
>> After running a sample application which calls:
FunctionRegistry.Factory factory = new MyFunctionFactory();
URI myFunctionURI = new URIImpl("https://www.ebi.ac.uk/chembl/chox#validate
");
FunctionRegistry.add(myFunctionURI, factory);
Are you calling that from client code? It needs to be called on the
server, usually when the server is initialized (see
BigdataRDFServletContextListener::contextInitialized).
On Mon, Sep 14, 2015 at 1:30 AM, andreas81_81 <and...@o2...> wrote:
> Hi all,
>
> I have blazegraph 1.5.2 running on my machine (Windows, bundled version)
> and I've written sample java application (based on the information on
> blazegraph wiki page) but it does not work. My custom function is exactly
> the same as provied on the page (security filter), the function is
> registered, the query seems to be correct ... but blazegraph is unable to
> find the registered function. I'm running blazegraph with the following
> command:
> java -classpath
> d:\dev\Blazegraph\org.lhasalimited.blazegraph\target\classes\ -server
> -Xmx4g -jar bigdata-bundled.jar
>
> (the directory contains class with my custom function). After running a
> sample application which calls:
> FunctionRegistry.Factory factory = new MyFunctionFactory();
> URI myFunctionURI = new URIImpl("
> https://www.ebi.ac.uk/chembl/chox#validate");
> FunctionRegistry.add(myFunctionURI, factory);
>
> The application throws:
>
> java.util.concurrent.ExecutionException:
> java.util.concurrent.ExecutionException:
> org.openrdf.query.QueryEvaluationException: java.lang.RuntimeException:
> java.util.concurrent.ExecutionException: java.lang.RuntimeException:
> java.util.concurrent.ExecutionException: java.lang.Exception:
> task=ChunkTask{query=2125bb5c-9355-4482-8b52-c3036fe60744,bopId=1,partitionId=-1,sinkId=3,altSinkId=null},
> cause=java.util.concurrent.ExecutionException: java.lang.RuntimeException:
> java.lang.UnsupportedOperationException: unknown function:
> https://www.ebi.ac.uk/chembl/chox#validate
> at java.util.concurrent.FutureTask.report(FutureTask.java:122)
> at java.util.concurrent.FutureTask.get(FutureTask.java:188)
> at
> com.bigdata.rdf.sail.webapp.BigdataServlet.submitApiTask(BigdataServlet.java:261)
> at
> com.bigdata.rdf.sail.webapp.QueryServlet.doSparqlQuery(QueryServlet.java:532)
> at
> com.bigdata.rdf.sail.webapp.QueryServlet.doPost(QueryServlet.java:189)
> at com.bigdata.rdf.sail.webapp.RESTServlet.doPost(RESTServlet.java:237)
> at
> com.bigdata.rdf.sail.webapp.MultiTenancyServlet.doPost(MultiTenancyServlet.java:137)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
> at
> org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:769)
> at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
> at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
> at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:595)
> at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
> at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1125)
> at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
> at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
> at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1059)
> at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
> at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:191)
> at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:72)
> at
> com.bigdata.rdf.sail.webapp.HALoadBalancerServlet.forwardToLocalService(HALoadBalancerServlet.java:938)
> at
> com.bigdata.rdf.sail.webapp.HALoadBalancerServlet.service(HALoadBalancerServlet.java:816)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
> at
> org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:769)
> at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
> at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
> at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
> at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
> at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1125)
> at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
> at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
> at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1059)
> at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
> at
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
> at
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
> at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
> at org.eclipse.jetty.server.Server.handle(Server.java:497)
> at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
> at
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:248)
> at
> org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:610)
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:539)
> at java.lang.Thread.run(Thread.java:745)
>
>
> Do you have any idea what i'm doing wrong?
>
>
>
>
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Bigdata-developers mailing list
> Big...@li...
> https://lists.sourceforge.net/lists/listinfo/bigdata-developers
>
>
|