Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JabRef 3.5 cannot connect ot LibreOffice on ubuntu #1669

Closed
pgarciabaez opened this issue Aug 3, 2016 · 8 comments
Closed

JabRef 3.5 cannot connect ot LibreOffice on ubuntu #1669

pgarciabaez opened this issue Aug 3, 2016 · 8 comments
Labels
bug Confirmed bugs or reports that are very likely to be bugs openoffice/libreoffice os: linux

Comments

@pgarciabaez
Copy link

pgarciabaez commented Aug 3, 2016

I have problems to connect JabRef and LibreOffice. I use:

  • JabRef 3.5 (same problem with JabRef-3.6dev--snapshot--2016-08-03--master--f77daac.jar)
  • LibreOffice 4.2.6.3
  • Java 1.8.0_20
  • Ubuntu 14.04.1
    Here you can see the error output of my console:

Manual connection:

Exception in thread "AWT-EventQueue-0" java.lang.IndexOutOfBoundsException: The row index 3 must be less than or equal to 1.
    at com.jgoodies.forms.layout.CellConstraints.ensureValidGridBounds(CellConstraints.java:967)
    at com.jgoodies.forms.layout.FormLayout.setConstraints(FormLayout.java:805)
    at com.jgoodies.forms.layout.FormLayout.addLayoutComponent(FormLayout.java:1165)
    at java.awt.Container.addImpl(Container.java:1125)
    at java.awt.Container.add(Container.java:971)
    at com.jgoodies.forms.builder.FormBuilder.addImpl(FormBuilder.java:1896)
    at com.jgoodies.forms.builder.FormBuilder$ComponentAdder.add(FormBuilder.java:2550)
    at com.jgoodies.forms.builder.FormBuilder$ComponentAdder.at(FormBuilder.java:2140)
    at com.jgoodies.forms.builder.FormBuilder$ComponentAdder.xy(FormBuilder.java:2160)
    at net.sf.jabref.gui.openoffice.OpenOfficePanel.showConnectDialog(OpenOfficePanel.java:502)
    at net.sf.jabref.gui.openoffice.OpenOfficePanel.connect(OpenOfficePanel.java:357)
    at net.sf.jabref.gui.openoffice.OpenOfficePanel.lambda$initPanel$2(OpenOfficePanel.java:164)
    at net.sf.jabref.gui.openoffice.OpenOfficePanel$$Lambda$61/1488891022.actionPerformed(Unknown Source)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2346)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
    at java.awt.Component.processMouseEvent(Component.java:6525)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
    at java.awt.Component.processEvent(Component.java:6290)
    at java.awt.Container.processEvent(Container.java:2234)
    at java.awt.Component.dispatchEventImpl(Component.java:4881)
    at java.awt.Container.dispatchEventImpl(Container.java:2292)
    at java.awt.Component.dispatchEvent(Component.java:4703)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4898)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4533)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4462)
    at java.awt.Container.dispatchEventImpl(Container.java:2278)
    at java.awt.Window.dispatchEventImpl(Window.java:2739)
    at java.awt.Component.dispatchEvent(Component.java:4703)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:746)
    at java.awt.EventQueue.access$400(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:697)
    at java.awt.EventQueue$3.run(EventQueue.java:691)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86)
    at java.awt.EventQueue$4.run(EventQueue.java:719)
    at java.awt.EventQueue$4.run(EventQueue.java:717)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:716)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Automatic connection:

Info: unoil.jar is in /usr/lib/libreoffice/program/classes/unoil.jar
13:18:08.734 [AWT-EventQueue-0] WARN  net.sf.jabref.gui.openoffice.OpenOfficePanel - Could not connect to running OpenOffice/LibreOffice
java.io.IOException: File not found: /usr/lib/ure/share/java/unoil.jar
    at net.sf.jabref.gui.openoffice.OpenOfficePanel.connect(OpenOfficePanel.java:387) [JabRef-3.5.jar:?]
    at net.sf.jabref.gui.openoffice.OpenOfficePanel.lambda$initPanel$1(OpenOfficePanel.java:163) [JabRef-3.5.jar:?]
    at net.sf.jabref.gui.openoffice.OpenOfficePanel$$Lambda$60/1432955090.actionPerformed(Unknown Source) [JabRef-3.5.jar:?]
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022) [?:1.8.0_20]
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2346) [?:1.8.0_20]
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) [?:1.8.0_20]
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) [?:1.8.0_20]
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252) [?:1.8.0_20]
    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289) [?:1.8.0_20]
    at java.awt.Component.processMouseEvent(Component.java:6525) [?:1.8.0_20]
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3321) [?:1.8.0_20]
    at java.awt.Component.processEvent(Component.java:6290) [?:1.8.0_20]
    at java.awt.Container.processEvent(Container.java:2234) [?:1.8.0_20]
    at java.awt.Component.dispatchEventImpl(Component.java:4881) [?:1.8.0_20]
    at java.awt.Container.dispatchEventImpl(Container.java:2292) [?:1.8.0_20]
    at java.awt.Component.dispatchEvent(Component.java:4703) [?:1.8.0_20]
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4898) [?:1.8.0_20]
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4533) [?:1.8.0_20]
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4462) [?:1.8.0_20]
    at java.awt.Container.dispatchEventImpl(Container.java:2278) [?:1.8.0_20]
    at java.awt.Window.dispatchEventImpl(Window.java:2739) [?:1.8.0_20]
    at java.awt.Component.dispatchEvent(Component.java:4703) [?:1.8.0_20]
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:746) [?:1.8.0_20]
    at java.awt.EventQueue.access$400(EventQueue.java:97) [?:1.8.0_20]
    at java.awt.EventQueue$3.run(EventQueue.java:697) [?:1.8.0_20]
    at java.awt.EventQueue$3.run(EventQueue.java:691) [?:1.8.0_20]
    at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_20]
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75) [?:1.8.0_20]
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86) [?:1.8.0_20]
    at java.awt.EventQueue$4.run(EventQueue.java:719) [?:1.8.0_20]
    at java.awt.EventQueue$4.run(EventQueue.java:717) [?:1.8.0_20]
    at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_20]
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75) [?:1.8.0_20]
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:716) [?:1.8.0_20]
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) [?:1.8.0_20]
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) [?:1.8.0_20]
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) [?:1.8.0_20]
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) [?:1.8.0_20]
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) [?:1.8.0_20]
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) [?:1.8.0_20]
@teertinker
Copy link
Contributor

I think I had these problems some times ago.
The reason seems to be that the path for files like unoil.jar of LO changes sometimes. My solution was to search for unoil.jar in my filemanager and copy the file (and a couple of others in the same directory, which are used by JabRef as well) to the path JabRef is looking for.

The error dialog popping up, when one tries to connect to LO is pretty helpful where to copy the files to.

@oscargus
Copy link
Contributor

oscargus commented Aug 4, 2016

The manual connection dialog problem should be solved in http://builds.jabref.org/fixpartsof1669 (available in a few minutes) so that you at least can try it that way.

Regarding the actual connection issue, it is as @teertinker says related to the location of the four jar files juh.jar, jurt.jar, ridl.jar, unoil.jar depending on version and distribution they tend to end up in different locations. When you find them, can you please inform me where and I'll try to change the code so that it is more likely that the auto detection finds them.

@oscargus oscargus added the bug Confirmed bugs or reports that are very likely to be bugs label Aug 4, 2016
@pgarciabaez
Copy link
Author

Thanks @oscargus, now with fixpartsof1669 I can change the search paths of JabRef.

The locations of the four files in my system are:

  • juh.jar: /usr/lib/ure/share/java/juh.jar
  • jurt.jar: /usr/lib/ure/share/java/jurt.jar
  • ridl.jar: /usr/lib/ure/share/java/ridl.jar
  • unoil.jar: /usr/lib/libreoffice/program/classes/unoil.jar

As @teertinker said I put the four files in the same directory, but still I could not connect. Here you can see the output error of my console:

CE> Warning: -nologo is deprecated. Use --nologo instead.
CE> Warning: -nodefault is deprecated. Use --nodefault instead.
CE> Warning: -norestore is deprecated. Use --norestore instead.
CE> Warning: -nolockcheck is deprecated. Use --nolockcheck instead.
CE> Warning: -accept=pipe,name=uno5864429193837653856;urp; is deprecated. Use --accept=pipe,name=uno5864429193837653856;urp; instead.
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: Could not initialize class com.sun.star.lib.connections.pipe.PipeConnection
at com.sun.star.lib.connections.pipe.pipeConnector.connect(pipeConnector.java:115)
at com.sun.star.comp.connections.Connector.connect(Connector.java:119)
at com.sun.star.comp.urlresolver.UrlResolver$_UrlResolver.resolve(UrlResolver.java:116)
at com.sun.star.comp.helper.Bootstrap.bootstrap(Bootstrap.java:278)
at net.sf.jabref.gui.openoffice.OOBibBase.simpleBootstrap(OOBibBase.java:255)
at net.sf.jabref.gui.openoffice.OOBibBase.(OOBibBase.java:171)
at net.sf.jabref.gui.openoffice.OpenOfficePanel.run(OpenOfficePanel.java:509)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at spin.Invocation.evaluate(Invocation.java:175)
at spin.off.SpinOffEvaluator$1.run(SpinOffEvaluator.java:108)
at java.lang.Thread.run(Thread.java:745)

@oscargus
Copy link
Contributor

oscargus commented Aug 6, 2016

