<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hi,</p>
    <p><span class="tlid-translation translation" lang="en"><span
          title="">Thanks for the suggestion, but it's like we're
          talking about two different things.</span><br>
        <span title="" class="">On my LO local installation as of today,
          DocumentLoader can't pass!</span></span></p>
    <div class="moz-cite-prefix">On 6.9.19. 13:44, Stephan Bergmann
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:256d314a-8ec6-fb08-452a-1e3c48e27773@redhat.com">On
      05/09/2019 17:30, gmail Vladimir Koković wrote:
      <br>
      <blockquote type="cite">Also, the following example odk/examples
        /java/DocumentHandling/DocumentLoader.java generates an
        exception:
        <br>
      </blockquote>
      <br>
      What works fine for me with a recent local LO master build on
      Linux is:
      <br>
      <br>
      > $ cd instdir/sdk
      <br>
      > $ ./setsdkenv_unix
      <br>
      [...]
      <br>
      > $ cd examples/java/DocumentHandling
      <br>
      > $ make
      <br>
      [...]
      <br>
      > $ make DocumentLoader.run
      <br>
      [...]
      <br>
      > # LO starts up showing some sample Writer document
      <br>
      <br>
      So maybe you are using the SDK in a wrong way; or else you would
      need to debug why things don't work for you.
      <br>
    </blockquote>
    <p><br>
    </p>
    <p>[root@vlada-kuci libreoffice-vk 16:34:20]#
      /mnt/sdd1/home/src/libreoffice-vk/libreoffice/instdir/sdk/setsdkenv_unix
      <br>
      <br>
 ************************************************************************<br>
       *<br>
       * SDK environment is prepared for Linux<br>
       *<br>
       * SDK = /mnt/sdd1/home/src/libreoffice-vk/libreoffice/instdir/sdk<br>
       * Office =
      /mnt/sdd1/home/src/libreoffice-vk/libreoffice/instdir/sdk/..<br>
       * Make = /usr/bin<br>
       * Zip = /usr/bin<br>
       * cat = /usr/bin<br>
       * sed = /usr/bin<br>
       * C++ Compiler = /usr/bin<br>
       * Java = /usr/lib/jvm/default<br>
       * SDK Output directory = /root/libreoffice6.4_sdk<br>
       * Auto deployment = YES<br>
       *<br>
 ************************************************************************<br>
      [root@vlada-kuci libreoffice-vk 16:35:30]#<br>
      <br>
      [root@vlada-kuci libreoffice-vk 16:44:37]#
      ./build-libreoffice-check-sbergman.sh <br>
      set -e<br>
      <br>
      cd libreoffice<br>
      <br>
      cd instdir/sdk<br>
      # ./setsdkenv_unix<br>
      <br>
      cd examples/java/DocumentHandling<br>
      <br>
      make > ../../../../../../make-outxyzz1.log 2>&1<br>
      make DocumentLoader.run >>
      ../../../../../../make-outxyzz1.log 2>&1<br>
      [root@vlada-kuci libreoffice-vk 16:44:51]#<br>
      <br>
      cat make-outxyzz1.log<br>
      ---------------------<br>
      mkdir -p
/root/libreoffice6.4_sdk/LINUXexample.out/class/JavaDocumentHandlingExamples<br>
      mkdir -p
/root/libreoffice6.4_sdk/LINUXexample.out/class/JavaDocumentHandlingExamples<br>
      "/usr/lib/jvm/default/bin/javac"  -classpath
"/mnt/sdd1/home/src/libreoffice-vk/libreoffice/instdir/sdk/../program/classes/juh.jar:/mnt/sdd1/home/src/libreoffice-vk/libreoffice/instdir/sdk/../program/classes/jurt.jar:/mnt/sdd1/home/src/libreoffice-vk/libreoffice/instdir/sdk/../program/classes/ridl.jar:/mnt/sdd1/home/src/libreoffice-vk/libreoffice/instdir/sdk/../program/classes/unoloader.jar:/mnt/sdd1/home/src/libreoffice-vk/libreoffice/instdir/sdk/../program/classes/unoil.jar::/root/libreoffice6.4_sdk/LINUXexample.out/class/JavaDocumentHandlingExamples"
      -d
/root/libreoffice6.4_sdk/LINUXexample.out/class/JavaDocumentHandlingExamples
      DocumentConverter.java<br>
      mkdir -p
