Bug 40991 - Java UNO bridge - internal call arguments need updating to double hyphens
Summary: Java UNO bridge - internal call arguments need updating to double hyphens
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Extensions (show other bugs)
Version:
(earliest affected)
3.4.3 release
Hardware: x86 (IA32) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-18 09:05 UTC by pr.nienhuis
Modified: 2012-01-26 11:46 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pr.nienhuis 2011-09-18 09:05:23 UTC
(Background info: I'm using the Java-UNO bridge to develop I/O spreadsheet support for GNU Octave (see www.octave.org & octave.sf.net - IO package)

LibreOffice 3.4.1 
OOO340m1 (Build:103)

While invoking the UNO-Java bridge (or is it Java-UNO), invoking code suggested here (see Listings 1 to 6 there), (obviously translated to Octave lingo):

http://www.javaworld.com/cgi-bin/mailto/x_java.cgi?pagetosend=/export/home/httpd/javaworld/javaworld/jw-05-2008/jw-05-spreadsheets.html&pagename=/javaworld/jw-05-2008/jw-05-spreadsheets.html&pageurl=http://www.javaworld.com/javaworld/jw-05-2008/jw-05-spreadsheets.html&site=jw_core

... I get these warning errors w. LO 3.4.1 that didn't show up in LO 3.3.1:

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=uno6011403936746028229;urp; is deprecated.  Use --accept=pipe,name=uno6011403936746028229;urp; instead.

and the LibreOffice start menu window shows up while in LO 3.3.1 the logo was suppressed (as intended).
I suppose these warning messages relate to the internal Java code? - I only invoke the public Java methods and don't recognize the above arguments at all.

FYI I have the following class libs (.jar) in my javaclasspath so I suppose the errors stem from those:
 C:\Programs\LibreOffice 3.4\Basis\program\classes\unoil.jar
 C:\Programs\LibreOffice 3.4\URE\java\jurt.jar
 C:\Programs\LibreOffice 3.4\URE\java\juh.jar
 C:\Programs\LibreOffice 3.4\URE\java\unoloader.jar
 C:\Programs\LibreOffice 3.4\URE\java\ridl.jar

Obviously I only saw the above mentioned error messages; but as I only use a subset of the public interfaces I can't tell if there's much more code that still invokes single hyphens rather than double.
Comment 1 Markus Mohrhard 2011-10-06 04:21:36 UTC
this is not at calc bug, set the right component
Comment 2 pr.nienhuis 2011-10-12 05:41:04 UTC
(In reply to comment #1)
> this is not at calc bug, set the right component

Sorry, your comment is too terse for me, so I may have misunderstood.

Did I indicate Calc somewhere?
I do invoke Calc behind the scenes, yes, but I think this relate to the Java-UNO class libs in general.
Comment 3 Daniel Benkmann 2011-10-30 14:44:57 UTC
My guess is the problem lies within /javaunohelper/com/sun/star/comp/helper/Bootstrap.java which is packaged in juh.jar.

The method Bootstrap.bootstrap() contains the arguments with single hyphens, see lines 251 to 257 here:
http://cgit.freedesktop.org/libreoffice/core/tree/javaunohelper/com/sun/star/comp/helper/Bootstrap.java
Comment 4 Björn Michaelsen 2011-12-23 12:37:29 UTC
[This is an automated message.]
This bug was filed before the changes to Bugzilla on 2011-10-16. Thus it
started right out as NEW without ever being explicitly confirmed. The bug is
changed to state NEEDINFO for this reason. To move this bug from NEEDINFO back
to NEW please check if the bug still persists with the 3.5.0 beta1 or beta2 prereleases.
Details on how to test the 3.5.0 beta1 can be found at:
http://wiki.documentfoundation.org/QA/BugHunting_Session_3.5.0.-1

more detail on this bulk operation: http://nabble.documentfoundation.org/RFC-Operation-Spamzilla-tp3607474p3607474.html
Comment 5 pr.nienhuis 2011-12-24 05:57:42 UTC
Still present in LOdev 3.5 b2

Transcript from a sample Octave session:

ods = odsopen ('foo.ods', 0, 'uno');
Checking requested interface(s):
UNO*; (* = active interface)
filename = file:///C:/home/Philip/Mydocs/octave/spreadsheet-tst/foo.ods
octave:20> ods = odsclose (ods)
ods = [](0x0)
octave:21> 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=uno8184340080090947882;urp; is deprecated.  Use --accept=pipe,name=uno8184340080090947882;urp; instead.

So still the wrong Java calls in the LO jars, with single instead of double hyphens before arguments

I think comment 3 might hit the issue on the nose.
Comment 6 Andras Timar 2012-01-11 15:12:58 UTC
Should be fixed in LibreOffice 3.5 rc1 (not in beta3 that comes next).
http://cgit.freedesktop.org/libreoffice/core/commit/?h=libreoffice-3-5&id=c36fb812f806105901b0f5d1bd0315bcc5022812
Comment 7 pr.nienhuis 2012-01-26 11:19:59 UTC
Thanks Andras, indeed the error messages are gone in 3.5rc1.

However... I still see the LibreOffice window pop-up while I thought the relevant command switches should suppress it.
Has something changed in the cmd line arguments to hide the LO window?
Comment 8 Daniel Benkmann 2012-01-26 11:46:53 UTC
(In reply to comment #7)
> However... I still see the LibreOffice window pop-up while I thought the
> relevant command switches should suppress it.
> Has something changed in the cmd line arguments to hide the LO window?

--nodefault is broken, see https://bugs.freedesktop.org/show_bug.cgi?id=42470