OpenOffice Jodconverter Tomcat Issue

856 views
Skip to first unread message

Jerry

unread,
Oct 19, 2011, 10:56:59 AM10/19/11
to JODConverter
Hi
I'm trying to use Jodconverter to convert different document formats
to pdf. When I use jodconverter and openoffice in standalone java
program everything works fine. But when I use it in my spring project
under tomcat I'm getting exception. I tried using Jodconverter 2.2.1 &
jodconverter 3 beta version.

when I use jodconverter 3 beta version I get the following error
Unexpected Error
org.artofsolving.jodconverter.office.OfficeException: failed to start
and connect

when I use jodconverter 2.2.1 I get the following error

Unexpected Error

com.artofsolving.jodconverter.openoffice.connection.OpenOfficeException:
could not obtain service: com.sun.star.ucb.FileContentProvider

Can somebody help?

Richard Gathogo

unread,
Oct 19, 2011, 3:00:51 PM10/19/11
to jodcon...@googlegroups.com
Hi Jerry,
I have never used jodconverter 3 beta version, but I have used jodconverter 2.2.2. One I suggest you need to confirm if the connection exists. I will share with you the code hoping it helps you out.

private OpenOfficeConnection    openOfficeConnection=new SocketOpenOfficeConnection(8100);
openOfficeConnection.connect();

Of course this is with openoffice running in the background using this command soffice "-accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager" -nologo -headless

To use the connection I always test if connected i.e. openOfficeConnection.isConnected(). This will return true if connected and false otherwise. I would advice you to put the open office connection in such a way that the connection will be reused. Please try something close to that and tell me what happens.
Regards Richard Gathogo.
      



Love covers a multitude of sins.




--
You received this message because you are subscribed to the Google Groups "JODConverter" group.
To post to this group, send email to jodcon...@googlegroups.com.
To unsubscribe from this group, send email to jodconverter...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jodconverter?hl=en.


Jerry

unread,
Oct 19, 2011, 3:13:01 PM10/19/11
to JODConverter
Hi Richard,
Thanks for the help. I did use the command to run openoffice in
background. but no use.
finally I uninstalled openoffice, restarted the system & installed it
again now it works fine.

On Oct 19, 3:00 pm, Richard Gathogo <muraguri2...@gmail.com> wrote:
> Hi Jerry,
> I have never used jodconverter 3 beta version, but I have used jodconverter
> 2.2.2. One I suggest you need to confirm if the connection exists. I will
> share with you the code hoping it helps you out.
>
> private OpenOfficeConnection    openOfficeConnection=new
> SocketOpenOfficeConnection(8100);
> openOfficeConnection.connect();
>
> Of course this is with openoffice running in the background using this
> command soffice
> "-accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager"
> -nologo -headless
>
> To use the connection I always test if connected i.e.
> openOfficeConnection.isConnected(). This will return true if connected and
> false otherwise. I would advice you to put the open office connection in
> such a way that the connection will be reused. Please try something close to
> that and tell me what happens.
> Regards Richard Gathogo.
>
> *Love covers a multitude of sins.*
Reply all
Reply to author
Forward
0 new messages