/root/libreoffice6.4_sdk/LINUXexample.out/class/JavaDocumentHandlingExamples<br>
      cd
/root/libreoffice6.4_sdk/LINUXexample.out/class/JavaDocumentHandlingExamples
      && "/usr/lib/jvm/default/bin/jar" cvfm
      DocumentConverter.jar DocumentConverter.mf DocumentConverter.class<br>
      added manifest<br>
      adding: DocumentConverter.class(in = 4216) (out= 2304)(deflated
      45%)<br>
      "/usr/lib/jvm/default/bin/jar" uvf
/root/libreoffice6.4_sdk/LINUXexample.out/class/JavaDocumentHandlingExamples/DocumentConverter.jar
      -C ../../../classes 'com/sun/star/lib/loader/' -C ../../../classes
      'win/unowinreg.dll'<br>
      adding: com/sun/star/lib/loader/(in = 0) (out= 0)(stored 0%)<br>
      adding: com/sun/star/lib/loader/InstallationFinder.class(in =
      9839) (out= 5312)(deflated 46%)<br>
      adding: com/sun/star/lib/loader/Loader$1.class(in = 916) (out=
      490)(deflated 46%)<br>
      adding: com/sun/star/lib/loader/WinRegKeyException.class(in = 475)
      (out= 287)(deflated 39%)<br>
      adding:
      com/sun/star/lib/loader/Loader$CustomURLClassLoader.class(in =
      1465) (out= 723)(deflated 50%)<br>
      adding: com/sun/star/lib/loader/WinRegKey.class(in = 5205) (out=
      2672)(deflated 48%)<br>
      adding:
      com/sun/star/lib/loader/InstallationFinder$StreamGobbler.class(in
      = 1103) (out= 624)(deflated 43%)<br>
      adding: com/sun/star/lib/loader/Loader$Drain.class(in = 735) (out=
      462)(deflated 37%)<br>
      adding: com/sun/star/lib/loader/Loader.class(in = 8526) (out=
      4109)(deflated 51%)<br>
      adding: win/unowinreg.dll(in = 12288) (out= 1712)(deflated 86%)<br>
      mkdir -p
/root/libreoffice6.4_sdk/LINUXexample.out/class/JavaDocumentHandlingExamples<br>
      mkdir -p
/root/libreoffice6.4_sdk/LINUXexample.out/class/JavaDocumentHandlingExamples<br>
      "/usr/lib/jvm/default/bin/javac"  -classpath
"/mnt/sdd1/home/src/libreoffice-vk/libreoffice/instdir/sdk/../program/classes/juh.jar:/mnt/sdd1/home/src/libreoffice-vk/libreoffice/instdir/sdk/../program/classes/jurt.jar:/mnt/sdd1/home/src/libreoffice-vk/libreoffice/instdir/sdk/../program/classes/ridl.jar:/mnt/sdd1/home/src/libreoffice-vk/libreoffice/instdir/sdk/../program/classes/unoloader.jar:/mnt/sdd1/home/src/libreoffice-vk/libreoffice/instdir/sdk/../program/classes/unoil.jar::/root/libreoffice6.4_sdk/LINUXexample.out/class/JavaDocumentHandlingExamples"
      -d
/root/libreoffice6.4_sdk/LINUXexample.out/class/JavaDocumentHandlingExamples
      DocumentLoader.java<br>
      mkdir -p
/root/libreoffice6.4_sdk/LINUXexample.out/class/JavaDocumentHandlingExamples<br>
      cd
/root/libreoffice6.4_sdk/LINUXexample.out/class/JavaDocumentHandlingExamples
      && "/usr/lib/jvm/default/bin/jar" cvfm DocumentLoader.jar
      DocumentLoader.mf DocumentLoader.class<br>
      added manifest<br>
      adding: DocumentLoader.class(in = 2245) (out= 1224)(deflated 45%)<br>
      "/usr/lib/jvm/default/bin/jar" uvf
