fadmaa / grefine-rdf-extension

An extension to Google Refine that enables graphical mapping of Google Refine project data to an RDF skeleton and then exporting it in RDF format
http://refine.deri.ie
Other
94 stars 55 forks source link

java.lang.NullPointerException at java.net.URLDecoder.decode(URLDecoder.java:136) #86

Open ralphlevan opened 10 years ago

ralphlevan commented 10 years ago

I'm working my way through the book Using OpenRefine and they use your RDF extension to connect to the LCSH sparql endpoint. When I ask OpenRefine to start reconciling at LCSH, I get the error below. OpenRefine then declares that it can't suggest any type for my data.

error reconciling 'Pearl shells' (624ms) java.lang.NullPointerException at java.net.URLDecoder.decode(URLDecoder.java:136) at com.hp.hpl.jena.sparql.util.Convert.decWWWForm(Convert.java:75) at com.hp.hpl.jena.sparql.engine.http.HttpQuery.execCommon(HttpQuery.java:298) at com.hp.hpl.jena.sparql.engine.http.HttpQuery.execGet(HttpQuery.java:202) at com.hp.hpl.jena.sparql.engine.http.HttpQuery.exec(HttpQuery.java:157) at com.hp.hpl.jena.sparql.engine.http.QueryEngineHTTP.execSelect(QueryEngineHTTP.java:161) at org.deri.grefine.reconcile.rdf.executors.VirtuosoRemoteQueryExecutor.sparql(VirtuosoRemoteQueryExecutor.java:24) at org.deri.grefine.reconcile.rdf.endpoints.QueryEndpointImpl.reconcileEntities(QueryEndpointImpl.java:38) at org.deri.grefine.reconcile.rdf.RdfReconciliationService.reconcile(RdfReconciliationService.java:69) at org.deri.grefine.reconcile.model.AbstractReconciliationService.reconcile(AbstractReconciliationService.java:48) at org.deri.grefine.reconcile.ServiceRegistry.multiReconcile(ServiceRegistry.java:117) at org.deri.grefine.reconcile.GRefineServiceManager.multiReconcile(GRefineServiceManager.java:94) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:161) at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:247) at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:76) at org.mozilla.javascript.gen.c2._c5(file:/C:/Users/levan/AppData/Roaming/OpenRefine/extensions/rdf-extension/MOD-INF/controller.js:204) at org.mozilla.javascript.gen.c2.call(file:/C:/Users/levan/AppData/Roaming/OpenRefine/extensions/rdf-extension/MOD-INF/controller.js) at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:398) at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3065) at org.mozilla.javascript.gen.c2.call(file:/C:/Users/levan/AppData/Roaming/OpenRefine/extensions/rdf-extension/MOD-INF/controller.js) at edu.mit.simile.butterfly.ButterflyModuleImpl$Controller.process(ButterflyModuleImpl.java:399) at edu.mit.simile.butterfly.ButterflyModuleImpl$Controller.run(ButterflyModuleImpl.java:377) at org.mozilla.javascript.Context.call(Context.java:515) at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:507) at edu.mit.simile.butterfly.ButterflyModuleImpl.processScript(ButterflyModuleImpl.java:650) at edu.mit.simile.butterfly.ButterflyModuleImpl.process(ButterflyModuleImpl.java:427) at edu.mit.simile.butterfly.Butterfly.service(Butterfly.java:516) at com.google.refine.RefineServlet.service(RefineServlet.java:200) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166) at org.mortbay.servlet.UserAgentFilter.doFilter(UserAgentFilter.java:81) at org.mortbay.servlet.GzipFilter.doFilter(GzipFilter.java:155) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:938) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:722)

tfmorris commented 10 years ago

Have you verified that the SPARQL endpoint is still available? At a glance, it looks like the code could behave like this if it got a null response back.

ralphlevan commented 10 years ago

Excellent theory! http://sparql.freeyourmetadata.org/authorities-processed/ throws a 404.

tfmorris commented 10 years ago

Sounds like Jena's error handling isn't very robust. The error message:

The requested URL was not found    URI  = '/sparqlauthorities-processed/'

(note the presumably missing slash after "sparql") makes it look like a routing/mapping file for the web site is messed up.

There's a SPARQL endpoint at http://sparql.freeyourmetadata.org/ which looks like it's got some LCSH data in it. You might try that to see if it has what you need.