OpenRefine / OpenRefine/sample-extension
Sample extension's About page errors
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 5
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Description
The About page for the sample extension fails to render.
To Reproduce
Steps to reproduce the behavior:
Current Results
(From new Butterfly error page for improve readability)
HTTP ERROR 500 Butterfly Error Butterfly caught the following error while processing the request:
URI: | /extension/sample/ -- | -- 500 Butterfly Error Butterfly caught the following error while processing the request: refine org.mozilla.javascript.EcmaError: TypeError: Cannot call property stringArrayLength in object [JavaPackage com.google.refine.sampleExtension.SampleUtil]. It is not a function, it is "object". (file:/Users/tfmorris/git/OpenRefine2/main/webapp/../../extensions/sample/module/MOD-INF/controller.js#75)Caused by:
org.mozilla.javascript.EcmaError: TypeError: Cannot call property stringArrayLength in object [JavaPackage com.google.refine.sampleExtension.SampleUtil]. It is not a function, it is "object". (file:/Users/tfmorris/git/OpenRefine2/main/webapp/../../extensions/sample/module/MOD-INF/controller.js#75) at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:4563) at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:4544) at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:4576) at org.mozilla.javascript.ScriptRuntime.typeErrorById(ScriptRuntime.java:4581) at org.mozilla.javascript.ScriptRuntime.notFunctionError(ScriptRuntime.java:4662) at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThisHelper(ScriptRuntime.java:2585) at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThis(ScriptRuntime.java:2568) at org.mozilla.javascript.gen.file__Users_tfmorris_git_OpenRefine2_main_webapp_______extensions_sample_module_MOD_INF_controller_js_18._c_process_2(file:/Users/tfmorris/git/OpenRefine2/main/webapp/../../extensions/sample/module/MOD-INF/controller.js:75) at org.mozilla.javascript.gen.file__Users_tfmorris_git_OpenRefine2_main_webapp_______extensions_sample_module_MOD_INF_controller_js_18.call(file:/Users/tfmorris/git/OpenRefine2/main/webapp/../../extensions/sample/module/MOD-INF/controller.js) at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:380) at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3868) at org.mozilla.javascript.gen.file__Users_tfmorris_git_OpenRefine2_main_webapp_______extensions_sample_module_MOD_INF_controller_js_18.call(file:/Users/tfmorris/git/OpenRefine2/main/webapp/../../extensions/sample/module/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:535) at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:472) at edu.mit.simile.butterfly.ButterflyModuleImpl.processScript(ButterflyModuleImpl.java:654) at edu.mit.simile.butterfly.ButterflyModuleImpl.process(ButterflyModuleImpl.java:427) at edu.mit.simile.butterfly.Butterfly.service(Butterfly.java:524) at com.google.refine.RefineServlet.service(RefineServlet.java:217) at javax.servlet.http.HttpServlet.service(HttpServlet.java:750)
Expected Behavior
Velocity template renders correctly.
Versions
- OpenRefine: 3.7 and current HEAD of master (not sure how far back it goes)
Additional context
At first glance it looks like perhaps the SampleUtil class isn't getting compiled or packaged in the right place.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at extensions/sample/module/MOD-INF/controller.js line 75 and inspect how it calls com.google.refine.sampleExtension.SampleUtil. Then check where SampleUtil is compiled or packaged, since the error shows it is exposed as a JavaPackage rather than the expected class. Done means visiting /extension/sample/ renders the About page's Velocity template without an HTTP 500 error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, javascript
- Domain
- backend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100