JunitTest_bean_complex - odk example DocumentLoader failed

gmail Vladimir Koković vladimir.kokovic at gmail.com
Fri Sep 6 15:15:09 UTC 2019


Hi,

Thanks for the suggestion, but it's like we're talking about two 
different things.
On my LO local installation as of today, DocumentLoader can't pass!

On 6.9.19. 13:44, Stephan Bergmann wrote:
> On 05/09/2019 17:30, gmail Vladimir Koković wrote:
>> Also, the following example odk/examples 
>> /java/DocumentHandling/DocumentLoader.java generates an exception:
>
> What works fine for me with a recent local LO master build on Linux is:
>
> > $ cd instdir/sdk
> > $ ./setsdkenv_unix
> [...]
> > $ cd examples/java/DocumentHandling
> > $ make
> [...]
> > $ make DocumentLoader.run
> [...]
> > # LO starts up showing some sample Writer document
>
> 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.


[root at vlada-kuci libreoffice-vk 16:34:20]# 
/mnt/sdd1/home/src/libreoffice-vk/libreoffice/instdir/sdk/setsdkenv_unix

  ************************************************************************
  *
  * SDK environment is prepared for Linux
  *
  * SDK = /mnt/sdd1/home/src/libreoffice-vk/libreoffice/instdir/sdk
  * Office = /mnt/sdd1/home/src/libreoffice-vk/libreoffice/instdir/sdk/..
  * Make = /usr/bin
  * Zip = /usr/bin
  * cat = /usr/bin
  * sed = /usr/bin
  * C++ Compiler = /usr/bin
  * Java = /usr/lib/jvm/default
  * SDK Output directory = /root/libreoffice6.4_sdk
  * Auto deployment = YES
  *
  ************************************************************************
[root at vlada-kuci libreoffice-vk 16:35:30]#

[root at vlada-kuci libreoffice-vk 16:44:37]# 
./build-libreoffice-check-sbergman.sh
set -e

cd libreoffice

cd instdir/sdk
# ./setsdkenv_unix

cd examples/java/DocumentHandling

make > ../../../../../../make-outxyzz1.log 2>&1
make DocumentLoader.run >> ../../../../../../make-outxyzz1.log 2>&1
[root at vlada-kuci libreoffice-vk 16:44:51]#

