Juris-M: RefMarks to Bookmarks after RTF-Scan Error

I installed the newest update 5.0.37m10 (on macOS 10.13.3; with RTF-Scan 2.0.35) and wanted to convert a Scrivener compile (with scannable cites) to docx via the odt-LibreOffice route. However, once I try to change the internal settings from RefMarks to Bookmarks, I receive the following error:

Zotero experienced an error updating your document.

An error occurred communicating with Zotero:
com.sun.star.uno.RuntimeException: End of content node doesn't have the proper start node
at com.sun.star.bridges.jni_uno.JNI_proxy.dispatch_call(Native Method)
at com.sun.star.bridges.jni_uno.JNI_proxy.invoke(JNI_proxy.java:185)
at com.sun.proxy..createTextCursorByRange(Unknown Source)
at org.zotero.integration.ooo.comp.ReferenceMark.getReplacementCursor(ReferenceMark.java:441)
at org.zotero.integration.ooo.comp.Document.convert(Document.java:418)
at org.zotero.integration.ooo.comp.CommMessage.execute(CommMessage.java:149)
at org.zotero.integration.ooo.comp.CommMessage.getBytes(CommMessage.java:61)
at org.zotero.integration.ooo.comp.CommServer.run(CommServer.java:84)
at java.lang.Thread.run(Thread.java:745)

On a second try, the conversion runs but when I open the afterwards created doc in Word, I cannot switch from Bookmarks to Fields (instead of Fields the option remains RefMarks, even though the file is opened in Word).

I tried to rollback to Juris-M 5.0.35.m4 and RTF-Scan 1.0.34 but there too the same error occurs.
LibreOffice version: 5.4.5 (6.2 did also not work)
Word version: 16.10

