fadmaa / grefine-ckan-storage-extension Goto Github PK
View Code? Open in Web Editor NEWUpload data directly from within Google Refine to CKAN using CKAN storage API
Upload data directly from within Google Refine to CKAN using CKAN storage API
I build and run this extension under google refine 2.6(trunk version), I meet same error as
package with id {package id} doest not exist on http://localhost/api/rest/package
11:44:21.944 [ refine] POST /command/ckan-storage-extension/upload-to-ckan (15ms)
11:44:22.245 [ command] Exception caught (301ms)
java.lang.RuntimeException: Package with id testgood does not exist on http://localhost/api/rest/package
at com.google.refine.net.ckan.CkanApiProxy.addGroupOfResources(CkanApiProxy.java:116)
at com.google.refine.net.ckan.storage.commands.UploadToCKANCommand.doPost(UploadToCKANCommand.java:87)
at com.google.refine.RefineServlet.service(RefineServlet.java:179)
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:132)
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)
but when I use the archive binary files in google refine 2.5, I meet another error times and times
failed to upload file to CKAN Storage. A wrong API key maybe?
Do I forget any necessary configuration on my local ckan server?
In fact, the packaged extension can create new dataset to my local ckan server, but it won't upload the content of the dataset to my local server. It just create a empty dataset.
So I guess there is some hard coding issue in this extension. I really want to fix this, but right now, I even cannot build this extension successfully as you did.
Could you pay a little attention and investigate this tiny issue?
Thank you.
Hi, recently I want to use your google refine ckan extension in my project.
I found it does not work well, so I want to fork and fix it.
But, when I import this project to eclipse, I find something:
(1) some jar file dependency in path /Users/fadi/ , and it seems you forget to push them to github
(2) this project requires another project named "grefine-all", without "grefine-all", I can not build this project.
Could you check your codes and fix them( if necessary )?
Hi,
first of all thanks for creating this extension! I've just installed it into OpenRefine 2.6 beta for Linux, trying to upload a dataset to my CKAN 2.3a instance. I've changed the CKAN url to my own instance, kept the /api/rest/package path, pasted an existing dataset id and my API key, and ran into:
org.json.JSONException: A JSONObject text must begin with '{' at 1 [character 2 line 1]
at org.json.JSONTokener.syntaxError(JSONTokener.java:423)
at org.json.JSONObject.<init>(JSONObject.java:184)
at org.json.JSONObject.<init>(JSONObject.java:311)
at org.deri.orefine.ckan.StorageApiProxy.uploadFile(StorageApiProxy.java:40)
Looks more like a string conversion issue than some breaking API changes - will need to read through the code to see whether I can narrow it down further. Getting the same exception with google refine 2.5.
Hi there, I was wondering how is the extension coming along? Is it built using CKAN's package guidelines?
It's a great idea! :-)
Hi,
I'm using CKAN 2.7 in a VM and I installed this extension in my openRefine instance. The dialogs are ok, but when I set CKAN API URI to my CKAN instance and try to upload, an exception is raised.
A successful call is made to the CKAN API, as stated in the server log:
INFO [ckan.lib.base] /api/rest/package/my-dataset render time 0.007 s
When checking in the stack trace in OpenRefine, the following exception is raised:
java.lang.RuntimeException: failed to upload file to CKAN storage
(...)
at com.google.refine.net.ckan.StorageApiProxy.uploadFile(StorageApiProxy.java:33)
This is the referred line:
formFields = client.execute(getFormFields);
I noticed that it tries to execute a get command to: CKAN_STORAGE_BASE_URI + "/auth/form/file/" + fileLabel; and CKAN_STORAGE_BASE_URI is a final variable set to:
private static final String CKAN_STORAGE_BASE_URI = "http://datahub.io/api/storage";
It seems that I can't upload to my CKAN instance, since it tries to reach datahub.io. Is there any other place that I must configure so that I can upload to my CKAN instance?
I'm using OpenRefine in Windows 8 and exporting the files to an Ubuntu 14.04 VM through VirtualBox.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.