bparreira17 / jodconverter

Automatically exported from code.google.com/p/jodconverter
0 stars 0 forks source link

Pipe connection under Windows XP doesn't work #25

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The socket connection works for me, but not the pipe connection.
The folder is created (D:\Documents and Settings\FRFRFRFRFR\Local
Settings\Temp\.jodconverter_pipe_name-pipeName), the process is started,
but the communication doesn't work:
2009-02-04 10:31:50,072 ERROR - [OOoEnvironment]    [getConverterPool]  failed
to start and connect
net.sf.jodconverter.office.OfficeException: failed to start and connect
    at
net.sf.jodconverter.office.ManagedOfficeProcess.startAndWait(ManagedOfficeProces
s.java:99)
    at
net.sf.jodconverter.office.ManagedProcessOfficeManager.start(ManagedProcessOffic
eManager.java:128)
    at 
[...]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at java.lang.Class.newInstance0(Unknown Source)
    at java.lang.Class.newInstance(Unknown Source)
    at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3754
)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4321)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
    at org.apache.catalina.core.StandardService.start(StandardService.java:476)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:2298)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:284)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:422)
Caused by: java.util.concurrent.ExecutionException:
java.lang.UnsatisfiedLinkError:
com.sun.star.lib.connections.pipe.PipeConnection.createJNI(Ljava/lang/String;)I
    at java.util.concurrent.FutureTask$Sync.innerGet(Unknown Source)
    at java.util.concurrent.FutureTask.get(Unknown Source)
    at
net.sf.jodconverter.office.ManagedOfficeProcess.startAndWait(ManagedOfficeProces
s.java:97)
    ... 26 more
Caused by: java.lang.UnsatisfiedLinkError:
com.sun.star.lib.connections.pipe.PipeConnection.createJNI(Ljava/lang/String;)I
    at com.sun.star.lib.connections.pipe.PipeConnection.createJNI(Native Method)
    at
com.sun.star.lib.connections.pipe.PipeConnection.<init>(PipeConnection.java:137)
    at
com.sun.star.lib.connections.pipe.pipeConnector.connect(pipeConnector.java:145)
    at com.sun.star.comp.connections.Connector.connect(Connector.java:146)
    at
net.sf.jodconverter.office.OfficeConnection.connect(OfficeConnection.java:80)
    at
net.sf.jodconverter.office.ManagedOfficeProcess$6.attempt(ManagedOfficeProcess.j
ava:155)
    at net.sf.jodconverter.util.Retryable.execute(Retryable.java:40)
    at net.sf.jodconverter.util.Retryable.execute(Retryable.java:30)
    at
net.sf.jodconverter.office.ManagedOfficeProcess.doStartProcessAndConnect(Managed
OfficeProcess.java:160)
    at
net.sf.jodconverter.office.ManagedOfficeProcess.access$0(ManagedOfficeProcess.ja
va:148)
    at
net.sf.jodconverter.office.ManagedOfficeProcess$1.run(ManagedOfficeProcess.java:
93)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source

Original issue reported on code.google.com by Gount...@gmail.com on 4 Feb 2009 at 9:36

GoogleCodeExporter commented 8 years ago
You need to set -Djava.library.path when starting Java for named pipes to work,
because they rely on native libraries.

On Linux that's -Djava.library.path=/opt/openoffice.org/ure/lib - I don't have 
the
Windows path right now but it should be similar.

I did look into automatically setting java.library.path at runtime

  http://code.google.com/p/jodconverter/issues/detail?id=19

but seems like it's just not possible.

Original comment by mirko.na...@gmail.com on 4 Feb 2009 at 10:20

GoogleCodeExporter commented 8 years ago
I had -Djava.library.path set to c:\\Program Files\\OpenOffice.org 3\\program, 
then
to c:\\Program Files\\OpenOffice.org 3\\URE\\java (where jar files are) and
c:\\Program Files\\OpenOffice.org 3\\Basis\\program\\classes (where some other 
jar
files are).
No luck!

Original comment by Gount...@gmail.com on 4 Feb 2009 at 10:44

