With a little side of applesauce...

Friday, July 18, 2008

openOffice2GoogleDocs - java issues on Debian Sid (July 18 update)

I ran into issues getting ooo2gd to upload docs to Google Docs due to a Java issue on my Debian Sid. First, ooo2gd needs sun java 1.6, so:

apt-get install sun-java6-jdk (since I also program in java)

now:

update-alternatives --config java

(possibly needed?)

update-java-alternatives -s java-6-sun

Now, on Debian, openoffice.org uses GCJ by default, so you will need to configure it to use sun java:

Tools->Options->OpenOffice.org->Java

Choose:
Sun Microsystems Inc. 1.6.0_07 (currently)

Save, then restart openoffice. Now when you try to upload a file to Google Docs, it will prompt you for configuration information.

Here is the related swing error that is blocking the configuration dialogue:

Exception in thread "Thread-68" java.lang.NoClassDefFoundError: org.openoffice.gdocs.ui.dialogs.ConfigDialog
at java.lang.Class.initializeClass(libgcj.so.90)
at org.openoffice.gdocs.GDocs$1.run(GDocs.java:173)
at java.lang.Thread.run(libgcj.so.90)
Caused by: java.lang.ClassNotFoundException: javax.swing.GroupLayout not found in com.sun.star.lib.unoloader.UnoClassLoader{urls=[file:/usr/lib/openoffice/program/classes/java_uno.jar,file:/usr/lib/openoffice/program/classes/juh.jar,file:/usr/lib/openoffice/program/classes/jurt.jar,file:/usr/lib/openoffice/program/classes/ridl.jar,file:/usr/lib/openoffice/program/classes/unoil.jar,file:/usr/lib/openoffice/program/classes/ScriptFramework.jar,file:/home/speeves/.openoffice.org2/user/uno_packages/cache/uno_packages/Z6rcbL_/gdocs-1.1.2.oxt/GDocs.jar], parent=java.net.URLClassLoader{urls=[file:/usr/lib/openoffice/program/classes/unoloader.jar], parent=gnu.gcj.runtime.SystemClassLoader{urls=[file:/usr/share/java/bsh.jar,file:/usr/share/java/xml-apis.jar,file:/usr/share/java/xercesImpl.jar,file:/usr/share/java/xalan2.jar,file:/usr/share/java/serializer.jar], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}}}
at java.net.URLClassLoader.findClass(libgcj.so.90)
at java.lang.ClassLoader.loadClass(libgcj.so.90)
at java.lang.ClassLoader.loadClass(libgcj.so.90)
at java.lang.Class.forName(libgcj.so.90)
at java.lang.Class.initializeClass(libgcj.so.90)
...2 more

No comments: