Code Monkey home page Code Monkey logo

Comments (8)

Osiris-Team avatar Osiris-Team commented on September 23, 2024

@sbraconnier any ideas why, or how to fix this?

from jodconverter.

sbraconnier avatar sbraconnier commented on September 23, 2024

Sorry for the long delay. It's difficult these days for me to find time to work on jodconverter. If you have both OpenOffice and LibreOffice installed, it will always use LibreOffice first, since it's a more active project. Using jodconverter-local-lo or jodconverter-local-oo will only change the dependencies used with jodconverter (org.openoffice or org.libreoffice artifacts). On some OS, it's better to enforce which dependencies we are using. It's not easy to provide a project that support both LibreOffice and OpenOffice with a set of dependencies that evolves at different speeds.

As for your problem, thanks to have report this. I'll ltry to find a way to fix it. I'll keep you posted...

from jodconverter.

Osiris-Team avatar Osiris-Team commented on September 23, 2024

Hey, no worries, its always good when there is at least an answer ;)

from jodconverter.

Osiris-Team avatar Osiris-Team commented on September 23, 2024

@sbraconnier do you maybe have any ideas where the issue could lie in / in which files?
Wouldn't mind creating a PR for this.

from jodconverter.

sbraconnier avatar sbraconnier commented on September 23, 2024

@Osiris-Team Could you please test the 4.4.8-SNAPSHOT version? I did a small change (which I will explain after) but I'm not sure it will solve anything (seems to work on my end). I'll try to understand the change I made if it works for you too.

You will need to add the oss sonatype snapshots repo for your dependencies:
https://oss.sonatype.org/content/repositories/snapshots

from jodconverter.

Osiris-Team avatar Osiris-Team commented on September 23, 2024

@sbraconnier weirdly enough now it fails to save some generated temp file:

OfficeManager init -> org.jodconverter.local.office.LocalOfficeManager@72b6cbcc
2024-07-04 18:29:07.056 [jodconverter-offprocmng-0] INFO org.jodconverter.local.office.OfficeDescriptor - soffice info (from exec path): Product: OpenOffice - Version: ??? - useLongOptionNameGnuStyle: false
2024-07-04 18:29:07.182 [jodconverter-offprocmng-0] INFO org.jodconverter.local.office.LocalOfficeProcessManager - Starting process with --accept 'socket,host=127.0.0.1,port=2002,tcpNoDelay=1;urp;StarOffice.ServiceManager' and profileDir 'D:\Coding\JAVA\daniel_manager\office\.jodconverter_socket_host-127.0.0.1_port-2002_tcpNoDelay-1'
2024-07-04 18:29:13.972 [jodconverter-offprocmng-0] INFO org.jodconverter.local.office.OfficeConnection - Connected: 'socket,host=127.0.0.1,port=2002,tcpNoDelay=1'
2024-07-04 18:29:13.972 [jodconverter-offprocmng-0] INFO org.jodconverter.local.office.LocalOfficeProcessManager - Started process; pid: 27996
2024-07-04 18:29:13.973 [jodconverter-poolentry-1] INFO org.jodconverter.local.task.LocalConversionTask - Executing local conversion task [odt -> png]...
2024-07-04 18:29:14.197 [jodconverter-poolentry-1] ERROR org.jodconverter.local.task.LocalConversionTask - Local conversion failed.
org.jodconverter.core.office.OfficeException: Could not store document: tempfile_2.png; errorCode: 2074
	at org.jodconverter.local.task.LocalConversionTask.storeDocument(LocalConversionTask.java:195)
	at org.jodconverter.local.task.LocalConversionTask.execute(LocalConversionTask.java:131)
	at org.jodconverter.local.office.LocalOfficeManagerPoolEntry.doExecute(LocalOfficeManagerPoolEntry.java:121)
	at org.jodconverter.core.office.AbstractOfficeManagerPoolEntry.lambda$execute$0(AbstractOfficeManagerPoolEntry.java:81)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: com.sun.star.task.ErrorCodeIOException: 
	at com.sun.star.lib.uno.environments.remote.Job.remoteUnoRequestRaisedException(Job.java:173)
	at com.sun.star.lib.uno.environments.remote.Job.execute(Job.java:139)
	at com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:334)
	at com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:303)
	at com.sun.star.lib.uno.environments.remote.JavaThreadPool.enter(JavaThreadPool.java:87)
	at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.sendRequest(java_remote_bridge.java:636)
	at com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.request(ProxyFactory.java:146)
	at com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.invoke(ProxyFactory.java:128)
	at jdk.proxy2/jdk.proxy2.$Proxy24.storeToURL(Unknown Source)
	at org.jodconverter.local.task.LocalConversionTask.storeDocumentToURL(LocalConversionTask.java:214)
	at org.jodconverter.local.task.LocalConversionTask.storeDocument(LocalConversionTask.java:192)
	... 7 more