GoogleCodeExporter commented 8 years ago
FRFRFRFRFR@WWWWWWWW ~/c/Program Files/OpenOffice.org 3
$ find . -name "*jar"
./Basis/help/fr/sbasic.jar
./Basis/help/fr/scalc.jar
./Basis/help/fr/schart.jar
./Basis/help/fr/sdatabase.jar
./Basis/help/fr/sdraw.jar
./Basis/help/fr/shared.jar
./Basis/help/fr/simpress.jar
./Basis/help/fr/smath.jar
./Basis/help/fr/swriter.jar
./Basis/program/classes/agenda.jar
./Basis/program/classes/aportisdoc.jar
./Basis/program/classes/bsh.jar
./Basis/program/classes/classes.jar
./Basis/program/classes/commonwizards.jar
./Basis/program/classes/fax.jar
./Basis/program/classes/form.jar
./Basis/program/classes/hsqldb.jar
./Basis/program/classes/java_uno_accessbridge.jar
./Basis/program/classes/js.jar
./Basis/program/classes/jut.jar
./Basis/program/classes/letter.jar
./Basis/program/classes/lucene-analyzers-2.3.jar
./Basis/program/classes/lucene-core-2.3.jar
./Basis/program/classes/LuceneHelpWrapper.jar
./Basis/program/classes/officebean.jar
./Basis/program/classes/pexcel.jar
./Basis/program/classes/pocketword.jar
./Basis/program/classes/productregistration.jar
./Basis/program/classes/query.jar
./Basis/program/classes/report.jar
./Basis/program/classes/sandbox.jar
./Basis/program/classes/saxon9.jar
./Basis/program/classes/ScriptFramework.jar
./Basis/program/classes/ScriptProviderForBeanShell.jar
./Basis/program/classes/ScriptProviderForJava.jar
./Basis/program/classes/ScriptProviderForJavaScript.jar
./Basis/program/classes/sdbc_hsqldb.jar
./Basis/program/classes/table.jar
./Basis/program/classes/unoil.jar
./Basis/program/classes/web.jar
./Basis/program/classes/writer2latex.jar
./Basis/program/classes/xmerge.jar
./Basis/program/classes/XMergeBridge.jar
./Basis/program/classes/XSLTFilter.jar
./Basis/program/classes/XSLTValidate.jar
./Basis/share/Scripts/java/HelloWorld/HelloWorld.jar
./Basis/share/Scripts/java/Highlight/Highlight.jar
./Basis/share/Scripts/java/MemoryUsage/MemoryUsage.jar
./URE/java/agenda.jar
./URE/java/aportisdoc.jar
./URE/java/bsh.jar
./URE/java/classes.jar
./URE/java/commonwizards.jar
./URE/java/fax.jar
./URE/java/form.jar
./URE/java/hsqldb.jar
./URE/java/java_uno.jar
./URE/java/java_uno_accessbridge.jar
./URE/java/js.jar
./URE/java/juh.jar
./URE/java/jurt.jar
./URE/java/jut.jar
./URE/java/letter.jar
./URE/java/lucene-analyzers-2.3.jar
./URE/java/lucene-core-2.3.jar
./URE/java/LuceneHelpWrapper.jar
./URE/java/officebean.jar
./URE/java/pexcel.jar
./URE/java/pocketword.jar
./URE/java/productregistration.jar
./URE/java/query.jar
./URE/java/report.jar
./URE/java/ridl.jar
./URE/java/sandbox.jar
./URE/java/saxon9.jar
./URE/java/ScriptFramework.jar
./URE/java/ScriptProviderForBeanShell.jar
./URE/java/ScriptProviderForJava.jar
./URE/java/ScriptProviderForJavaScript.jar
./URE/java/sdbc_hsqldb.jar
./URE/java/table.jar
./URE/java/unoil.jar
./URE/java/unoloader.jar
./URE/java/web.jar
./URE/java/writer2latex.jar
./URE/java/xmerge.jar
./URE/java/XMergeBridge.jar
./URE/java/XSLTFilter.jar
./URE/java/XSLTValidate.jar

Original comment by Gount...@gmail.com on 4 Feb 2009 at 10:45

GoogleCodeExporter commented 8 years ago
This works for me:

  -Djava.library.path="C:\Program Files\OpenOffice.org 3\URE\bin"

It is in fact similar to the one for Linux I mentioned above.

Original comment by mirko.na...@gmail.com on 4 Feb 2009 at 7:04

GoogleCodeExporter commented 8 years ago
My bad, it now works for me too. :-(

Original comment by Gount...@gmail.com on 5 Feb 2009 at 10:54

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Hi,

Where should I add -Djava.library.path="C:\Program Files\OpenOffice.org 
3\URE\bin" ?
I have the same issue on Windows enviroment:
Caused by: java.lang.UnsatisfiedLinkError:
com.sun.star.lib.connections.pipe.PipeConnection.createJNI(Ljava/lang/String;)I

Thanks,
Katt

Original comment by Katt....@gmail.com on 24 Sep 2009 at 11:51