I don't understand the error message so help would be much appreciated. Is it a Java problem? I have Java 8 Update 161 installed.
  • edited March 13, 2018
    I tried the conversion steps with a simple LO document with ODF Scan cites here, walking to Word with Fields, and it completed successfully. We now have debugging support in Juris-M, so if you open Help -> Debugging -> Enable, then perform the failing steps, then open Help -> Debugging -> View, you can submit a Debug ID. Post the ID back here and I can take a look.

    (If all goes well -- this will be the first field test of this mechanism, so fingers crossed.)
  • edited March 13, 2018
    A search of the forums ("End of content node", with quotes) turns up a series of threads on this issue over several years. Most threads end without resolution, or with a sparse note indicating that the problem went away or was resolved.

    Possible points of trouble are LO 5.1 (which seems to have been more afflicted), and Java subsystem mismatches. For what it's worth, my test was with LibreOffice 6.0.2.1, with JRE of Java 8 / 161.

    (In any case, I don't think either Juris-M word processor integration or the RTF/ODF Scan plugin are the cause of the error.)
  • Thank you for the quick response.
    I started the debugging and tried to submit but received an "Error submitting output."
    At the top of the log are several
    "[JavaScript Error: "Overwriting translator with same filename..."
    May I send you the log somehow in another way?

    I will try with different texts and update LibreOffice to see if it goes away.
  • Debugging reports work only from JM v5.0.37m10. There won't be any advantage in running the older version, so would recommend moving back to the latest release.

    Those error messages re translator overwrites are not relevant. I have the same errors on my system here (and do plan to rid us of them in due course), but things are ticking over fine.
  • Thank you for the continued support.
    I did upgrade/reinstall Juris-M and LibreOffice and now I can change from RefMarks to Bookmarks in LibreOffice without an error. Saved as doc and opened in Word I can change citation styles but when I try to change the internal settings I do not get to pick "Fields," it's still "RefMarks".
    So I copied everything to a new doc where I had set the prefs already to bookmarks. Here I get "Fields" as an option now but when I try to switch Juris-M is only active for brief second and nothing gets changed.
    I tried again to send the log but received a submission error again:

    (1)(+0000511): HTTP POST https://our.law.nagoya-u.ac.jp/updater/report?debug=1 failed with status code 413: <!DOCTYPE html>

    request entity too large

    413

    PayloadTooLargeError: request entity too large at Gunzip.onData (/var/www/jurism-updater/node_modules/raw-body/index.js:246:12) at emitOne (events.js:116:13) at Gunzip.emit (events.js:211:7) at addChunk (_stream_readable.js:263:12) at readableAddChunk (_stream_readable.js:250:11) at Gunzip.Readable.push (_stream_readable.js:208:10) at Gunzip.Transform.push (_stream_transform.js:147:32) at Zlib.callback (zlib.js:474:14)
    (1)(+0000012): Error: HTTP POST https://our.law.nagoya-u.ac.jp/updater/report?debug=1 failed with status code 413: <!DOCTYPE html>

    request entity too large

    413

    PayloadTooLargeError: request entity too large at Gunzip.onData (/var/www/jurism-updater/node_modules/raw-body/index.js:246:12) at emitOne (events.js:116:13) at Gunzip.emit (events.js:211:7) at addChunk (_stream_readable.js:263:12) at readableAddChunk (_stream_readable.js:250:11) at Gunzip.Readable.push (_stream_readable.js:208:10) at Gunzip.Transform.push (_stream_transform.js:147:32) at Zlib.callback (zlib.js:474:14)
    Error: HTTP POST https://our.law.nagoya-u.ac.jp/updater/report?debug=1 failed with status code 413: <!DOCTYPE html>

    request entity too large

    413

    PayloadTooLargeError: request entity too large at Gunzip.onData (/var/www/jurism-updater/node_modules/raw-body/index.js:246:12) at emitOne (events.js:116:13) at Gunzip.emit (events.js:211:7) at addChunk (_stream_readable.js:263:12) at readableAddChunk (_stream_readable.js:250:11) at Gunzip.Readable.push (_stream_readable.js:208:10) at Gunzip.Transform.push (_stream_transform.js:147:32) at Zlib.callback (zlib.js:474:14)
    Zotero.HTTP</this.UnexpectedStatusException@chrome://zotero/content/xpcom/http.js:19:16 Zotero.HTTP</this.request</xmlhttp.onloadend@chrome://zotero/content/xpcom/http.js:319:21
  • edited March 13, 2018
    Update: I added a bibliography into the doc with working bookmark citations and then chose "Fields" in the internal preferences, which then worked. All other Juris-M functions (e.g. setting the language for translations) seem to work, too.
    I tried to send a log again but it failed, too.

    These are a few more steps then previously (odt > scan > bookmarks > doc > copy to another doc > add bibliography > change to fields) and I don't know if anything is interfering at my end, but at least it's working again.
  • Good to hear that you have it working. It isn't necessary to send a debug report now that you have found a solution -- but thanks very much for reporting the submission error. I had tested submissions only after performing minor actions in the client. Looks like I need to adjust a server setting to cope with real-world data volumes.
  • Actually, the failure of your doc to switch to Word mode (Fields) when opened in Word is certainly weird. A couple of questions.

    1. After the ODF Scan conversion, are you refreshing the document after selecting a non-footnote style?

    2. Are you saving the document out of LibreOffice with extension *.doc or extension *.docx?
  • 1. Yes (Chicago author-date).
    2. I did both but kept working with the doc (which I saved as a docx after the switch to "fields" was possible). In the past, only doc did work.

    Would be great if the many in-between steps could be avoided but for now it's alright. Thank you again for the quick support (and a great tool!).
  • The "request entity too large" error from the Debug ID submission queue is a puzzler. Our server settings permit submissions of up to 10 megabytes, which should I would think sufficient to cover any report of reasonable size. How many citations does the document contain?
  • The document I tried it with has 75 citations.
  • Update: The workaround above did apparently only worked once. Later attempts always failed and in Word I could not choose "Fields" but "RefMarks" was displayed.
    Assuming it has something to do with my user account on macOS, I created a new one and tried there, where it worked — again only once.
    After some trial and error, the following procedure continued to work:
    1. Open RTF-scanned file with LibreOffice.
    2. Refreshing with JM Tailor & Francis Chicago Style.
    3. Change to bookmarks, save.
    4. Save as docx.
    5. Again go to Doc prefs, verify bookmarks as setting, ok, save.
    6. Quit Juris-M.
    7. Reopen Juris-M, re-install Word add-in via Juris-M prefs (if I don't do this, it's "RefMarks" also in Word).
    8. Open file with Word, switch to "Fields," save.

    Because I have to quit Juris-M and re-install the add-in every time, I could not log what it is doing. I tried to follow that procedure on my usual user account but to no avail.
    So, it has something to do with my settings, prefs etc. there, it seems. But I could not trouble-shoot what. Still, the need to re-install the add-in in the new account speaks for another issue.
  • edited March 14, 2018
    I would like to help debug this, but I would need a base of information to work from -- preferably a clear set of steps that I can follow to reproduce the fault locally..

    If you are able to capture a log of that covers the libreoffice-menu-in-word issue, you can copy-paste the log into a file, after which we can work out a method of delivery.

    Without a log or steps to reproduce, there probably isn't much useful that I can do.
  • Please excuse the late response but I had to keep the deadline for what I was working on when I encountered the errors.
    I went through the steps (Scrivener compile -> RTF Scan -> choose citation style in LibreOffice, save -> switch to bookmarks, save as docx -> open in Word) while Juris-M was tracking and saved the log in a txt-file (there was one error when I first tried to switch to bookmarks). The RefMarks in Word issue happened again.
    I tried to submit it but that failed again, too.
    How may I send you the log? It's 2,5 MB.
  • @bokamm Thanks very much for this. We apparently do have a server settings issue at this end (2.5mb < 10mb). I also understand from the log why it is so large -- each citation added (one by one) includes a record of its predecessors, and that bulks up rather quickly.

    With respect to the error you experienced, this is the cause:

    "Unknown field type "ReferenceMark"

    That was thrown in Word, which doesn't recognize ReferenceMarks from LibreOffice world. At a guess, what may have happened is that Juris-M kicked off a process to transform the marks through the document after you changed the setting, but the document was saved as *.docx before the process was completed.

    Possibly there was a separate error in the ReferenceMarks -> Bookmarks conversion step, that isn't captured in the log file you've kindly sent.
  • Thank you for immediately checking.
    When Juris-M converts from RefMarks to bookmarks, usually its window comes to the fore. Then, when it is done, the LibreOffice window comes to the front again automatically. I waited for this to happen before I saved. However, there was also an error when I first tried to start the conversion.
    I am still unsure if there is not a larger issue at my end because the process does only work correctly on the new macOS user account.

    I tried to set everything up again but could not, because I also cannot export my library to Zotero RDF anymore, with the following errors (I resolved the first one by installing the Chrome connector...):

    [JavaScript Error: "Component returned failure code: 0x80520001 (NS_ERROR_FILE_UNRECOGNIZED_PATH) [nsILocalFile.initWithPath]" {file: "chrome://zotero/content/xpcom/file.js" line: 46}]

    (1)(+0000005): TypeError: item.multi._lsts is undefined generateItem@Zotero RDF:386:1 doExport@Zotero RDF:602:3

    (2)(+0000000): Translate: Translation using Zotero RDF failed: TypeError: item.multi._lsts is undefined generateItem@Zotero RDF:386:1 doExport@Zotero RDF:602:3 url => /Users/xxx/Desktop/My Library downloadAssociatedFiles => true automaticSnapshots => true
  • I'll test export/import again, but I'm pretty sure it will work for you if you do Preferences -> Advanced, select the files & folders tab (I think) and click on Reset Translators. Wait 10-20 seconds for translators to update, and you may get a better result.

    That said, export/import is not a good way to migrate your data. Links to your documents would be broken. The simplest migration method is to sync everything on Machine A, and then set Machine B to sync to the same account.
  • OK, will try!
Sign In or Register to comment.