kevinhuo88888 / jodconverter

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

JOD converter connection pooling #111

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hi to All,

1.I am trying to convert the .ODT file to PDF using jod conveter.It is working 
fine and converting .ODT file to PDF.
2.But,If this request executes by multiple users at a time, any one request 
executing without any issue, another request is giving the following tomcat 
error.
3.org.artofsolving.jodconverter.office.OfficeException: failed to start and 
connect
        at org.artofsolving.jodconverter.office.ManagedOfficeProcess.startAndWait(ManagedOfficeProcess.java:66)
        at org.artofsolving.jodconverter.office.PooledOfficeManager.start(PooledOfficeManager.java:105)
        at org.artofsolving.jodconverter.office.ProcessPoolOfficeManager.start(ProcessPoolOfficeManager.java:65)
        at org.artofsolving.jodconverter.cli.Convert_1.convertt(Convert_1.java:123)
        at otc.tesst.processRequest(tesst.java:36)
        at otc.tesst.doGet(tesst.java:67)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:662)
Caused by: java.util.concurrent.ExecutionException: 
org.artofsolving.jodconverter.office.OfficeException: could not establish 
connection
        at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
        at java.util.concurrent.FutureTask.get(FutureTask.java:83)
        at org.artofsolving.jodconverter.office.ManagedOfficeProcess.startAndWait(ManagedOfficeProcess.java:64)
        ... 19 more
Caused by: org.artofsolving.jodconverter.office.OfficeException: could not 
establish connection
        at org.artofsolving.jodconverter.office.ManagedOfficeProcess.doStartProcessAndConnect(ManagedOfficeProcess.java:144)
        at org.artofsolving.jodconverter.office.ManagedOfficeProcess.access$000(ManagedOfficeProcess.java:31)
        at org.artofsolving.jodconverter.office.ManagedOfficeProcess$1.run(ManagedOfficeProcess.java:59)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        ... 1 more
Caused by: java.lang.IllegalStateException: a process with acceptString 
'socket,host=localhost,port=2002' is already running; pid 3866
        at org.artofsolving.jodconverter.office.OfficeProcess.start(OfficeProcess.java:67)
        at org.artofsolving.jodconverter.office.OfficeProcess.start(OfficeProcess.java:60)
        at org.artofsolving.jodconverter.office.ManagedOfficeProcess.doStartProcessAndConnect(ManagedOfficeProcess.java:121)
        ... 8 more

Please give some idea to solve the issue using jod converter connection 
pooling. How this connection pooling working. We gone through 
DefaultOfficeManagerConfiguration.java and we changed parameters; even it 
doesnt take any action. Is there any way to change/configure. 

I am using jodconverter-core-3.0-beta-3 version in ubuntu10.04.

Thanks in advance....

Regards,
Venu

Original issue reported on code.google.com by venugopa...@gmail.com on 22 May 2013 at 9:14