Coder Social home page Coder Social logo

Comments (35)

AtesComp avatar AtesComp commented on June 17, 2024 1

UPDATE: While the current main is a WIP (as of 5/7/22), I've removed the RDF4J library use and dependencies and moved the functionality to Jena. There were some interesting trade-offs.

  1. The Jena code base need some serious updates to the user docs and in-code comments.
  2. The removal of the RDF4J dependency has drastically reduced the "compiled" distribution file...it's approximately 1/3rd the size.

That was a BLOAT-load of code!

Concerning the issue, I did find that the code was trying to load from the Internet the nonexistent XMLSchema ontology file. XMLSchema is built into RDF but the prefix, of course, still needs to be declared. This led me to fact that the code doesn't differentiate between no load, web load, and file load prefixed namespaces once established. However, the system currently periodically tries to reload from the web the ontologies in the prefixed namespaces to update them. I'M GONNA KILL THAT!
Once established, ontologies should not be changing much any way. If the are still in flux, the user probably already knows that and can update manually. Since the ontologies just provide hints to the user via Lucene, I see this as no big deal. The prefix manager lets you remove, add, and "refresh" the namespaces by hand. So:

  1. No Load - it's just a prefix and related namespace
  2. Web Load - you can refresh in the manager. I'll put an "Are you sure?" on it as well.
  3. File Load - you can delete and re-add the updated file

We've seen the An IRI is required! The given IRI is invalid. due to the extension failing to initialize. We've seen this on a few Linux boxes as well as Windows. The failure can be seen in the browser's dev tools as a failure to connect the client side JavaScript to the Butterfly (Java) Server and the extension...what you were getting. This may be due to the XMLSchema fail--I have not confirmed. The Jena HTTP connector clearly shows the error in the server console as processing warnings and errors. There is a website at the location for XMLSchema but it's not an RDF file.

from rdf-transform.

AtesComp avatar AtesComp commented on June 17, 2024 1

Thanks for all the the feedback and time spent.

I am so happy to see that RDF Transform has finally vomited all over the log!

As for all the other stuff...

Agreed--Java is a mess...and for many more reasons than you list.

For all product versions, the JRE is included in the JDK. The JRE does work...it's the JRE in the JDK that runs the program. See this explanation. When you run "java" or "java.exe", you are running the JRE. And to confuse things ever further, it's really the JVM.

As you found, past Java 8, they no longer bundled the JRE separately. To extract it, a developer needs to use the "jlink" tool to bundle the JRE with specific libs to their software. This does us no good since all the extensions for OpenRefine rely on the JRE used to run OpenRefine and, therefore, the underlying Java install.

That's why no one talks about the JDK separate from the JRE. It's just Java 8, Java 11, etc.

This is also why there is only an OpenJDK and not an OpenJRE.

Even Oracle is unclear on the subject. If you search for the JRE on the Java site, they take you to the JDK...with no explaination! WTF!

Technically, OpenRefine and its extensions (including RDF Transform) only require the JRE. But, how to get just it for an install???. Generally, you can't, so you install the whole damn JDK. If you want, you can try downloading just the JRE at JustJ from Eclipse. Now, look how confusing that is going to be: Base? Complete? Minimal? The stripped version? How will that affect debugging? I'm not about to write a primer on Java installs (even though this issue just about covers it).

I didn't pick the language either. I just wanted the RDF extension to have all the modern stuff I needed. I ended up doing a complete rewrite...and then decided to share it. The install documentation is what it is. I feel your same frustration...daily.

Your contribution was not a complete waste of time. I found it quite valuable. It led to corrections that needed to be covered. You can see some of the results at the bottom of the code page under Issues.

from rdf-transform.

RolfBly avatar RolfBly commented on June 17, 2024

I don't know if this matters, but the error appears as soon as the Edit pane comes up, i.e. before selecting any preview or export.

Also, please note I'm running openrefine.EXE with JRE, not openrefine.bat, as happens with the Linux install.

So should I use the JDK instead? I decided to try first and then ask if no worky.

So I installed JDK v 17 (from adoptium, as recommended in the OR tech doc), and I set a JAVA_HOME env variable.

The .bat now proceeds, but errors:

 HTTP ERROR 500 java.lang.NoSuchMethodError: 'void org.eclipse.rdf4j.repository.Repository.init()'

Full error message in the .txt file.
JDK_error.txt

from rdf-transform.

AtesComp avatar AtesComp commented on June 17, 2024

The first error:
ERROR: Could not retrieve default namespaces
is due to a lack of Internet accessibility to retrieve the namespace ontology files. This is due to the foreign site being down / inability to locate it online. There is an option to have it retrieved from a local file for closed systems or not retrieve at all. Retrieval is used to populate the local Lucene store for easy type and property selection. It's not a fatal error, you just don't get suggestions.

The second error:
An IRI is required! The given IRI is invalid: ...
is likely related to the first and is either not printing the proper error or has a logic error.

The third error:
HTTP ERROR 500 java.lang.NoSuchMethodError:
is unknown. The init() method for the repository class in RDF4J is valid and should be present. The library is in the build...included via maven. Switching to the JDK may affect the running code if it can't locate the lib files for the extension.

from rdf-transform.

RolfBly avatar RolfBly commented on June 17, 2024

Re first & second error: I don't see how internet accessibility could be the cause here, as (1) this problem does not occur in Linux on the same machine, (2) I can access those namespaces from the browser directly without any problem.

I appreciate that supporting multiple OS's can be a burden. So the question is really if you want to put effort into supporting the Windows version? If yes, perhaps we should concentrate on debugging the recommended windows install, that is, with JRE, not JDK. I can try the debugging options that OR provides. If no, that's fine too, I'll just stick with the Linux install.

from rdf-transform.

AtesComp avatar AtesComp commented on June 17, 2024

Re First & Second Error: On a Linux system, I've witnessed the error on a few of the namespace sites being down during "maintenance" periods...times of the day when normal, sane people would be sleeping. The down time is relatively short. I've checked with a browser as well and seen both 404s and successes within a short time after the error. Sporadic congestion could also be a factor. Regardless...

I'm all for supporting all OSs, so keep up the testing. I appreciate all the input I can get. Thanks for the contributions.

Test with Latest Code:

  1. Get the latest code, compile, and run. I've enhanced the code to do a little more debugging for this issue.
  2. Turn on the OpenRefine preference: "RDFTransform.debug" set to "true". This will dump debug messages (a ton of them) to help narrow down the issue.
  3. Create or Open a new project that has not used RDF Transform and start RDF Transform.
  4. During the initialization, look for the following in the server console:
  5. If you see "Loading predefined vocabularies failed: ", then the extension can't find the "PredefinedVocabs" file.
  6. If not, if you see "ERROR: Project metadata save failed: ", then the extension can't create the "VocabulariesMeta.json" file.
  7. If not, it found and loaded the "VocabulariesMeta.json", then later you should see...
    1. "Getting default namespaces"
    2. "Existing namespaces: size=" which should be 0
    3. "Predefined namespaces: size=" which should be the number of namespaces from the "PredefinedVocabs" file.
    4. It should then import each prefixed namespace with " Prefix: " messages from its URL into Lucene.
    1. "DEBUG: Import And Index vocabulary "... "from " URL messages.
    2. Errors here, deal with the URL access and Lucene indexing...
    3. "ERROR: Importing vocabulary: " for URL errors
    4. "ERROR: Processing vocabulary: " for index errors

That should narrow down the issue.

A good initialize should look something like:

