Founded in ridl-3.1.0.jar.
Don't know why but it was moved away from lib...
By the way, now the error is changed:
org.artofsolving.jodconverter.office.OfficeException: failed to start
and connect
org.artofsolving.jodconverter.office.ManagedOfficeProcess.startAndWait
(ManagedOfficeProcess.java:61)
org.artofsolving.jodconverter.office.PooledOfficeManager.start
(PooledOfficeManager.java:102)
org.artofsolving.jodconverter.office.ProcessPoolOfficeManager.start
(ProcessPoolOfficeManager.java:59)
com.noemalife.printmanager.servx.SPDFFrombyte.init(SPDFFrombyte.java:
73)
org.apache.catalina.authenticator.AuthenticatorBase.invoke
(AuthenticatorBase.java:432)
org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:105)
org.apache.catalina.connector.CoyoteAdapter.service
(CoyoteAdapter.java:148)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:
868)
org.apache.coyote.http11.Http11Protocol
$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket
(PoolTcpEndpoint.java:527)
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt
(LeaderFollowerWorkerThread.java:80)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
(ThreadPool.java:684)
java.lang.Thread.run(Unknown Source)
This test code works:
import java.io.File;
import org.artofsolving.jodconverter.OfficeDocumentConverter;
import
org.artofsolving.jodconverter.document.DefaultDocumentFormatRegistry;
import org.artofsolving.jodconverter.document.DocumentFormatRegistry;
import
org.artofsolving.jodconverter.office.DefaultOfficeManagerConfiguration;
import org.artofsolving.jodconverter.office.OfficeManager;
public class JODC3Test {
private static int STEP = 2; // Numero di conversioni
private static int CONN = 1; // Numero di connessioni
public static void main(String[] s) {
DocumentFormatRegistry registry = new DefaultDocumentFormatRegistry
();
OfficeManager officeManager = new DefaultOfficeManagerConfiguration
().buildOfficeManager();
officeManager.start();
try {
for (int i = 0; i < CONN; i++) {
OfficeDocumentConverter converter = new OfficeDocumentConverter
(officeManager, registry);
System.out.println("*********************Connection " + (i + 1) +
" *********************");
for (int j = 0; j < STEP; j++) {
File inputFile = new File("c:/temp.htm");
File outputFile = new File("c:/output.pdf");
converter.convert(inputFile, outputFile);
System.out.println("Converted " + (j + 1));
}
}
} catch (Exception e) {
e.printStackTrace();
officeManager.stop();
} finally {
officeManager.stop();
}
}
}
while the one in the servlet:
registry = new DefaultDocumentFormatRegistry();
officeManager = new DefaultOfficeManagerConfiguration
().buildOfficeManager();
officeManager.start();
does not.
On 4 Dic, 15:01, Mirko Nasato <
mirko.nas...@gmail.com> wrote:
> Are you sure you have all required jars in your WEB-INF/lib?
>
> 2009/12/4 rooswelt <
rosetti.ma...@gmail.com>: