From: Bryan T. <br...@sy...> - 2015-09-14 13:00:32
|
Andreas, The basic issue here is that the custom function registrations are not sticky. They need to be made within the server each time the server starts. For applications that embed blazegraph, you just do this from your code when you start the server and before submitting any queries. For the server version, you do this by extending the BigdataRDFServletContextListener and specifying your version of that class (which must extend ours) in web.xml. Your version just overrides contextInitialized(). Igor is going to update the documentation to further clarify this as it has lead to some confusion recently. Thanks, Bryan ---- Bryan Thompson Chief Scientist & Founder SYSTAP, LLC 4501 Tower Road Greensboro, NC 27410 br...@sy... http://blazegraph.com http://blog.bigdata.com <http://bigdata.com> http://mapgraph.io Blazegraph™ <http://www.blazegraph.com/> is our ultra high-performance graph database that supports both RDF/SPARQL and Tinkerpop/Blueprints APIs. Blazegraph is now available with GPU acceleration using our disruptive technology to accelerate data-parallel graph analytics and graph query. CONFIDENTIALITY NOTICE: This email and its contents and attachments are for the sole use of the intended recipient(s) and are confidential or proprietary to SYSTAP. Any unauthorized review, use, disclosure, dissemination or copying of this email or its contents or attachments is prohibited. If you have received this communication in error, please notify the sender by reply email and permanently delete all copies of the email and its contents and attachments. On Mon, Sep 14, 2015 at 3: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 > > |