Error updating document (Openoffice integration 3.0a1, Zotero 2.0b7, Mac OS 10.5)

For some of my documents I get a following message when trying to insert a citation with the new Zotero:

---------
An error occurred communigating with Zotero:
java.lang.Exception: Invalid code prefix
at
org.zotero.intergration.ooo.ReferenceMark.getCode(ReferenceMark.java:248)
---------

After I click "OK" on this message, I get another message:

---------
Zotero experienced an error updating your document.
---------

My setup is: Openoffice.org 3.1.1, Openoffice integration 3.0a1, Zotero 2.0b7, Mac OS 10.5, Firefox 3.5.3.

Please help.
«1
  • I have the same problem with my PhD document which contains more than 200 references.

    On the other hand, no problem with new documents. May anybody help us ?

    My setup is :
    OOo 3.1.1, Firefox 3.5.3, Zotero 2.07b, Openoffice integration 3.0a1, Windows XP sp3
  • My document is also a large file (likewise a PhD) with hundreds of references. Copying the text to another document, as suggested in other posts, doesn't help.
  • Hi, having the same problem:
    http://forums.zotero.org/discussion/8760/winxp-oo-integration-error-communicating-with-zotero/#Item_1

    Once I broke the dynamic links, i was able to start adding new citations and generate a bibliography. but strangely it threw up the error again when i was dealing with a reference in a 2-column layout (i don't know whether this is related).

    once i started again (minus the 2-column part of my document) i was able to get to the end this time - but having saved and closed the document, and reopened it - the references weren't recognised.
  • I had the same problem, but I fixed it by

    1. Restart Openoffice with the troubled file
    2. Delete the Table of Contents
    3. Try to add a zotero reference, at which point zotero will upgrade your document.
    4. Now regenerate the Table of Contents.

    Anyway, that worked for me and I hope it works for you.
  • This solution does not work for me. Still the same error message.
  • Hi kevinc,

    For me too : I deleted my tables of contents (related to the whole document, to the chapters and to the appendices) and my lists of figures and tables, I've still the same error message.

    Anyway, thank you for your post.
  • i wonder if someone else with this problem would try saving a copy of their doc and using the 'remove field codes' feature (far-right of OO Zotero toolbar). then seeing if it allows citations to be reentered. This works for me - and i was able to rebuild the entire set of refs, but upon saving, closing and restarting OO, the fields were unrecognised again.

    would be useful for the team perhaps if we could isolate this.
  • I have a lengthy document with numerous references and was having the same problem. Deleting the table of contents seems to have solved it, but it returned when I generated a new table of contents.
  • Hi scottiedawg,

    I just tried to "remove field codes" and actually after that I can add other citations.

    After having closed then restarting my document, I can still add or change the entries.

    Nevertheless, I have more than 200 references in my document. So, I cannot recognize each of them and change them after having removed the field codes.
    Therefore, I need another solution.

    Thank you for your post.
  • corgeon - thanks for trying it out - interesting that the refs are still embedded when you restart the doc.

    i feel your pain though re: number of refs. I had far fewer but it was still a pain to relink them all :(

    hopefully we're narrowing this down bit by bit...
  • Unfortunately, a bug involving non-Zotero ReferenceMarks/Bookmarks managed to slip through to the first release of the OOo plug-ins. This bug is now fixed, but the updated plug-in won't be released until later today. While you're best off waiting for the release, if you can't, you can download the trunk XPI, which includes the fix, but, to avoid future problems, you should make sure to manually install the new version once it is available (or else you'll be stuck using developmental versions of the plug-in forever).
  • edited September 16, 2009
    This is great news Simon. The plugin you posted works OK for me, thank you very very very much.
  • Yes, that's correct. If you don't restart Firefox between now and then, you'll have to go to Tools->Add-ons->Extensions and click the "Find Updates" button, but the update will be pushed automatically to current users.
  • Zotero OpenOffice Integration 3.0a2 is now available.
  • Everything works perfectly now ! ! !

    Thank you very much to Zotero Team ! ! !
  • thanks so much guys. it no longer throws up an error for me.

    however, i am still finding that when i save and close, then reopen my document, the dynamic links are lost again.

    any help appreciated.
  • to clarify - i have tested by saving the same doc as an .odt and as .doc (both using OpenOffice).

    The zotero refs remain intact in the .odt file, so it's just the .doc files that are losing everything when close and reopened.

    thanks,
    scott
  • scottiedawg: If you're saving as .odt, you need to use ReferenceMarks mode. If you're saving as .doc, you need to use Bookmarks mode. Does that help?
  • Dan - thanks that works perfectly - and simply by switching the .doc to bookmarks all the refs are recovered (or recognised again) automatically, so no relinking required.

    thanks a million.

    can i set zotero to always treat .doc and .odt files in the appropriate ways, or could zotero do that automatically? or... are there good reasons for it not to do so?

    cheers,
    scott
  • I'm not sure, but it's possible it could at least display a warning if you try to save in the wrong format. Note that it does specify the required save format in the plugin's Document Preferences window.
  • bry
    edited September 17, 2009
    I appear to have a related problem; I use have been using bookmarks with ODT files and not had a problem; I have a big file with numerous references but now I get

    An error occurred communicating with Zotero...
    followed by some lengthy code starting with java.lang.Exception: invalid code prefix

    Is there a way to change them to reference marks without going through and manually doing it?
  • bry, what version of Zotero OpenOffice Integration are you running (check in Firefox->Tools->Add-ons->Extensions)? This should be fixed in 3.0a2.
  • It's 3.0a2 - I've updated everything, including Java. It worked before the updates.
    WIndows XP; the latest OpenOffice; Firefox 3.5.3; I can send a screen shot of the error message
  • bry, a screenshot would be useful (send to support@zot...org), but it would be even more useful if you could send a document exhibiting the issue along with it.
  • Hi bry

    maybe i have misunderstood - but isn't it simply a case of clicking on the 'cog' icon on the zotero toolbar and choosing referencemarks instead of bookmarks?

    good luck,
    scott
  • bry
    edited September 18, 2009
    Hi Scott & Simon - an interesting progression this morning.

    Initially when I clicked on the Cog icon to change bookmarks to referencemarks, it threw the error immediately. But I could add a new reference, which comes up shaded like a field; none of my other ones are.

    When I tried to refresh or add a table of contents though, I got the error (Refreshing would add: Zotero experienced an error updating your document), presumably because the old ones are book marks which worked before but no longer do, and even though the preferences are set to bookmarks, Zotero now automatically adds a new reference mark?

    And now, after mucking with it a while, it seems to have switched itself in the preferences from Bookmarks to Reference Marks, but no longer recognizes any of my old citations at all. They are still there, but it is as if they are now just regular text. (When I hit refresh now it says "You must insert a citation before performing this operation"). I saved that version with a different name.
  • Hi Simon,

    it seems that there is the same problem within the Zotero Word Integration. Could you also please to 3.0a2 ?

    Greetz zotomat
  • zotomat, as I noted on your other thread, any issues with Word are entirely separate.
  • I am having similar problems. Everything seems up to date.

    http://forums.zotero.org/discussion/8869/error-report-1651427900/#Item_1

    Chris
  • Thus far the WordPlugin 3.0a5 seems to have fixed my problem. Thanks, guys.
Sign In or Register to comment.