/root/libreoffice6.4_sdk/LINUXexample.out/class/JavaDocumentHandlingExamples/DocumentLoader.jar
      -C ../../../classes 'com/sun/star/lib/loader/' -C ../../../classes
      'win/unowinreg.dll'<br>
      adding: com/sun/star/lib/loader/(in = 0) (out= 0)(stored 0%)<br>
      adding: com/sun/star/lib/loader/InstallationFinder.class(in =
      9839) (out= 5312)(deflated 46%)<br>
      adding: com/sun/star/lib/loader/Loader$1.class(in = 916) (out=
      490)(deflated 46%)<br>
      adding: com/sun/star/lib/loader/WinRegKeyException.class(in = 475)
      (out= 287)(deflated 39%)<br>
      adding:
      com/sun/star/lib/loader/Loader$CustomURLClassLoader.class(in =
      1465) (out= 723)(deflated 50%)<br>
      adding: com/sun/star/lib/loader/WinRegKey.class(in = 5205) (out=
      2672)(deflated 48%)<br>
      adding:
      com/sun/star/lib/loader/InstallationFinder$StreamGobbler.class(in
      = 1103) (out= 624)(deflated 43%)<br>
      adding: com/sun/star/lib/loader/Loader$Drain.class(in = 735) (out=
      462)(deflated 37%)<br>
      adding: com/sun/star/lib/loader/Loader.class(in = 8526) (out=
      4109)(deflated 51%)<br>
      adding: win/unowinreg.dll(in = 12288) (out= 1712)(deflated 86%)<br>
      mkdir -p
/root/libreoffice6.4_sdk/LINUXexample.out/class/JavaDocumentHandlingExamples<br>
      mkdir -p
/root/libreoffice6.4_sdk/LINUXexample.out/class/JavaDocumentHandlingExamples<br>
      "/usr/lib/jvm/default/bin/javac"  -classpath
"/mnt/sdd1/home/src/libreoffice-vk/libreoffice/instdir/sdk/../program/classes/juh.jar:/mnt/sdd1/home/src/libreoffice-vk/libreoffice/instdir/sdk/../program/classes/jurt.jar:/mnt/sdd1/home/src/libreoffice-vk/libreoffice/instdir/sdk/../program/classes/ridl.jar:/mnt/sdd1/home/src/libreoffice-vk/libreoffice/instdir/sdk/../program/classes/unoloader.jar:/mnt/sdd1/home/src/libreoffice-vk/libreoffice/instdir/sdk/../program/classes/unoil.jar::/root/libreoffice6.4_sdk/LINUXexample.out/class/JavaDocumentHandlingExamples"
      -d
/root/libreoffice6.4_sdk/LINUXexample.out/class/JavaDocumentHandlingExamples
      DocumentPrinter.java<br>
      mkdir -p
/root/libreoffice6.4_sdk/LINUXexample.out/class/JavaDocumentHandlingExamples<br>
      cd
/root/libreoffice6.4_sdk/LINUXexample.out/class/JavaDocumentHandlingExamples
      && "/usr/lib/jvm/default/bin/jar" cvfm DocumentPrinter.jar
      DocumentPrinter.mf DocumentPrinter.class<br>
      added manifest<br>
      adding: DocumentPrinter.class(in = 2472) (out= 1353)(deflated 45%)<br>
      "/usr/lib/jvm/default/bin/jar" uvf
/root/libreoffice6.4_sdk/LINUXexample.out/class/JavaDocumentHandlingExamples/DocumentPrinter.jar
      -C ../../../classes 'com/sun/star/lib/loader/' -C ../../../classes
      'win/unowinreg.dll'<br>
      adding: com/sun/star/lib/loader/(in = 0) (out= 0)(stored 0%)<br>
      adding: com/sun/star/lib/loader/InstallationFinder.class(in =
      9839) (out= 5312)(deflated 46%)<br>
      adding: com/sun/star/lib/loader/Loader$1.class(in = 916) (out=
      490)(deflated 46%)<br>
      adding: com/sun/star/lib/loader/WinRegKeyException.class(in = 475)
      (out= 287)(deflated 39%)<br>
      adding:
      com/sun/star/lib/loader/Loader$CustomURLClassLoader.class(in =
      1465) (out= 723)(deflated 50%)<br>
      adding: com/sun/star/lib/loader/WinRegKey.class(in = 5205) (out=
      2672)(deflated 48%)<br>
      adding:
      com/sun/star/lib/loader/InstallationFinder$StreamGobbler.class(in
      = 1103) (out= 624)(deflated 43%)<br>
      adding: com/sun/star/lib/loader/Loader$Drain.class(in = 735) (out=
      462)(deflated 37%)<br>
      adding: com/sun/star/lib/loader/Loader.class(in = 8526) (out=
      4109)(deflated 51%)<br>
      adding: win/unowinreg.dll(in = 12288) (out= 1712)(deflated 86%)<br>
      mkdir -p
