简体   繁体   English

无法使用docsplit转换openoffice文档,从而导致java.lang.NoClassDefFoundError

[英]Unable to convert openoffice documents using docsplit resulting in java.lang.NoClassDefFoundError

I have installed the docsplit gem and been able to convert PDF documents. 我已经安装了docsplit gem,并且能够转换PDF文档。 However when it comes to splitting openoffice documents such as powerpoint and word files, I get the following error: 但是,当分割openoffice文档(如PowerPoint和Word文件)时,出现以下错误:

Exception: Command
/usr/local/bin/docsplit pdf /tmp/tmpzuk5gf/dump.ppt --output /tmp/tmpzuk5gf
finished with return code
1
and output:
Exception in thread "main" java.lang.NoClassDefFoundError: /usr/lib/openoffice
Caused by: java.lang.ClassNotFoundException: .usr.lib.openoffice
    at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: /usr/lib/openoffice. Program will exit.

I have already checked that the /usr/lib/openoffice folder is available. 我已经检查过/usr/lib/openoffice文件夹是否可用。

How do I go about this? 我该怎么办?

I was using docsplit 0.7.2 with OpenOffice and Ubuntu 10.04 . 我在OpenOfficeUbuntu 10.04使用docsplit 0.7.2 However, version 0.7.0 onward seems to have a preference for LibreOffice over OpenOffice . 但是,从0.7.0版开始,似乎LibreOffice优于OpenOffice So I downgraded my docsplit to version 0.6.4 and it works OK with OpenOffice. 因此,我将docsplit降级为0.6.4版,并且在OpenOffice中可以正常工作。 I can now run the commands successfully. 现在,我可以成功运行命令了。

I have using docsplit 0.7.2 with openoffice and ubuntu 12.04 all is OK. 我已经将docsplit 0.7.2与openoffice和ubuntu 12.04一起使用了,一切正常。

In previous time I have used ubuntu 10.04 and sometimes converting were breaking with similar error, but i had tried again and in most cases converting were completed successfully. 在以前的时间里,我使用过ubuntu 10.04 ,有时转换由于类似的错误而中断,但是我又尝试了一次,并且在大多数情况下,转换已成功完成。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM