Bug 49580 - OfficeBean.jar references officebean.dll not officebeanlo.dll
Summary: OfficeBean.jar references officebean.dll not officebeanlo.dll
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
3.5.3 release
Hardware: x86 (IA32) Windows (All)
: medium normal
Assignee: Stephan Bergmann
URL:
Whiteboard: target:3.6.0 target:3.5.4
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-07 05:13 UTC by M. Terpstra
Modified: 2013-11-15 23:05 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
OOoBean test (766 bytes, text/plain)
2012-05-07 08:35 UTC, Stephan Bergmann
Details
OOoBean test (1.19 KB, text/plain)
2012-05-07 08:36 UTC, Stephan Bergmann
Details
OOoBean test: fixed Makefile (747 bytes, text/plain)
2012-05-07 08:39 UTC, Stephan Bergmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description M. Terpstra 2012-05-07 05:13:29 UTC
I think this bug report is not limited to the provided OS and hardware (actually i run the x86 version on 64 bit windows 7)
This issue also occures on LibreOffice 3.5.2 (and other versions i expect.

In our application we use the officebean to embed OpenOffice and it's relatives into our application. This works like a charm until LibreOffice is the installed office application.

When using LibreOffice the following exception occures (i've stripped the irrelevant lines generated by my code...)

Caused by: java.lang.UnsatisfiedLinkError: no officebean in java.library.path
    at java.lang.ClassLoader.loadLibrary(Unknown Source)
    at java.lang.Runtime.loadLibrary0(Unknown Source)
    at java.lang.System.loadLibrary(Unknown Source)
    at
com.sun.star.lib.util.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:59)
    at
com.sun.star.comp.beans.LocalOfficeConnection.<clinit>(LocalOfficeConnection.java:127)
    at com.sun.star.comp.beans.OOoBean.startOOoConnection(OOoBean.java:210)
    at
<...my stuff...>

After some investigation it seems on LibreOffice many library files are renamed from their OpenOffice name *.dll to *lo.dll

officebean.dll is also renamed to officebeanlo.dll

When i copy the library to it's original name (officebean.dll) my code works just as I expect, and just like a vanilla OpenOffice.org installation.

I think changing the value for com.sun.star.beans.LocalOfficeConnection.OFFICE_LIB_NAME to "officebeanlo" will solve this bug.
Comment 1 Not Assigned 2012-05-07 08:07:51 UTC
Stephan Bergmann committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=708229dc96533b6f165b82ce4d9e07537d1ce8b1

fdo#49580: Fix bean after gbuild'ification
Comment 2 Stephan Bergmann 2012-05-07 08:35:50 UTC
Created attachment 61143 [details]
OOoBean test
Comment 3 Stephan Bergmann 2012-05-07 08:36:12 UTC
Created attachment 61144 [details]
OOoBean test
Comment 4 Stephan Bergmann 2012-05-07 08:39:28 UTC
Created attachment 61146 [details]
OOoBean test: fixed Makefile
Comment 5 Stephan Bergmann 2012-05-07 08:43:28 UTC
As I did not find any working test code for OOoBean (and the SDK OOoBeanViewer.java example does not work out of the box): attached Makefile and OOoBeanViewer.patch work for my current (toward LO 3.6) master build (unxlngx6) -- you need to adapt INSTALLATION in Makefile, then running make should start soffice and the "OpenOffice.org demo", and in the latter "new document... - Text Document" should open one.
Comment 6 Stephan Bergmann 2012-05-07 08:50:34 UTC
(In reply to comment #5)
> attached Makefile and
> OOoBeanViewer.patch work for my current (toward LO 3.6) master build (unxlngx6)

...which needs to include <http://cgit.freedesktop.org/libreoffice/core/commit/?id=6752930497d1c9d0d1ebb29113e89bdaf9e53aaa> "LocalOfficeConnection description must end in ServiceManager"
Comment 7 Not Assigned 2012-05-08 02:18:06 UTC
Stephan Bergmann committed a patch related to this issue.
It has been pushed to "libreoffice-3-5":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=0f555363a3e12d45c3c1d7dcb26e32dc2dcf0ce2&g=libreoffice-3-5

fdo#49580: Fix bean after gbuild'ification


It will be available in LibreOffice 3.5.4.