/root/libreoffice6.4_sdk/LINUXexample.out/class/JavaDocumentHandlingExamples<br>
      mkdir -p
/root/libreoffice6.4_sdk/LINUXexample.out/class/JavaDocumentHandlingExamples<br>
      "/usr/lib/jvm/default/bin/javac"  -classpath
"/mnt/sdd1/home/src/libreoffice-vk/libreoffice/instdir/sdk/../program/classes/juh.jar:/mnt/sdd1/home/src/libreoffice-vk/libreoffice/instdir/sdk/../program/classes/jurt.jar:/mnt/sdd1/home/src/libreoffice-vk/libreoffice/instdir/sdk/../program/classes/ridl.jar:/mnt/sdd1/home/src/libreoffice-vk/libreoffice/instdir/sdk/../program/classes/unoloader.jar:/mnt/sdd1/home/src/libreoffice-vk/libreoffice/instdir/sdk/../program/classes/unoil.jar::/root/libreoffice6.4_sdk/LINUXexample.out/class/JavaDocumentHandlingExamples"
      -d
/root/libreoffice6.4_sdk/LINUXexample.out/class/JavaDocumentHandlingExamples
      DocumentSaver.java<br>
      mkdir -p
/root/libreoffice6.4_sdk/LINUXexample.out/class/JavaDocumentHandlingExamples<br>
      cd
/root/libreoffice6.4_sdk/LINUXexample.out/class/JavaDocumentHandlingExamples
      && "/usr/lib/jvm/default/bin/jar" cvfm DocumentSaver.jar
      DocumentSaver.mf DocumentSaver.class<br>
      added manifest<br>
      adding: DocumentSaver.class(in = 3245) (out= 1728)(deflated 46%)<br>
      "/usr/lib/jvm/default/bin/jar" uvf
/root/libreoffice6.4_sdk/LINUXexample.out/class/JavaDocumentHandlingExamples/DocumentSaver.jar
      -C ../../../classes 'com/sun/star/lib/loader/' -C ../../../classes
      'win/unowinreg.dll'<br>
      adding: com/sun/star/lib/loader/(in = 0) (out= 0)(stored 0%)<br>
      adding: com/sun/star/lib/loader/InstallationFinder.class(in =
      9839) (out= 5312)(deflated 46%)<br>
      adding: com/sun/star/lib/loader/Loader$1.class(in = 916) (out=
      490)(deflated 46%)<br>
      adding: com/sun/star/lib/loader/WinRegKeyException.class(in = 475)
      (out= 287)(deflated 39%)<br>
      adding:
      com/sun/star/lib/loader/Loader$CustomURLClassLoader.class(in =
      1465) (out= 723)(deflated 50%)<br>
      adding: com/sun/star/lib/loader/WinRegKey.class(in = 5205) (out=
      2672)(deflated 48%)<br>
      adding:
      com/sun/star/lib/loader/InstallationFinder$StreamGobbler.class(in
      = 1103) (out= 624)(deflated 43%)<br>
      adding: com/sun/star/lib/loader/Loader$Drain.class(in = 735) (out=
      462)(deflated 37%)<br>
      adding: com/sun/star/lib/loader/Loader.class(in = 8526) (out=
      4109)(deflated 51%)<br>
      adding: win/unowinreg.dll(in = 12288) (out= 1712)(deflated 86%)<br>
--------------------------------------------------------------------------------<br>
      The DocumentConverter search the "./test" directory for documents,
      convert<br>
      them using the "MS Word 97" filter and the extension ".doc".<br>
      The converted files are store in
"/root/libreoffice6.4_sdk/LINUXexample.out/misc/JavaDocumentHandlingExamples/converted_files".<br>
      The list of possible filter names can change. Normally an updated
      list can be found<br>
      on
