Description: On pc Debian x86-64 with master sources updated today + OpenJDK 11, I got these logs on console: WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.sun.star.script.framework.container.XMLParserFactory$DefaultParser (file:/home/julien/lo/libreoffice/instdir/program/../program/classes/ScriptFramework.jar) to method com.sun.org.apache.xml.internal.serialize.OutputFormat.setMethod(java.lang.String) WARNING: Please consider reporting this to the maintainers of com.sun.star.script.framework.container.XMLParserFactory$DefaultParser WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release when creating a macro in BeanShell part Steps to Reproduce: 1. Launch LO 2. Tools/Macros/Organize Macros/BeanShell... 3. Select "Untitled 1" doc + click "Create..." The macro seems created but logs quoted display click on the macro Actual Results: "Edit" button is disabled + warnings on console just before when creating the macro Expected Results: No warning when creating the macro Edit button enabled Reproducible: Always User Profile Reset: No Additional Info:
seems, com.sun.org.apache.xml.internal.serialize.OutputFormat is deprecated: https://java-browser.yawk.at/java/10/java.xml/com/sun/org/apache/xml/internal/serialize/OutputFormat.java#com.sun.org.apache.xml.internal.serialize.OutputFormat
code pointer: https://opengrok.libreoffice.org/xref/core/scripting/java/com/sun/star/script/framework/container/XMLParserFactory.java?r=0063cf28#113 Olivier: you're right but we got to deal with Java versions. Stephan: I re read https://www.libreoffice.org/get-help/system-requirements/, if Java is indicated as prerequisite for Base mainly, minimum version isn't indicated. Searching in git history, I found your commit https://cgit.freedesktop.org/libreoffice/core/commit/?id=aafc10c9edb61e13ac557c7e43c8d4a31dce4f37. If I well understood, until 6.3 included, min Java version would be 1.6 and from future 6.4.0, it'll be 1.8 Any idea about a mechanism to deal from Java 6 until OpenJDK 11?
reproducible with: Version: 6.4.0.0.alpha0+ (x64) Build ID: 082e95f684e44954275dc58e306b8dc69590ac80 CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; Locale: de-DE (de_DE); UI-Language: en-US Calc: threaded IMHO the XMLSerializer class instantiation via introspection has to be replaced, cause Java 9 does not allow it anymore.
(In reply to Oliver Brinzing from comment #3) > ... > IMHO the XMLSerializer class instantiation via introspection has to be > replaced, cause Java 9 does not allow it anymore. It seems LSSerializer may be used even with Java6, https://www.doc.ic.ac.uk/csg-old/java/jdk6docs/api/org/w3c/dom/ls/LSSerializer.html
I'm not sure but it seems that with LSSerializer, we can avoid using formatterClass and just keep serializerClass. Perhaps we can remove the try/catch and avoid the introspection and plainly use LSSerializer.
(In reply to Julien Nabet from comment #5) > I'm not sure but it seems that with LSSerializer, we can avoid using > formatterClass and just keep serializerClass. Perhaps we can remove the > try/catch and avoid the introspection and plainly use LSSerializer. I meant "LSSerializerImpl" since "LSSerializer" is just an interface. Now the problem is I don't know how to use this class since import don't work. I searched how to import to avoid all the introspection stuff (it's quite ugly and I suppose it doesn't help for speed) but failed. I must recognize I'm stuck.
(In reply to Julien Nabet from comment #0) > Steps to Reproduce: > 1. Launch LO > 2. Tools/Macros/Organize Macros/BeanShell... > 3. Select "Untitled 1" doc + click "Create..." ...which opens a "Create Library" dialog that asks for a name, with "Library1" already suggested, so press "OK"; then click on the triangle to the left of "Untitled 1" to expand it, then click on "Library1", then click "Create..." which opens a "Create Macro" dialog that asks for a name, with "Macro1" already suggested, so press "OK"; then click on the triangle to the left of "Library1" to expand it, then click on "Macro1.bsh", then click on "Edit" which is now enabled. > The macro seems created but logs quoted display > > click on the macro > > Actual Results: > "Edit" button is disabled See above. Looks like you didn't follow all those steps that are required to edit a new macro? > + warnings on console just before when creating the macro Those are apparently only warnings for now (i.e., with Java 11, and also tested now with OpenJava 12.0.2 where it's still only a warning). That leaves us some more time to come up with a fix eventually. :)
(In reply to Julien Nabet from comment #6) > Now the problem is I don't know how to use this class since import don't > work. > I searched how to import to avoid all the introspection stuff (it's quite > ugly and I suppose it doesn't help for speed) but failed. maybe something like this can help: import java.io.StringWriter; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import org.w3c.dom.DOMConfiguration; import org.w3c.dom.DOMImplementation; import org.w3c.dom.DOMStringList; import org.w3c.dom.Document; import org.w3c.dom.Node; import org.w3c.dom.ls.DOMImplementationLS; import org.w3c.dom.ls.LSOutput; import org.w3c.dom.ls.LSSerializer; public class LSSerialize { public static void main(String[] args) throws Exception { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); Document document = builder.newDocument(); Node n = document.appendChild(document.createElement("Hello")); n.appendChild(document.createElement("World")); DOMImplementation impl = document.getImplementation(); DOMImplementationLS implLS = (DOMImplementationLS) impl.getFeature("LS", "3.0"); LSSerializer dsi = implLS.createLSSerializer(); DOMConfiguration dc = dsi.getDomConfig(); DOMStringList params = dc.getParameterNames(); for (int i = 0; i < params.getLength(); i++) { System.out.println(params.item(i)); } dc.setParameter("well-formed", true); dc.setParameter("format-pretty-print", true); dc.setParameter("xml-declaration", true); LSOutput lsOutput = implLS.createLSOutput(); lsOutput.setEncoding("UTF-8"); StringWriter stringWriter = new StringWriter(); lsOutput.setCharacterStream(stringWriter); dsi.write(document, lsOutput); System.out.println("\n" + stringWriter.toString()); } }
(In reply to Stephan Bergmann from comment #7) > ... > See above. Looks like you didn't follow all those steps that are required > to edit a new macro? > ... Yes I saw this on Win10, I wanted to retest tonight on my Linux computer > > + warnings on console just before when creating the macro > > Those are apparently only warnings for now (i.e., with Java 11, and also > tested now with OpenJava 12.0.2 where it's still only a warning). That > leaves us some more time to come up with a fix eventually. :) Yes and when 6.3 will be EOL, we'll be able to deal with Java from 1.8 instead of 1.6
Stephan: I changed the title of the bugtracker, should we keep this one opened or should we close it?
(In reply to Julien Nabet from comment #10) > Stephan: I changed the title of the bugtracker, should we keep this one > opened or should we close it? Lets keep it open. We will need a fix once that warning is turned into an error in a future version of Java. (Using LSSerializer as discussed in earlier comments here looks like a good way to go.)
Dear Julien Nabet, To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the information from Help - About LibreOffice. If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice. Please DO NOT Update the version field Reply via email (please reply directly on the bug tracker) Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to 'inherited from OOo'; 4b. If the bug was not present in 3.3 - add 'regression' to keyword Feel free to come ask questions or to say hello in our QA chat: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug
With master sources updated today, I don't have these logs anymore, just the usual: warn:i18nlangtag:7779:7779:i18nlangtag/source/languagetag/languagetag.cxx:1648: LanguageTag::getRegionFromLangtag: pRegionT==NULL for 'eo-EO' warn:i18nlangtag:7779:7779:i18nlangtag/source/languagetag/languagetag.cxx:1648: LanguageTag::getRegionFromLangtag: pRegionT==NULL for 'eo-EO' warn:sal.osl:7779:7779:sal/osl/unx/module.cxx:155: dlopen(/home/julien/lo/libreoffice/instdir/program/libjava_gcc3.so, 257): /home/julien/lo/libreoffice/instdir/program/libjava_gcc3.so: cannot open shared object file: No such file or directory warn:sal.osl:7779:7779:sal/osl/unx/module.cxx:155: dlopen(/home/julien/lo/libreoffice/instdir/program/libgcc3_java.so, 257): /home/julien/lo/libreoffice/instdir/program/libgcc3_java.so: cannot open shared object file: No such file or directory Remark: "Edit" button is still disabled. Since the bug concerned only logs, let's put this one to WFM then. If you want to reopen it for "Edit" part, don't hesitate of course.