Exception in thread "main" org.jodconverter.core.office.OfficeException: Could not store document: tempfile_2.png; errorCode: 2074
	at org.jodconverter.local.task.LocalConversionTask.storeDocument(LocalConversionTask.java:195)
	at org.jodconverter.local.task.LocalConversionTask.execute(LocalConversionTask.java:131)
	at org.jodconverter.local.office.LocalOfficeManagerPoolEntry.doExecute(LocalOfficeManagerPoolEntry.java:121)
	at org.jodconverter.core.office.AbstractOfficeManagerPoolEntry.lambda$execute$0(AbstractOfficeManagerPoolEntry.java:81)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: com.sun.star.task.ErrorCodeIOException: 
	at com.sun.star.lib.uno.environments.remote.Job.remoteUnoRequestRaisedException(Job.java:173)
	at com.sun.star.lib.uno.environments.remote.Job.execute(Job.java:139)
	at com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:334)
	at com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:303)
	at com.sun.star.lib.uno.environments.remote.JavaThreadPool.enter(JavaThreadPool.java:87)
	at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.sendRequest(java_remote_bridge.java:636)
	at com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.request(ProxyFactory.java:146)
	at com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.invoke(ProxyFactory.java:128)
	at jdk.proxy2/jdk.proxy2.$Proxy24.storeToURL(Unknown Source)
	at org.jodconverter.local.task.LocalConversionTask.storeDocumentToURL(LocalConversionTask.java:214)
	at org.jodconverter.local.task.LocalConversionTask.storeDocument(LocalConversionTask.java:192)
	... 7 more
2024-07-04 18:29:14.208 [Thread-4] INFO org.jodconverter.core.office.AbstractOfficeManagerPool - Stopping the office manager pool...
2024-07-04 18:29:14.217 [MessageDispatcher] INFO org.jodconverter.local.office.OfficeConnection - Disconnected from 'socket,host=127.0.0.1,port=2002,tcpNoDelay=1'
2024-07-04 18:29:14.465 [jodconverter-offprocmng-0] INFO org.jodconverter.local.office.LocalOfficeProcessManager - Process exited with code 0

from jodconverter.

Osiris-Team avatar Osiris-Team commented on September 23, 2024

To give some context: This is with only OpenOffice (Apache_OpenOffice_4.1.15_Win_x86_install_de.exe) installed globally on my machine and

        <dependency>
            <groupId>org.jodconverter</groupId>
            <artifactId>jodconverter-local</artifactId>
            <version>4.4.8-SNAPSHOT</version>
        </dependency>

Maybe I am missing something?

I also updated the original code example in my first message, so that it actually compiles now and is cleaner and maybe better to understand.

I'm guessing the issue I am experiencing now is because I have only Open-Office installed, and originally I had both installed and I guess it was using LibreOffice even if jod-converter-local was used as dependency and not its -lo variant.
Maybe this is another issue altogether or even related, who knows.

from jodconverter.

Osiris-Team avatar Osiris-Team commented on September 23, 2024

@sbraconnier just installed libreoffice again and now it works even if we are listening to system.in before init!
Great thank you!

from jodconverter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.