<a class="moz-txt-link-rfc2396E" href="http://www.openoffice.org/files/documents/25/111/filter_description.html">"http://www.openoffice.org/files/documents/25/111/filter_description.html"</a>.<br>
      -<br>
      The DocumentLoader loads the document "./test/test1.odt".<br>
      -<br>
      The DocumentPrinter prints the document "./test/test1.odt" using
      the<br>
      the specified printer. If the printer is unknown, the default
      printer is used.<br>
      -<br>
      The loads the document "./test/test1.odt" and saves it<br>
      under
"/root/libreoffice6.4_sdk/LINUXexample.out/misc/JavaDocumentHandlingExamples/savetest/testsave.odt".<br>
      -<br>
      Please use one of the following commands to execute the examples!<br>
      -<br>
      make DocumentConverter.run<br>
      make DocumentLoader.run<br>
      make DocumentPrinter.run<br>
      make DocumentSaver.run<br>
      --------<br>
      The examples need parameters. Please use one the following
      commands to<br>
      start the demo if you do not want the default parameters specified
      in the<br>
      this makefile. Starting without parameters print a command line
      help:<br>
      --- DocumentConverter ---<br>
      java -jar DocumentConverter.jar "directory" "filter name"
      "extension" "output_directory"<br>
      --- DocumentLoader ---<br>
      java -jar DocumentLoader.jar "Url|path"<br>
      --- DocumentPrinter ---<br>
      java -jar DocumentPrinter.jar "printername" "filename" "pages"<br>
      --- DocumentSaver ---<br>
      java -jar DocumentSaver.jar "load Url|path" "save Url|path"<br>
--------------------------------------------------------------------------------<br>
      "/usr/lib/jvm/default/bin/java" 
-Dcom.sun.star.lib.loader.unopath="/mnt/sdd1/home/src/libreoffice-vk/libreoffice/instdir/sdk/../program"
      -jar
/root/libreoffice6.4_sdk/LINUXexample.out/class/JavaDocumentHandlingExamples/DocumentLoader.jar
      "./test/test1.odt"<br>
      Connected to a running office ...<br>
      CE> QObject::setParent: Cannot set parent, new parent is in a
      different thread<br>
      CE> soffice.bin:
/mnt/sdd1/home/src/libreoffice-vk/libreoffice/vcl/qt5/Qt5Clipboard.cxx:44:
      static
      com::sun::star::uno::Reference<com::sun::star::uno::XInterface>
      Qt5Clipboard::create(const rtl::OUString&): Assertion
      `QApplication::clipboard()->thread() == qApp->thread()'
      failed.<br>
      CE>
      warn:desktop:4656:4671:desktop/source/app/sofficemain.cxx:88:
      minidump generated: /tmp/14614905-f0cf-c864-2332da26-7532e071.dmp<br>
      CE> Application Error<br>
      com.sun.star.lang.DisposedException<br>
          at
com.sun.star.lib.uno.environments.remote.JobQueue.removeJob(JobQueue.java:201)<br>
          at
com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:308)<br>
          at
com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:281)<br>
          at
com.sun.star.lib.uno.environments.remote.JavaThreadPool.enter(JavaThreadPool.java:81)<br>
          at
com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.sendRequest(java_remote_bridge.java:619)<br>
          at
com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.request(ProxyFactory.java:145)<br>
          at
com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.invoke(ProxyFactory.java:129)<br>
          at com.sun.proxy.$Proxy3.loadComponentFromURL(Unknown Source)<br>
          at DocumentLoader.main(DocumentLoader.java:79)<br>
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>
          at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)<br>
          at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)<br>
          at java.lang.reflect.Method.invoke(Method.java:498)<br>
          at com.sun.star.lib.loader.Loader.main(Loader.java:132)<br>
      Caused by: java.io.EOFException<br>
          at java.io.DataInputStream.readInt(DataInputStream.java:392)<br>
          at
      com.sun.star.lib.uno.protocols.urp.urp.readBlock(urp.java:364)<br>
          at
      com.sun.star.lib.uno.protocols.urp.urp.readMessage(urp.java:96)<br>
          at
com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge$MessageDispatcher.run(java_remote_bridge.java:92)<br>
      make: *** [Makefile:132: DocumentLoader.run] Error 1<br>
    </p>
    <p>Regards,</p>
    <p>Vladimir Koković, DP senior(69)</p>
    <p>Serbia, Belgrade, 6.sep 2019</p>
  </body>
</html>