Examples of OpenOfficeException


Examples of com.artofsolving.jodconverter.openoffice.connection.OpenOfficeException

        //property("InputStream", new InputStreamToXInputStreamAdapter(inputStream))
        loadProperties.put("InputStream", new ByteArrayToXInputStreamAdapter(IOUtils.toByteArray(inputStream)));
       
    XComponent document = desktop.loadComponentFromURL("private:stream", "_blank", 0, toPropertyValues(loadProperties));
        if (document == null) {
            throw new OpenOfficeException("conversion failed: input document is null after loading");
        }

    refreshDocument(document);
   
        Map/*<String,Object>*/ storeProperties = new HashMap();
View Full Code Here

Examples of com.artofsolving.jodconverter.openoffice.connection.OpenOfficeException

        IOUtils.copy(outputFileStream, outputStream);
      } finally {
        IOUtils.closeQuietly(outputFileStream);
      }
    } catch (IOException ioException) {
      throw new OpenOfficeException("conversion failed", ioException);
    } finally {
      if (inputFile != null) {
        inputFile.delete();
      }
      if (outputFile != null) {
View Full Code Here

Examples of com.artofsolving.jodconverter.openoffice.connection.OpenOfficeException

  private void loadAndExport(String inputUrl, Map/*<String,Object>*/ loadProperties, String outputUrl, Map/*<String,Object>*/ storeProperties) throws OpenOfficeException {
    XComponent document;
    try {
        document = loadDocument(inputUrl, loadProperties);
    } catch (ErrorCodeIOException errorCodeIOException) {
        throw new OpenOfficeException("conversion failed: could not load input document; OOo errorCode: " + errorCodeIOException.ErrCode, errorCodeIOException);
    } catch (Exception otherException) {
            throw new OpenOfficeException("conversion failed: could not load input document", otherException);
        }
    if (document == null) {
        throw new OpenOfficeException("conversion failed: could not load input document");
    }
   
    refreshDocument(document);
   
    try {
        storeDocument(document, outputUrl, storeProperties);
        } catch (ErrorCodeIOException errorCodeIOException) {
            throw new OpenOfficeException("conversion failed: could not save output document; OOo errorCode: " + errorCodeIOException.ErrCode, errorCodeIOException);
        } catch (Exception otherException) {
            throw new OpenOfficeException("conversion failed: could not save output document", otherException);
        }
  }
View Full Code Here

Examples of com.artofsolving.jodconverter.openoffice.connection.OpenOfficeException

        loadAndExport(inputStream, inputFormat.getImportOptions(), outputStream, exportOptions);
      }
        } catch (OpenOfficeException openOfficeException) {
            throw openOfficeException;
    } catch (Throwable throwable) {
      throw new OpenOfficeException("conversion failed", throwable);
    }
  }
View Full Code Here

Examples of com.artofsolving.jodconverter.openoffice.connection.OpenOfficeException

        //property("InputStream", new InputStreamToXInputStreamAdapter(inputStream))
        loadProperties.put("InputStream", new ByteArrayToXInputStreamAdapter(IOUtils.toByteArray(inputStream)));
       
    XComponent document = desktop.loadComponentFromURL("private:stream", "_blank", 0, toPropertyValues(loadProperties));
        if (document == null) {
            throw new OpenOfficeException("conversion failed: input document is null after loading");
        }

    refreshDocument(document);
   
        Map/*<String,Object>*/ storeProperties = new HashMap();
View Full Code Here

Examples of com.artofsolving.jodconverter.openoffice.connection.OpenOfficeException

        IOUtils.copy(outputFileStream, outputStream);
      } finally {
        IOUtils.closeQuietly(outputFileStream);
      }
    } catch (IOException ioException) {
      throw new OpenOfficeException("conversion failed", ioException);
    } finally {
      if (inputFile != null) {
        inputFile.delete();
      }
      if (outputFile != null) {
View Full Code Here

Examples of com.artofsolving.jodconverter.openoffice.connection.OpenOfficeException

      try {
        loadAndExport(inputUrl, outputUrl, exportProperties);
      } catch (Throwable throwable) {
        // difficult to provide finer grained error reporting here;
        // OOo seems to throw ErrorCodeIOException most of the time
        throw new OpenOfficeException("conversion failed", throwable);
      }
    }   
  }
View Full Code Here

Examples of com.artofsolving.jodconverter.openoffice.connection.OpenOfficeException

    try {
      synchronized (openOfficeConnection) {
        loadAndExport(inputStream, outputStream, filterName, toPropertyValues(outputFormat.getExportOptions()));
      }
    } catch (Throwable throwable) {
      throw new OpenOfficeException("conversion failed", throwable);
    }
  }
View Full Code Here

Examples of com.haulmont.yarg.exception.OpenOfficeException

            future = executor.submit(task);
            future.get(timeoutInSeconds, TimeUnit.SECONDS);
        } catch (ExecutionException ex) {
            connection.close();
            if (ex.getCause() instanceof BootstrapException) {
                throw new OpenOfficeException("Failed to connect to open office. Please check open office path " + openOfficePath, ex);
            }
            throw new RuntimeException(ex.getCause());
        } catch (Throwable ex) {
            connection.close();
            if (ex.getCause() instanceof BootstrapException) {
                throw new OpenOfficeException("Failed to connect to open office. Please check open office path " + openOfficePath, ex);
            }
            throw new OpenOfficeException(ex);
        } finally {
            if (future != null) {
                future.cancel(true);
            }
            releaseConnection(connection);
View Full Code Here

Examples of com.haulmont.yarg.exception.OpenOfficeException

                officeResourceProvider = new OfficeResourceProvider(xComponentContext, officeIntegration);
                closed = false;
            } catch (Exception e) {
                close();
                throw new OpenOfficeException("Unable to create Open office components.", e);
            }
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.