15:05:40.430 [          RDFT:Controller] Initializing RDFTransform Extension... (4735ms)
15:05:40.431 [          RDFT:Controller]   Ext Mount Point: /extension/rdf-transform/ [*] (1ms)
15:05:40.459 [          RDFT:AppContext] Init: Host=127.0.0.1, IFace=<undef>, Port=3333 (28ms)
15:05:40.987 [      RDFT:PredefVocabMgr] Attempting vocabulary reconstruct... (528ms)
15:05:40.991 [          RDFT:Vocabulary] DEBUG: Prefix:[rdf] Namespace:[http://www.w3.org/1999/02/22-rdf-syntax-ns#] (4ms)
15:05:40.991 [          RDFT:Vocabulary] DEBUG: Prefix:[rdfs] Namespace:[http://www.w3.org/2000/01/rdf-schema#] (0ms)
15:05:40.991 [          RDFT:Vocabulary] DEBUG: Prefix:[owl] Namespace:[http://www.w3.org/2002/07/owl#] (0ms)
15:05:40.991 [          RDFT:Vocabulary] DEBUG: Prefix:[xsd] Namespace:[http://www.w3.org/2001/XMLSchema#] (0ms)
15:05:40.992 [          RDFT:Vocabulary] DEBUG: Prefix:[vcard] Namespace:[http://www.w3.org/2006/vcard/ns#] (1ms)
15:05:40.992 [          RDFT:Vocabulary] DEBUG: Prefix:[foaf] Namespace:[http://xmlns.com/foaf/0.1/] (0ms)
15:05:40.992 [      RDFT:PredefVocabMgr] ...reconstructed (0ms)
15:05:41.000 [          RDFT:AppContext] Init: Completed (8ms)

from rdf-transform.

AtesComp avatar AtesComp commented on June 17, 2024

For Error 2:
You should see a "Validating IRI: "...message. There are 2 different messages depending on the error.

  1. "Validating IRI: Failure "... indicates a ParseIRI() call failed in the RDF4J lib
  2. "Validating IRI: ExceptionError" indicates some other exception.

from rdf-transform.

RolfBly avatar RolfBly commented on June 17, 2024

TL;DR: it doesn't initialize properly:

16:14:21.453 [         butterfly.module] Error initializing module rdf-transform by script function init() (9ms)

I built rdf-transform-2.0.4.zip under WSL/Ubuntu following the short instruction.

Aside: for requirements, you should probably say "java 11" or a range, but not java 11+. I had first installed JDK v 17, but that ran in to this error; then I read this and this, removed JDK 17, installed 11, reinstalled Maven, and then it compiled OK.

Anyway. You don't have different versions for different OS's, so I reasoned that the module built under Linux should work under Windows as well.

Installed it in my Windows workspace.
Set OpenRefine preference: "RDFTransform.debug" to "true", created new project from clipboard, clicked RDF-Transform, same problem. It fails to initialise:

16:14:13.484 [            refine_server] Starting Server bound to '127.0.0.1:3333' (0ms)
16:14:13.530 [            refine_server] Initializing context: '/' from 'C:\Users\<Me>\Downloads\openrefine-3.5.2\webapp' (46ms)
16:14:15.197 [                   refine] Starting OpenRefine 3.5.2 [e3efd4e]... (1667ms)
16:14:15.197 [                   refine] initializing FileProjectManager with dir (0ms)
16:14:15.198 [                   refine] C:\Users\<Me>\AppData\Roaming\OpenRefine (1ms)
16:14:21.443 [          RDFT:Controller] Initializing RDF Transform Extension... (6245ms)
16:14:21.444 [          RDFT:Controller]   Ext Mount Point: /extension/rdf-transform/ [*] (1ms)
16:14:21.453 [         butterfly.module] Error initializing module rdf-transform by script function init() (9ms)

Full cmd output attached.

Unfortunately, I can't spend much more time on this. For now, I'll use the Linux install.

RDFTransform_log.txt

from rdf-transform.

AtesComp avatar AtesComp commented on June 17, 2024

Thanks. I've updated the documentation as per the OpenRefine reference to Java versions and add the Maven requirement. I added up to Java 16 due to the test shown below.

As a test, I used an older Windows 10 x86 (32 bit) VM. I used:

  • Java 16 (OpenJDK16U-jdk_x886-32_windows_hotspot_16.0.2_7)
  • Maven 3.8.5
  • OpenRefine 3.5.2

It successfully compiled and I set it up to run. It seems to load OK:

17:38:10.802 [            refine_server] Starting Server bound to '127.0.0.1:3333' (0ms)
17:38:11.018 [            refine_server] Initializing context: '/' from 'C:\Users\<user>\Documents\Dev\openrefine-3.5.2\webapp' (216ms)
17:38:19.158 [                   refine] Starting OpenRefine 3.5.2 [e3efd4e]... (8140ms)
17:38:19.159 [                   refine] initializing FileProjectManager with dir (1ms)
17:38:19.160 [                   refine] C:\Users\<user>\AppData\Roaming\OpenRefine (1ms)
17:38:31.354 [          RDFT:Controller] Initializing RDF Transform Extension... (12194ms)
17:38:31.355 [          RDFT:Controller]   Ext Mount Point: /extension/rdf-transform/ [*] (1ms)
17:38:31.397 [             RDFT:InitCmd] Initializing... (42ms)
17:38:31.411 [          RDFT:AppContext] Initializing Context... (14ms)
17:38:31.413 [          RDFT:AppContext] Init: Host=localhost, IFace=<undef>, Port=3333 (2ms)
17:38:32.971 [      RDFT:PredefVocabMgr] Attempting vocabulary reconstruct... (1558ms)
...
17:38:33.832 [          RDFT:Controller] DebugMode Test: true true (22ms)
17:38:33.842 [          RDFT:Controller] Preferences: { Verbosity : 0 , ExportLimit : 10737418 , DebugMode : true } (10ms)
17:38:33.842 [          RDFT:Controller] ...RDF Transform Extension initialized. (0ms)
...

Then, I deleted the extension, downloaded the rdf-transform-2.0.3.zip, and set it up to run. It seems to load OK as well (without the updated debug messages of course):

17:45:27.370 [            refine_server] Starting Server bound to '127.0.0.1:3333' (0ms)
17:45:27.433 [            refine_server] Initializing context: '/' from 'C:\Users\<user>\Documents\Dev\openrefine-3.5.2\webapp' (63ms)
17:45:31.331 [                   refine] Starting OpenRefine 3.5.2 [e3efd4e]... (3898ms)
17:45:31.332 [                   refine] initializing FileProjectManager with dir (1ms)
17:45:31.332 [                   refine] C:\Users\<user>\AppData\Roaming\OpenRefine (0ms)
17:45:42.866 [          RDFT:Controller] Initializing RDFTransform Extension... (11534ms)
17:45:42.868 [          RDFT:Controller]   Ext Mount Point: /extension/rdf-transform/ [*] (2ms)
17:45:42.936 [          RDFT:AppContext] Init: Host=localhost, IFace=<undef>, Port=3333 (68ms)
17:45:44.595 [      RDFT:PredefVocabMgr] Attempting vocabulary reconstruct... (1659ms)
...
17:45:45.328 [          RDFT:Controller] DebugMode Test: true true (15ms)
17:45:45.337 [          RDFT:Controller] Preferences: { Verbosity : 0 , ExportLimit : 10737418 , DebugMode : true } (9ms)

So, a Linux compiled Java 11 version of RDF Transform unzipped on a Windows 10 x86 (32 bit) OS seems to at least load properly.

At the moment, I have no idea why it won't initialize on your Windows 10 system. I even deleted and reinstalled between both versions in the extensions directory just to make sure. Nothing failed. Very odd.

from rdf-transform.

RolfBly avatar RolfBly commented on June 17, 2024

I guess a 64-bit build under Windows is up next? I'm willing to try, but I can't promise when, unfortunately.

from rdf-transform.

AtesComp avatar AtesComp commented on June 17, 2024

Java doesn't distinguish the bit arch as it's bytecode compiled. Notice that the 64 bit Linux compiled version ran on the 32 bit Windows 10 OS.

I suspect you have some Java environment variable that is redirecting library use to some version not in the extension's library. Check your user and system environment variables for any Java redirection. Variables could also be set directly by a cmd or powershell session configuration.

from rdf-transform.

RolfBly avatar RolfBly commented on June 17, 2024

On another "old" machine with Windows 10 Pro v19044.1586, I installed
openjdk version "17.0.3" 2022-04-19
OpenJDK Runtime Environment Temurin-17.0.3+7 (build 17.0.3+7)
OpenJDK 64-Bit Server VM Temurin-17.0.3+7 (build 17.0.3+7, mixed mode, sharing)
setting JAVA_HOME for it.
Also installed OpenRefine 3.5.2, and rdf-transform 2.0.4.

That worked. It took a very long time to load, but that seemed to improve as I went along.

So I went back to "new" machine, threw the JRE off , made sure all references to java were gone from my environment, then installed the same JDK there, setting JAVA_HOME in the process. Same as on the old one.

Try again. As soon as I run openrefine.exe, it does initialize rdf-transform, but then tries to resolve an rdf vocabulary link (I think the first in the list of the default vocabularies), it gives me the same error we saw 4 days ago.

I then threw the JDK off again and re-installed the JRE as per OR's instruction.

from rdf-transform.

AtesComp avatar AtesComp commented on June 17, 2024

Thanks for all the testing.

Question

I then threw the JDK off again and re-installed the JRE as per OR's instruction.

Does this mean that it works with the JRE as per OR's instructions?

The error really has me stumped. On the second and subsequent runs, the vocabularies should already be loaded and not need to download and process anything. See this next section...

Vocabulary Load Time

When RDF Transform loads for the first time, it may take a while as it's downloading the vocabularies from online and creating the shared lucene database. It generally takes under 30 sec to load but that depends on the Internet connection, CPU, and disk speed. For an example run, the "Import And Index vocabulary..." processing indicates:

20:27:57.718 [      RDFT:PredefVocabMgr] Attempting vocabulary reconstruct... (330ms)
20:27:57.718 [      RDFT:PredefVocabMgr] ...missing local, adding remote... (0ms)
20:27:57.725 [       RDFT:VocabSearcher] DEBUG: Import And Index vocabulary rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> from http://www.w3.org/1999/02/22-rdf-syntax-ns# (7ms)
20:28:01.407 [          RDFT:Vocabulary] DEBUG: Prefix:[rdf] Namespace:[http://www.w3.org/1999/02/22-rdf-syntax-ns#] (3682ms)
20:28:01.408 [       RDFT:VocabSearcher] DEBUG: Import And Index vocabulary rdfs: <http://www.w3.org/2000/01/rdf-schema#> from http://www.w3.org/2000/01/rdf-schema# (1ms)
20:28:01.861 [          RDFT:Vocabulary] DEBUG: Prefix:[rdfs] Namespace:[http://www.w3.org/2000/01/rdf-schema#] (453ms)
20:28:01.861 [       RDFT:VocabSearcher] DEBUG: Import And Index vocabulary owl: <http://www.w3.org/2002/07/owl#> from http://www.w3.org/2002/07/owl# (0ms)
20:28:05.083 [          RDFT:Vocabulary] DEBUG: Prefix:[owl] Namespace:[http://www.w3.org/2002/07/owl#] (3222ms)
20:28:05.083 [       RDFT:VocabSearcher] DEBUG: Import And Index vocabulary xsd: <http://www.w3.org/2001/XMLSchema#> from http://www.w3.org/2001/XMLSchema# (0ms)
20:28:05.468 [          RDFT:Vocabulary] DEBUG: Prefix:[xsd] Namespace:[http://www.w3.org/2001/XMLSchema#] (385ms)
20:28:05.468 [       RDFT:VocabSearcher] DEBUG: Import And Index vocabulary vcard: <http://www.w3.org/2006/vcard/ns#> from http://www.w3.org/2006/vcard/ns# (0ms)
20:28:08.033 [          RDFT:Vocabulary] DEBUG: Prefix:[vcard] Namespace:[http://www.w3.org/2006/vcard/ns#] (2565ms)
20:28:08.033 [       RDFT:VocabSearcher] DEBUG: Import And Index vocabulary foaf: <http://xmlns.com/foaf/0.1/> from http://xmlns.com/foaf/spec/index.rdf (0ms)
20:28:11.874 [          RDFT:Vocabulary] DEBUG: Prefix:[foaf] Namespace:[http://xmlns.com/foaf/0.1/] (3841ms)
20:28:11.876 [      RDFT:PredefVocabMgr] ...reconstructed (2ms)

...about 14 seconds.

On a project load, it can do the same:

20:36:56.428 [        RDFT:RDFTransform] Getting namespaces... (1ms)
20:36:56.428 [     RDFT:NSGetDefaultCmd] DEBUG: Existing namespaces: size=6 (0ms)
20:36:56.429 [     RDFT:NSGetDefaultCmd]   Prefix: rdf  Namespace: http://www.w3.org/1999/02/22-rdf-syntax-ns# (1ms)
20:36:56.433 [       RDFT:VocabSearcher] DEBUG: Import And Index vocabulary rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> from http://www.w3.org/1999/02/22-rdf-syntax-ns# (4ms)
20:36:59.537 [     RDFT:NSGetDefaultCmd]   Prefix: rdfs  Namespace: http://www.w3.org/2000/01/rdf-schema# (3104ms)
20:36:59.537 [       RDFT:VocabSearcher] DEBUG: Import And Index vocabulary rdfs: <http://www.w3.org/2000/01/rdf-schema#> from http://www.w3.org/2000/01/rdf-schema# (0ms)
20:36:59.959 [     RDFT:NSGetDefaultCmd]   Prefix: owl  Namespace: http://www.w3.org/2002/07/owl# (422ms)
20:36:59.959 [       RDFT:VocabSearcher] DEBUG: Import And Index vocabulary owl: <http://www.w3.org/2002/07/owl#> from http://www.w3.org/2002/07/owl# (0ms)
20:37:03.113 [     RDFT:NSGetDefaultCmd]   Prefix: xsd  Namespace: http://www.w3.org/2001/XMLSchema# (3154ms)
20:37:03.113 [       RDFT:VocabSearcher] DEBUG: Import And Index vocabulary xsd: <http://www.w3.org/2001/XMLSchema#> from http://www.w3.org/2001/XMLSchema# (0ms)
20:37:03.521 [     RDFT:NSGetDefaultCmd]   Prefix: vcard  Namespace: http://www.w3.org/2006/vcard/ns# (408ms)
20:37:03.521 [       RDFT:VocabSearcher] DEBUG: Import And Index vocabulary vcard: <http://www.w3.org/2006/vcard/ns#> from http://www.w3.org/2006/vcard/ns# (0ms)
20:37:05.614 [     RDFT:NSGetDefaultCmd]   Prefix: foaf  Namespace: http://xmlns.com/foaf/0.1/ (2093ms)
20:37:05.615 [       RDFT:VocabSearcher] DEBUG: Import And Index vocabulary foaf: <http://xmlns.com/foaf/0.1/> from http://xmlns.com/foaf/0.1/ (1ms)

...about 10 seconds.

Thereafter, it should detect that they are already loaded.

By the way, you can set your own vocabulary defaults in the "extensions/rdf-transform/module/MOD-INF/classes/files/PredefinedVocabs" file.

Testing

Java References:

The OR's instruction reference Java 8 to 17.
But, as per the Windows 64bit issue, this is limited further to Java 11 to 17.

Java 17 Test:

I had been exclusively compiling with JDK 11. Based on the above, I compiled both OpenRefine and RDF Transform with Java JDK 17 to test the references.
Hint: Update the POM.xml file to use the "java.maxversion" instead of the "java.minversion".
No issues under Linux.

Per the above, I'll update the documentation to list 11 to 17.

from rdf-transform.

RolfBly avatar RolfBly commented on June 17, 2024

your question

Does this mean that it works with the JRE as per OR's instructions?

my answer:

OR works with the JRE, RDF-Transform doesn't. Does that answer your question?
OR docs link leads to "64-bit Version 8 Update 331". So that's what I install.
I had to go back to the JRE, because the error with OpenJDK blocks passage to the projects I'm working on.

Re timing: I never get as far as you do with the JRE. It just waits indefinately.

I'm confused. Are you suggesting I should try with Oracle's JDK v 17, rather than OpenJDK?

(Note to self:) if yes then remove javapath from path as per Thad's advice

from rdf-transform.

AtesComp avatar AtesComp commented on June 17, 2024

This issue is proving to be a bit elusive. Some of this seems to be a timing issue. As extensions are being initialized, if there are several being loaded at the same time, RDF Transform may experience lag and timeout when reaching out to the Internet for ontology files. The long / indefinite blocking may be related.

I've tested with OpenJDK 11 and 17. Testing with 17 was due to the fact that OpenRefine documented 17 as a valid development plaform. I have both OpenJDK-17-jdk and OpenJDK-17-jre loaded. All versions back to 9 are at the OpenJDK Archive.

NOTE: Wherever the extensions are loaded (i.e., .../openrefine/extensions), there is a cache directory (.../openrefine/cache) where RDF Transform stores the Lucene Index. In that same directory is a "VocabulariesMeta.json" file that holds the working copy of the global vocabularies. This is pulled from the Predefined Namespaces file (.../openrefine/extensions/rdf-transform/module/MOD-INF/classes/files/PredefinedVocabs) containing the Prefix, Namespace, and URL of Namespace. You can update your own default vocabularies by modifying the "PredefinedVocabs" file and deleting the "VocabulariesMeta.json" file.

For testing, the entire .../openrefine/cache/rdf-transform directory can be deleted between runs as it will be recreated on the next initialization. This produces a longer initialization. Once the cache is created, initialization will shorten for subsequent runs.

I am also converting from the RDF4J library to the Jena library since some aspects of the issue seem related to the RDF4J lib. Also, OpenRefine is using the Jena library and I may be able to cut down on the extension's dependencies.

from rdf-transform.

AtesComp avatar AtesComp commented on June 17, 2024

I found several issues mostly related to the controller.js file. Any odd error in any code could cause initialization errors even when the actual code fragment never executed. Additionally, there are big changes with the removal of the RDF4J lib. Several little nagging errors were exposed. Try the new 2.0.5 release and let me know if it fixes your issues.

from rdf-transform.

RolfBly avatar RolfBly commented on June 17, 2024

The RDF Transform 2.0.5 button doesn't show up. Here's the first few lines of the console output:

21:35:42.442 [            refine_server] Starting Server bound to '127.0.0.1:3333' (0ms)
21:35:42.536 [            refine_server] Initializing context: '/' from 'C:\Program Files\OpenRefine\openrefine-3.5.2\webapp' (94ms)
21:35:48.297 [                   refine] Starting OpenRefine 3.5.2 [e3efd4e]... (5761ms)
21:35:48.300 [                   refine] initializing FileProjectManager with dir (3ms)
21:35:48.300 [                   refine] C:\Users\Rolf\AppData\Roaming\OpenRefine (0ms)
mei 09, 2022 9:35:53 PM org.python.core.PrePy maybeWrite
WARNING: console: Failed to install '': java.nio.charset.UnsupportedCharsetException: cp65001.
21:36:02.278 [         butterfly.module] Error initializing module rdf-transform by script function init() (13978ms)
21:36:02.569 [     extraction-extension] Initializing commands (291ms)
21:36:02.571 [         butterfly.module] Error initializing module extraction-extension by script function init() (2ms)

from rdf-transform.

AtesComp avatar AtesComp commented on June 17, 2024

This looks like all your extensions are failing to load as per the "extraction-extension" fail as well. Maybe due to the "UnsupportedCharsetException".

from rdf-transform.

RolfBly avatar RolfBly commented on June 17, 2024

No, RDF-extension still works. I checked.

I've had the UnsupportedCharsetException on that machine (laptop) ever since I had OpenRefine on it. See here, in my case both imports and exports encoded in UTF-8 do seem to work ok, so I just decided to ignore that warning.

I don't have it on my desktop, which is what I've been working with mostly on this, and there I don't get the RDF-transform button either. Here's the log from that machine:

09:22:30.804 [                   refine] Starting OpenRefine 3.5.2 [e3efd4e]... (2314ms)
09:22:30.806 [                   refine] initializing FileProjectManager with dir (2ms)
09:22:30.806 [                   refine] C:\Users\Rolf\AppData\Roaming\OpenRefine (0ms)
09:22:37.676 [         butterfly.module] Error initializing module rdf-transform by script function init() (6870ms)
09:22:38.628 [                   refine] POST /command/core/load-language (952ms)
09:22:38.662 [                   refine] GET /command/core/get-preference (34ms)
09:22:38.684 [                   refine] POST /command/core/load-language (22ms)
09:22:38.691 [                   refine] POST /command/core/load-language (7ms)
09:22:38.700 [                   refine] POST /command/core/load-language (9ms)
09:22:38.842 [                   refine] POST /command/core/get-importing-configuration (142ms)
09:22:38.862 [                   refine] GET /command/core/get-all-project-tags (20ms)
09:22:38.894 [                   refine] GET /command/core/get-all-project-metadata (32ms)
09:22:38.986 [                   refine] GET /command/core/get-csrf-token (92ms)
09:22:39.004 [                   refine] GET /command/core/get-languages (18ms)
09:22:39.231 [                   refine] GET /command/core/get-version (227ms)
09:22:39.414 [                   refine] GET /command/database/saved-connection (183ms)
09:22:45.032 [            rdf_extension] receiving request for styles/rdf-reconcile-service.css (5618ms)
09:22:45.119 [            rdf_extension] receiving request for styles/rdf-schema-alignment-dialog.css (87ms)

Note that RDF-extension does work. Here's a screenshot:
image
The RDF buttom is for extension. Note: no RDF Transform button.

from rdf-transform.

AtesComp avatar AtesComp commented on June 17, 2024

What errors are reported on the browser side dev tools? I don't expect any but want to check.

The server-side Initialization function, init(), in controller.js is now literally one line of code in JavaScript. I'll put a debug statement around it.

from rdf-transform.

AtesComp avatar AtesComp commented on June 17, 2024

Hmmm, I see one line in the controller.js that may be the issue. Change the first code line:
importPackage(org.openrefine.rdf.commands);
to:
importPackage(org.openrefine.rdf.command);
...remove the "s".

Alternately, comment the line since it is not used.

from rdf-transform.

AtesComp avatar AtesComp commented on June 17, 2024

There should be no RDFT:Controller messages...all of them have been removed in the 2.0.5 version. Instead, you should see RDFT:InitCmd messages. The implication is that you're running an earlier version.

For 2.0.5, the message:
[ RDFT:Controller] Initializing RDF Transform Extension...
should be printing the version like so:
[ RDFT:InitCmd] Initializing RDF Transform Extension 2.0.5...

from rdf-transform.

RolfBly avatar RolfBly commented on June 17, 2024

Removing the s, or commenting out the line, did not make any difference.
I'll try the 2.1 beta.

from rdf-transform.

AtesComp avatar AtesComp commented on June 17, 2024

Please do check it out and let me know how it works...or not work.

from rdf-transform.

RolfBly avatar RolfBly commented on June 17, 2024

No difference, unfortunately. No RDF-transform button and the console reports

11:51:15.548 [         butterfly.module] Error initializing module rdf-transform by script function init() (6731ms)

Spot the differences - Windows only.

Common:
. OpenRefine 3.5.2,
. RDF transform 2.0.4 and up.

What works:
. Windows 10 Pro v19044.1586
. OpenJDK 64-Bit Server VM Temurin-17.0.3+7 (build 17.0.3+7, mixed mode, sharing)

What does not work:
. Windows 10 Pro v 21H2 build 19044.1645
. Java runtime 1.8.0_331

I could try with a JDK (but I'm not accepting any deadline). Would I have better chances with OpenJDK or Oracle's "official" JDK?

from rdf-transform.

AtesComp avatar AtesComp commented on June 17, 2024

Thanks. It will not work with Java 1.8. It needs at least Java 11 since the extension uses newer language features. Either the JRE or JDK should work.

from rdf-transform.

RolfBly avatar RolfBly commented on June 17, 2024

Versions are not version strings. JRE version 8 has version string 1.8.0_331, is the latest. OpenRefine's install docs refer to it too.

The conclusion is that it doesn't work with JRE.

I tried OpenJDK earlier on, that did not help either.
Oracle JDK is up next.

from rdf-transform.

AtesComp avatar AtesComp commented on June 17, 2024

Oracle manages the OpenJDK community. You should see from the previous comments that you can get Java versions from the OpenJDK archive . It is an "official" Oracle repository under the Oracle jdk.java.net address. The releases are also built by Oracle.

Note that Java 8 is so old they don't even list it on that page. The link to it is called a "reference" implementation.

You can also get archived releases of the Oracle licensed versions at Java Archive. Note that the main page links directly to OpenJDK for early releases.

Either should work without issue. I tend to use the OpenJDK versions for development. If you think there may be issues between the JVMs, please download the code and compile with them to note any differences.

from rdf-transform.

AtesComp avatar AtesComp commented on June 17, 2024

Note:
"JRE version 8 has version string 1.8.0_331, is the latest"
...for Java 8.
RDF Transform will not work using Java 8. I'm surprised OpenRefine 3.5.2 will work using Java 8 as they specify Java 11 as well. We say up to Java 17 since it is backward compatible with 11.

The latest is a Java 18 release. Java 19 is in early access. Java 17 is officially an LTS.

from rdf-transform.

RolfBly avatar RolfBly commented on June 17, 2024

JRE stands for Java RUNTIME ENVIRONMENT. Not JAVA Development Kit.

I've installed the JRE version that OpenRefine recommends. When I run the JRE uninstall tool, it tells me there is no need because I'm running the latest version.

You're saying this is old and wrong.

Google "Java Runtime latest version". That leads to this:

image

Note VERSION 8 release date May 2 2022.

from rdf-transform.

AtesComp avatar AtesComp commented on June 17, 2024

Reviewing OpenRefine, they do say 8 to 17. However, 8, yes, is quite old. It has been kept up to date with security and optimization fixes.

Each version generally adds new language features and advancements. Java 11 is considered an Long Term Release (LTS) version. 8 and 17 as well. They are also, know as so called "stable" version.

RDF Transform uses Java 11 features not available in 8, therefore, requires 11.

For updates, each version will only update within its own version. So, you won't get an upgrade from 8 to, say, 9, etc. Java supports installing multiple version simultaneously.

from rdf-transform.

AtesComp avatar AtesComp commented on June 17, 2024

I never said it's wrong. I said RDF Transform requires Java 11. I've noted that several times in this conversation.

from rdf-transform.

AtesComp avatar AtesComp commented on June 17, 2024

See this commentary for some background on the version issue.

from rdf-transform.

RolfBly avatar RolfBly commented on June 17, 2024

This Java versioning is a frustrating, time-wasting mess. And I'm not the only one who thinks so.

It was my understanding that JRE versions follow a completely separate line of numbering from JDK versions. Because updates for both keep emerging regularly, one is led to believe one is on the latest available (I understand you didn't design this policy). Now, if I understand right, they both follow the same versioning, but JRE is at least some 10 versions behind the latest JDK.

OpenRefine recommends JRE for non-dev use.
Your install requirements specify Java 11 to 17 (implying non-dev use - I don't want to run any builds if I don't have to).
There is no JRE higher than 8.

It would have helped me from the very start - and it would have saved me days of fruitless testing - if your install requirements would have specified JDK, as in "JRE will not work".

from rdf-transform.

RolfBly avatar RolfBly commented on June 17, 2024

Well well well.

I threw off the JRE again and installed jdk-17.0.3+7 .msi from here:

openjdk version "17.0.3" 2022-04-19
OpenJDK Runtime Environment Temurin-17.0.3+7 (build 17.0.3+7)
OpenJDK 64-Bit Server VM Temurin-17.0.3+7 (build 17.0.3+7, mixed mode, sharing)

Your changes meanwhile do seem to be improvements. I haven't done any extensive testing, but it seems to work OK now. You won a log, too.

You really should be more specific in your install instructions.

RDFT_log.txt

from rdf-transform.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.