OpenRefine / OpenRefine/OpenRefine

Butterfly is still Initializing (Open Refine Never Starts)

Open
#2,236 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

error handling jython maintainability Platform: Windows Type: Bug
Dominant language
Java
Stars
12k
Forks
2.2k
Avg merge
1d 14h
Merged PRs (30d)
27

Description

Describe the bug
Application not starting properly.

To Reproduce
Steps to reproduce the behavior:

  1. Go to refine.bat
  2. Click on refine.bat
  3. Go to http://127.0.0.1:3333/ in the browser.
  4. See error: Butterfly is still initializing...

Current Results
C:\Users\Hayriye\Downloads\openrefine-win-3.1\openrefine-3.1>"C:\Program Files\Java\jdk-11.0.4\bin\java.exe" -cp "server\classes;server\target\lib*" -Xms1400M -Xmx1400M -Drefine.memory=1400M -Drefine.max_form_content_size=1048576 -Drefine.port=3333 -Drefine.host=127.0.0.1 -Drefine.webapp=main\webapp -Djava.library.path=server\target\lib/native/windows com.google.refine.Refine
11:56:30.653 [ refine_server] Starting Server bound to '127.0.0.1:3333' (0ms)
11:56:30.654 [ refine_server] refine.memory size: 1400M JVM Max heap: 1468006400 (1ms)
11:56:30.664 [ refine_server] Initializing context: '/' from 'C:\Users\Hayriye\Downloads\openrefine-win-3.1\openrefine-3.1\webapp' (10ms)
11:56:31.149 [ refine_server] Failed to use jdatapath to detect user data path: resorting to environment variables (485ms)
11:56:31.151 [ refine_server] Failed to use jdatapath to detect user data path: resorting to environment variables (2ms)
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Users/Hayriye/Downloads/openrefine-win-3.1/openrefine-3.1/server/target/lib/slf4j-log4j12-1.7.18.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/Users/Hayriye/Downloads/openrefine-win-3.1/openrefine-3.1/webapp/WEB-INF/lib/slf4j-log4j12-1.7.18.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
11:56:31.289 [ refine] Starting OpenRefine 3.1 [b90e413]... (138ms)
11:56:31.289 [ refine] initializing FileProjectManager with dir (0ms)
11:56:31.290 [ refine] C:\Users\Hayriye\AppData\Roaming\OpenRefine (1ms)
11:56:31.842 [ database-extension] Initializing OpenRefine Database... (552ms)
11:56:31.844 [ database-extension] Database Extension Mount point /extension/database/ [] (2ms)
11:56:31.844 [ database-extension] Registering Database Extension Commands...... (0ms)
11:56:31.852 [ database-extension] Database Extension Command Registeration done!! (8ms)
11:56:31.853 [ database-extension] Database Operations Registered successfully... (1ms)
11:56:31.853 [ database-extension] Database Functions Registered successfully... (0ms)
11:56:31.859 [ DatabaseModuleImpl] *** Database Extension Module Initialization Completed!!
** (6ms)
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.python.util.PythonInterpreter.(PythonInterpreter.java:100)
at org.python.util.PythonInterpreter.(PythonInterpreter.java:94)
at org.python.util.PythonInterpreter.(PythonInterpreter.java:71)
at com.google.refine.jython.JythonEvaluable.(JythonEvaluable.java:83)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:225)
at org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:85)
at org.mozilla.javascript.gen.file__C__Users_Hayriye_Downloads_openrefine_win_3_1_openrefine_3_1_webapp_extensions_jython_module_MOD_INF_controller_js_6._c_init_1(file:/C:/Users/Hayriye/Downloads/openrefine-win-3.1/openrefine-3.1/webapp/extensions/jython/module/MOD-INF/controller.js:46)
at org.mozilla.javascript.gen.file__C__Users_Hayriye_Downloads_openrefine_win_3_1_openrefine_3_1_webapp_extensions_jython_module_MOD_INF_controller_js_6.call(file:/C:/Users/Hayriye/Downloads/openrefine-win-3.1/openrefine-3.1/webapp/extensions/jython/module/MOD-INF/controller.js)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:405)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3508)
at org.mozilla.javascript.gen.file__C__Users_Hayriye_Downloads_openrefine_win_3_1_openrefine_3_1_webapp_extensions_jython_module_MOD_INF_controller_js_6.call(file:/C:/Users/Hayriye/Downloads/openrefine-win-3.1/openrefine-3.1/webapp/extensions/jython/module/MOD-INF/controller.js)
at edu.mit.simile.butterfly.ButterflyModuleImpl.scriptInit(ButterflyModuleImpl.java:636)
at edu.mit.simile.butterfly.ButterflyModuleImpl.init(ButterflyModuleImpl.java:94)
at edu.mit.simile.butterfly.Butterfly.initializeModule(Butterfly.java:476)
at edu.mit.simile.butterfly.Butterfly.configure(Butterfly.java:451)
at edu.mit.simile.butterfly.Butterfly.init(Butterfly.java:308)
at org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:440)
at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:263)
at com.google.refine.RefineServer.configure(Refine.java:291)
at com.google.refine.RefineServer.init(Refine.java:203)
at com.google.refine.Refine.init(Refine.java:109)
at com.google.refine.Refine.main(Refine.java:103)
Caused by: java.lang.IllegalArgumentException: Cannot create PyString with non-byte value
at org.python.core.PyString.(PyString.java:57)
at org.python.core.PyString.(PyString.java:70)
at org.python.core.PyString.(PyString.java:74)
at org.python.core.Py.newString(Py.java:647)
at org.python.core.PyJavaType.init(PyJavaType.java:585)
at org.python.core.PyType.createType(PyType.java:1523)
at org.python.core.PyType.addFromClass(PyType.java:1462)
at org.python.core.PyType.fromClass(PyType.java:1551)
at org.python.core.PyObject.(PyObject.java:93)
at org.python.core.PySingleton.(PySingleton.java:9)
at org.python.core.PyNotImplemented.(PyNotImplemented.java:10)
at org.python.core.Py.(Py.java:94)
... 27 more

Expected behavior
I expect to be able to start OpenRefine :)

Screenshots
Not necessary

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser Version: Firefox 70 (The same in Edge, Opera, Chrome, IE)
  • JRE or JDK Version: java version "11.0.4" 2019-07-16 LTS

OpenRefine (please complete the following information):

  • OpenRefine 3.1 (Tried other versions all the same)

Datasets

Additional context

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the OpenRefine startup path in Refine.java and RefineServer.java, then follow ButterflyModuleImpl initialization into the jython module controller.js. Reproduce the Windows 10 failure with Java 11 and compare it with the reported JythonEvaluable and PyString stack trace. Done means OpenRefine starts without the Butterfly initialization error.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.