cat make-outxyzz1.log
---------------------
mkdir -p 
/root/libreoffice6.4_sdk/LINUXexample.out/class/JavaDocumentHandlingExamples
mkdir -p 
/root/libreoffice6.4_sdk/LINUXexample.out/class/JavaDocumentHandlingExamples
"/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
mkdir -p 
/root/libreoffice6.4_sdk/LINUXexample.out/class/JavaDocumentHandlingExamples
cd 
/root/libreoffice6.4_sdk/LINUXexample.out/class/JavaDocumentHandlingExamples 
&& "/usr/lib/jvm/default/bin/jar" cvfm DocumentConverter.jar 
DocumentConverter.mf DocumentConverter.class
added manifest
adding: DocumentConverter.class(in = 4216) (out= 2304)(deflated 45%)
"/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'
adding: com/sun/star/lib/loader/(in = 0) (out= 0)(stored 0%)
adding: com/sun/star/lib/loader/InstallationFinder.class(in = 9839) 
(out= 5312)(deflated 46%)
adding: com/sun/star/lib/loader/Loader$1.class(in = 916) (out= 
490)(deflated 46%)
adding: com/sun/star/lib/loader/WinRegKeyException.class(in = 475) (out= 
287)(deflated 39%)
adding: com/sun/star/lib/loader/Loader$CustomURLClassLoader.class(in = 
1465) (out= 723)(deflated 50%)
adding: com/sun/star/lib/loader/WinRegKey.class(in = 5205) (out= 
2672)(deflated 48%)
adding: 
com/sun/star/lib/loader/InstallationFinder$StreamGobbler.class(in = 
1103) (out= 624)(deflated 43%)
adding: com/sun/star/lib/loader/Loader$Drain.class(in = 735) (out= 
462)(deflated 37%)
adding: com/sun/star/lib/loader/Loader.class(in = 8526) (out= 
4109)(deflated 51%)
adding: win/unowinreg.dll(in = 12288) (out= 1712)(deflated 86%)
mkdir -p 
/root/libreoffice6.4_sdk/LINUXexample.out/class/JavaDocumentHandlingExamples
mkdir -p 
/root/libreoffice6.4_sdk/LINUXexample.out/class/JavaDocumentHandlingExamples
"/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
mkdir -p 
/root/libreoffice6.4_sdk/LINUXexample.out/class/JavaDocumentHandlingExamples
cd 
/root/libreoffice6.4_sdk/LINUXexample.out/class/JavaDocumentHandlingExamples 
&& "/usr/lib/jvm/default/bin/jar" cvfm DocumentLoader.jar 
DocumentLoader.mf DocumentLoader.class
added manifest
adding: DocumentLoader.class(in = 2245) (out= 1224)(deflated 45%)
"/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'
adding: com/sun/star/lib/loader/(in = 0) (out= 0)(stored 0%)
adding: com/sun/star/lib/loader/InstallationFinder.class(in = 9839) 
(out= 5312)(deflated 46%)
adding: com/sun/star/lib/loader/Loader$1.class(in = 916) (out= 
490)(deflated 46%)
adding: com/sun/star/lib/loader/WinRegKeyException.class(in = 475) (out= 
287)(deflated 39%)
adding: com/sun/star/lib/loader/Loader$CustomURLClassLoader.class(in = 
1465) (out= 723)(deflated 50%)
adding: com/sun/star/lib/loader/WinRegKey.class(in = 5205) (out= 
2672)(deflated 48%)
adding: 
com/sun/star/lib/loader/InstallationFinder$StreamGobbler.class(in = 
1103) (out= 624)(deflated 43%)
adding: com/sun/star/lib/loader/Loader$Drain.class(in = 735) (out= 
462)(deflated 37%)
adding: com/sun/star/lib/loader/Loader.class(in = 8526) (out= 
4109)(deflated 51%)
adding: win/unowinreg.dll(in = 12288) (out= 1712)(deflated 86%)
mkdir -p 
/root/libreoffice6.4_sdk/LINUXexample.out/class/JavaDocumentHandlingExamples
mkdir -p 
/root/libreoffice6.4_sdk/LINUXexample.out/class/JavaDocumentHandlingExamples
"/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
mkdir -p 
/root/libreoffice6.4_sdk/LINUXexample.out/class/JavaDocumentHandlingExamples
cd 
/root/libreoffice6.4_sdk/LINUXexample.out/class/JavaDocumentHandlingExamples 
&& "/usr/lib/jvm/default/bin/jar" cvfm DocumentPrinter.jar 
DocumentPrinter.mf DocumentPrinter.class
added manifest
adding: DocumentPrinter.class(in = 2472) (out= 1353)(deflated 45%)
"/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'
adding: com/sun/star/lib/loader/(in = 0) (out= 0)(stored 0%)
adding: com/sun/star/lib/loader/InstallationFinder.class(in = 9839) 
(out= 5312)(deflated 46%)
adding: com/sun/star/lib/loader/Loader$1.class(in = 916) (out= 
490)(deflated 46%)
adding: com/sun/star/lib/loader/WinRegKeyException.class(in = 475) (out= 
287)(deflated 39%)
adding: com/sun/star/lib/loader/Loader$CustomURLClassLoader.class(in = 
1465) (out= 723)(deflated 50%)
adding: com/sun/star/lib/loader/WinRegKey.class(in = 5205) (out= 
2672)(deflated 48%)
adding: 
com/sun/star/lib/loader/InstallationFinder$StreamGobbler.class(in = 
1103) (out= 624)(deflated 43%)
adding: com/sun/star/lib/loader/Loader$Drain.class(in = 735) (out= 
462)(deflated 37%)
adding: com/sun/star/lib/loader/Loader.class(in = 8526) (out= 
4109)(deflated 51%)
adding: win/unowinreg.dll(in = 12288) (out= 1712)(deflated 86%)
mkdir -p 
/root/libreoffice6.4_sdk/LINUXexample.out/class/JavaDocumentHandlingExamples
mkdir -p 
/root/libreoffice6.4_sdk/LINUXexample.out/class/JavaDocumentHandlingExamples
"/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
mkdir -p 
/root/libreoffice6.4_sdk/LINUXexample.out/class/JavaDocumentHandlingExamples
cd 
/root/libreoffice6.4_sdk/LINUXexample.out/class/JavaDocumentHandlingExamples 
&& "/usr/lib/jvm/default/bin/jar" cvfm DocumentSaver.jar 
DocumentSaver.mf DocumentSaver.class
added manifest
adding: DocumentSaver.class(in = 3245) (out= 1728)(deflated 46%)
"/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'
adding: com/sun/star/lib/loader/(in = 0) (out= 0)(stored 0%)
adding: com/sun/star/lib/loader/InstallationFinder.class(in = 9839) 
(out= 5312)(deflated 46%)
adding: com/sun/star/lib/loader/Loader$1.class(in = 916) (out= 
490)(deflated 46%)
adding: com/sun/star/lib/loader/WinRegKeyException.class(in = 475) (out= 
287)(deflated 39%)
adding: com/sun/star/lib/loader/Loader$CustomURLClassLoader.class(in = 
1465) (out= 723)(deflated 50%)
adding: com/sun/star/lib/loader/WinRegKey.class(in = 5205) (out= 
2672)(deflated 48%)
adding: 
com/sun/star/lib/loader/InstallationFinder$StreamGobbler.class(in = 
1103) (out= 624)(deflated 43%)
adding: com/sun/star/lib/loader/Loader$Drain.class(in = 735) (out= 
462)(deflated 37%)
adding: com/sun/star/lib/loader/Loader.class(in = 8526) (out= 
4109)(deflated 51%)
adding: win/unowinreg.dll(in = 12288) (out= 1712)(deflated 86%)
--------------------------------------------------------------------------------
The DocumentConverter search the "./test" directory for documents, convert
them using the "MS Word 97" filter and the extension ".doc".
The converted files are store in 
"/root/libreoffice6.4_sdk/LINUXexample.out/misc/JavaDocumentHandlingExamples/converted_files".
The list of possible filter names can change. Normally an updated list 
can be found
on 
"http://www.openoffice.org/files/documents/25/111/filter_description.html".
-
The DocumentLoader loads the document "./test/test1.odt".
-
The DocumentPrinter prints the document "./test/test1.odt" using the
the specified printer. If the printer is unknown, the default printer is 
used.
-
The loads the document "./test/test1.odt" and saves it
under 
"/root/libreoffice6.4_sdk/LINUXexample.out/misc/JavaDocumentHandlingExamples/savetest/testsave.odt".
-
Please use one of the following commands to execute the examples!
-
make DocumentConverter.run
make DocumentLoader.run
make DocumentPrinter.run
make DocumentSaver.run
--------
The examples need parameters. Please use one the following commands to
start the demo if you do not want the default parameters specified in the
this makefile. Starting without parameters print a command line help:
--- DocumentConverter ---
java -jar DocumentConverter.jar "directory" "filter name" "extension" 
"output_directory"
--- DocumentLoader ---
java -jar DocumentLoader.jar "Url|path"
--- DocumentPrinter ---
java -jar DocumentPrinter.jar "printername" "filename" "pages"
--- DocumentSaver ---
java -jar DocumentSaver.jar "load Url|path" "save Url|path"
--------------------------------------------------------------------------------
"/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"
Connected to a running office ...
CE> QObject::setParent: Cannot set parent, new parent is in a different 
thread
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.
CE> warn:desktop:4656:4671:desktop/source/app/sofficemain.cxx:88: 
minidump generated: /tmp/14614905-f0cf-c864-2332da26-7532e071.dmp
CE> Application Error
com.sun.star.lang.DisposedException
     at 
com.sun.star.lib.uno.environments.remote.JobQueue.removeJob(JobQueue.java:201)
     at 
com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:308)
     at 
com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:281)
     at 
com.sun.star.lib.uno.environments.remote.JavaThreadPool.enter(JavaThreadPool.java:81)
     at 
com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.sendRequest(java_remote_bridge.java:619)
     at 
com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.request(ProxyFactory.java:145)
     at 
com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.invoke(ProxyFactory.java:129)
     at com.sun.proxy.$Proxy3.loadComponentFromURL(Unknown Source)
     at DocumentLoader.main(DocumentLoader.java:79)
     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:498)
     at com.sun.star.lib.loader.Loader.main(Loader.java:132)
Caused by: java.io.EOFException
     at java.io.DataInputStream.readInt(DataInputStream.java:392)
     at com.sun.star.lib.uno.protocols.urp.urp.readBlock(urp.java:364)
     at com.sun.star.lib.uno.protocols.urp.urp.readMessage(urp.java:96)
     at 
com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge$MessageDispatcher.run(java_remote_bridge.java:92)
make: *** [Makefile:132: DocumentLoader.run] Error 1

Regards,

Vladimir Koković, DP senior(69)

Serbia, Belgrade, 6.sep 2019

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20190906/e8d7bffa/attachment.html>


More information about the LibreOffice mailing list