After some googling a wild guess is that the path to soffice (/usr/lib/libreoffice/program?) is not in your system PATH.

(I can also note that in LibreOffice 4 the required jars are in different directories, while in version 5 they have moved to the same. JabRef dropped support for different directories, and therefore version 4, some time ago, but it makes sense to simply move them to the same directory and it should work. I do not think your last error is related to the the LibreOffice version, as nothing else related to version has changed, only the number of jar directories...)

@pgarciabaez
Copy link
Author

I include the path of soffice in the system PATH, but still I have problems to connect. Here you can see the output error of my console:

Warning: -nologo is deprecated. Use --nologo instead.
Warning: -nodefault is deprecated. Use --nodefault instead.
Warning: -norestore is deprecated. Use --norestore instead.
Warning: -nolockcheck is deprecated. Use --nolockcheck instead.
Warning: -accept=pipe,name=uno5046926585447420361;urp; is deprecated. Use --accept=pipe,name=uno5046926585447420361;urp; instead.
17:50:54.798 [AWT-EventQueue-0] WARN net.sf.jabref.gui.openoffice.OpenOfficePanel - Could not connect to running OpenOffice/LibreOffice
java.lang.UnsatisfiedLinkError: no jpipe in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1857) ~[?:1.8.0_20]
at java.lang.Runtime.loadLibrary0(Runtime.java:870) ~[?:1.8.0_20]
at java.lang.System.loadLibrary(System.java:1119) ~[?:1.8.0_20]
at com.sun.star.lib.util.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:65) ~[JabRef-3.6dev--snapshot--2016-08-05--fixpartsof1669--f2fa361.jar:?]
at com.sun.star.lib.connections.pipe.PipeConnection.(PipeConnection.java:58) ~[JabRef-3.6dev--snapshot--2016-08-05--fixpartsof1669--f2fa361.jar:?]
at com.sun.star.lib.connections.pipe.pipeConnector.connect(pipeConnector.java:115) ~[JabRef-3.6dev--snapshot--2016-08-05--fixpartsof1669--f2fa361.jar:?]
at com.sun.star.comp.connections.Connector.connect(Connector.java:119) ~[JabRef-3.6dev--snapshot--2016-08-05--fixpartsof1669--f2fa361.jar:?]
at com.sun.star.comp.urlresolver.UrlResolver$_UrlResolver.resolve(UrlResolver.java:116) ~[JabRef-3.6dev--snapshot--2016-08-05--fixpartsof1669--f2fa361.jar:?]
at com.sun.star.comp.helper.Bootstrap.bootstrap(Bootstrap.java:278) ~[JabRef-3.6dev--snapshot--2016-08-05--fixpartsof1669--f2fa361.jar:?]
at net.sf.jabref.gui.openoffice.OOBibBase.simpleBootstrap(OOBibBase.java:255) ~[JabRef-3.6dev--snapshot--2016-08-05--fixpartsof1669--f2fa361.jar:?]
at net.sf.jabref.gui.openoffice.OOBibBase.(OOBibBase.java:171) ~[JabRef-3.6dev--snapshot--2016-08-05--fixpartsof1669--f2fa361.jar:?]
at net.sf.jabref.gui.openoffice.OpenOfficePanel.run(OpenOfficePanel.java:509) ~[JabRef-3.6dev--snapshot--2016-08-05--fixpartsof1669--f2fa361.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_20]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_20]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_20]
at java.lang.reflect.Method.invoke(Method.java:483) ~[?:1.8.0_20]
at spin.Invocation.evaluate(Invocation.java:175) ~[JabRef-3.6dev--snapshot--2016-08-05--fixpartsof1669--f2fa361.jar:?]
at spin.off.SpinOffEvaluator$1.run(SpinOffEvaluator.java:108) ~[JabRef-3.6dev--snapshot--2016-08-05--fixpartsof1669--f2fa361.jar:?]
at java.lang.Thread.run(Thread.java:745) ~[?:1.8.0_20]

@Siedlerchr
Copy link
Member

@pgarciabaez Another hint I found is that you must add the path to the libjpipe.so to your system path as well.

PS: Please add your ExceptionLog between Code-Tags (Just 2-times the code button or 4 backticks ). Makes it easier to read as it gets better formatted

@pgarciabaez
Copy link
Author

Thanks @oscargus @Siedlerchr and @teertinker , I include libjpipe.so in my LD_LIBRARY_PATH and now I can connect. Issue solved.

PS: Excuse me, I will use code-tags from now

@oscargus
Copy link
Contributor

Great! I will try to check the default locations and add a FAQ for this.

This also lead to the code tags being inserted in the default form, so no worries, something good came out of it. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bugs or reports that are very likely to be bugs openoffice/libreoffice os: linux
Projects
None yet
Development

No branches or pull requests

5 participants