Apache Tika 编译错误
我在 debian 上编译 Apache Tika 最新版本时遇到此错误。任何帮助将不胜感激。
我已从 tika.apache.org/download.html 下载了最新版本。使用 aptitude 安装了 Maven。我用的是Debian。并且还安装了sun-java6-jdk。设置 JAVA_HOME 变量。然后我只需转到基本 tika 文件夹并运行“mvn clean install”。更有趣的是,几天前我可以将它安装在另一台 debian 服务器上,没有任何问题。
Running org.apache.tika.fork.ForkParserTest
java.lang.ClassNotFoundException: Unable to find class org.apache.tika.metadata.Metadata
at org.apache.tika.fork.ClassLoaderProxy.findClass(ClassLoaderProxy.java:117)
at java.lang.ClassLoader.loadClass(libgcj.so.90)
at java.lang.ClassLoader.loadClass(libgcj.so.90)
at java.lang.reflect.Method.getType(libgcj.so.90)
at java.lang.reflect.Method.getParameterTypes(libgcj.so.90)
at org.apache.tika.fork.ForkServer.call(ForkServer.java:130)
at org.apache.tika.fork.ForkServer.processRequests(ForkServer.java:116)
at org.apache.tika.fork.ForkServer.main(ForkServer.java:64)
java.lang.ClassNotFoundException: Unable to find class org.apache.tika.metadata.Metadata
at org.apache.tika.fork.ClassLoaderProxy.findClass(ClassLoaderProxy.java:117)
at java.lang.ClassLoader.loadClass(libgcj.so.90)
at java.lang.ClassLoader.loadClass(libgcj.so.90)
at java.lang.reflect.Method.getType(libgcj.so.90)
at java.lang.reflect.Method.getParameterTypes(libgcj.so.90)
at org.apache.tika.fork.ForkServer.call(ForkServer.java:130)
at org.apache.tika.fork.ForkServer.processRequests(ForkServer.java:116)
at org.apache.tika.fork.ForkServer.main(ForkServer.java:64)
java.lang.ClassNotFoundException: Unable to find class org.apache.tika.metadata.Metadata
at org.apache.tika.fork.ClassLoaderProxy.findClass(ClassLoaderProxy.java:117)
at java.lang.ClassLoader.loadClass(libgcj.so.90)
at java.lang.ClassLoader.loadClass(libgcj.so.90)
at java.lang.reflect.Method.getType(libgcj.so.90)
at java.lang.reflect.Method.getParameterTypes(libgcj.so.90)
at org.apache.tika.fork.ForkServer.call(ForkServer.java:130)
at org.apache.tika.fork.ForkServer.processRequests(ForkServer.java:116)
at org.apache.tika.fork.ForkServer.main(ForkServer.java:64)
java.lang.ClassNotFoundException: Unable to find class org.apache.tika.metadata.Metadata
at org.apache.tika.fork.ClassLoaderProxy.findClass(ClassLoaderProxy.java:117)
at java.lang.ClassLoader.loadClass(libgcj.so.90)
at java.lang.ClassLoader.loadClass(libgcj.so.90)
at java.lang.reflect.Method.getType(libgcj.so.90)
at java.lang.reflect.Method.getParameterTypes(libgcj.so.90)
at org.apache.tika.fork.ForkServer.call(ForkServer.java:130)
at org.apache.tika.fork.ForkServer.processRequests(ForkServer.java:116)
at org.apache.tika.fork.ForkServer.main(ForkServer.java:64)
java.lang.ClassNotFoundException: Unable to find class org.apache.tika.metadata.Metadata
at org.apache.tika.fork.ClassLoaderProxy.findClass(ClassLoaderProxy.java:117)
at java.lang.ClassLoader.loadClass(libgcj.so.90)
at java.lang.ClassLoader.loadClass(libgcj.so.90)
at java.lang.reflect.Method.getType(libgcj.so.90)
at java.lang.reflect.Method.getParameterTypes(libgcj.so.90)
at org.apache.tika.fork.ForkServer.call(ForkServer.java:130)
at org.apache.tika.fork.ForkServer.processRequests(ForkServer.java:116)
at org.apache.tika.fork.ForkServer.main(ForkServer.java:64)
java.lang.ClassNotFoundException: Unable to find class org.apache.tika.metadata.Metadata
at org.apache.tika.fork.ClassLoaderProxy.findClass(ClassLoaderProxy.java:117)
at java.lang.ClassLoader.loadClass(libgcj.so.90)
at java.lang.ClassLoader.loadClass(libgcj.so.90)
at java.lang.reflect.Method.getType(libgcj.so.90)
at java.lang.reflect.Method.getParameterTypes(libgcj.so.90)
at org.apache.tika.fork.ForkServer.call(ForkServer.java:130)
at org.apache.tika.fork.ForkServer.processRequests(ForkServer.java:116)
at org.apache.tika.fork.ForkServer.main(ForkServer.java:64)
java.lang.ClassNotFoundException: Unable to find class org.apache.tika.metadata.Metadata
at org.apache.tika.fork.ClassLoaderProxy.findClass(ClassLoaderProxy.java:117)
at java.lang.ClassLoader.loadClass(libgcj.so.90)
at java.lang.ClassLoader.loadClass(libgcj.so.90)
at java.lang.reflect.Method.getType(libgcj.so.90)
at java.lang.reflect.Method.getParameterTypes(libgcj.so.90)
at org.apache.tika.fork.ForkServer.call(ForkServer.java:130)
at org.apache.tika.fork.ForkServer.processRequests(ForkServer.java:116)
at org.apache.tika.fork.ForkServer.main(ForkServer.java:64)
java.lang.ClassNotFoundException: Unable to find class org.apache.tika.metadata.Metadata
at org.apache.tika.fork.ClassLoaderProxy.findClass(ClassLoaderProxy.java:117)
at java.lang.ClassLoader.loadClass(libgcj.so.90)
at java.lang.ClassLoader.loadClass(libgcj.so.90)
at java.lang.reflect.Method.getType(libgcj.so.90)
at java.lang.reflect.Method.getParameterTypes(libgcj.so.90)
at org.apache.tika.fork.ForkServer.call(ForkServer.java:130)
at org.apache.tika.fork.ForkServer.processRequests(ForkServer.java:116)
at org.apache.tika.fork.ForkServer.main(ForkServer.java:64)
java.lang.ClassNotFoundException: Unable to find class org.apache.tika.metadata.Metadata
at org.apache.tika.fork.ClassLoaderProxy.findClass(ClassLoaderProxy.java:117)
at java.lang.ClassLoader.loadClass(libgcj.so.90)
at java.lang.ClassLoader.loadClass(libgcj.so.90)
at java.lang.reflect.Method.getType(libgcj.so.90)
at java.lang.reflect.Method.getParameterTypes(libgcj.so.90)
at org.apache.tika.fork.ForkServer.call(ForkServer.java:130)
at org.apache.tika.fork.ForkServer.processRequests(ForkServer.java:116)
at org.apache.tika.fork.ForkServer.main(ForkServer.java:64)
java.lang.ClassNotFoundException: Unable to find class org.apache.tika.metadata.Metadata
at org.apache.tika.fork.ClassLoaderProxy.findClass(ClassLoaderProxy.java:117)
at java.lang.ClassLoader.loadClass(libgcj.so.90)
at java.lang.ClassLoader.loadClass(libgcj.so.90)
at java.lang.reflect.Method.getType(libgcj.so.90)
at java.lang.reflect.Method.getParameterTypes(libgcj.so.90)
at org.apache.tika.fork.ForkServer.call(ForkServer.java:130)
at org.apache.tika.fork.ForkServer.processRequests(ForkServer.java:116)
at org.apache.tika.fork.ForkServer.main(ForkServer.java:64)
java.lang.ClassNotFoundException: Unable to find class org.apache.tika.metadata.Metadata
at org.apache.tika.fork.ClassLoaderProxy.findClass(ClassLoaderProxy.java:117)
at java.lang.ClassLoader.loadClass(libgcj.so.90)
at java.lang.ClassLoader.loadClass(libgcj.so.90)
at java.lang.reflect.Method.getType(libgcj.so.90)
at java.lang.reflect.Method.getParameterTypes(libgcj.so.90)
at org.apache.tika.fork.ForkServer.call(ForkServer.java:130)
at org.apache.tika.fork.ForkServer.processRequests(ForkServer.java:116)
at org.apache.tika.fork.ForkServer.main(ForkServer.java:64)
org.apache.tika.exception.TikaException: Failed to communicate with a forked parser process. The process has most likely crashed due to some error like running out of memory. A new process will be started for the next parsing request.
at org.apache.tika.fork.ForkParser.parse(ForkParser.java:120)
at org.apache.tika.fork.ForkParserTest$1.run(ForkParserTest.java:80)
Caused by: java.io.IOException: Lost connection to a forked server process
at org.apache.tika.fork.ForkClient.waitForResponse(ForkClient.java:169)
at org.apache.tika.fork.ForkClient.sendObject(ForkClient.java:137)
at org.apache.tika.fork.ForkClient.call(ForkClient.java:108)
at org.apache.tika.fork.ForkParser.parse(ForkParser.java:117)
... 1 more
org.apache.tika.exception.TikaException: Failed to communicate with a forked parser process. The process has most likely crashed due to some error like running out of memory. A new process will be started for the next parsing request.
at org.apache.tika.fork.ForkParser.parse(ForkParser.java:120)
at org.apache.tika.fork.ForkParserTest$1.run(ForkParserTest.java:80)
Caused by: java.io.IOException: Lost connection to a forked server process
at org.apache.tika.fork.ForkClient.waitForResponse(ForkClient.java:169)
at org.apache.tika.fork.ForkClient.sendObject(ForkClient.java:137)
at org.apache.tika.fork.ForkClient.call(ForkClient.java:108)
at org.apache.tika.fork.ForkParser.parse(ForkParser.java:117)
... 1 more
org.apache.tika.exception.TikaException: Failed to communicate with a forked parser process. The process has most likely crashed due to some error like running out of memory. A new process will be started for the next parsing request.
at org.apache.tika.fork.ForkParser.parse(ForkParser.java:120)
at org.apache.tika.fork.ForkParserTest$1.run(ForkParserTest.java:80)
Caused by: java.io.IOException: Lost connection to a forked server process
at org.apache.tika.fork.ForkClient.waitForResponse(ForkClient.java:169)
at org.apache.tika.fork.ForkClient.sendObject(ForkClient.java:137)
at org.apache.tika.fork.ForkClient.call(ForkClient.java:108)
at org.apache.tika.fork.ForkParser.parse(ForkParser.java:117)
... 1 more
org.apache.tika.exception.TikaException: Failed to communicate with a forked parser process. The process has most likely crashed due to some error like running out of memory. A new process will be started for the next parsing request.
at org.apache.tika.fork.ForkParser.parse(ForkParser.java:120)
at org.apache.tika.fork.ForkParserTest$1.run(ForkParserTest.java:80)
Caused by: java.io.IOException: Lost connection to a forked server process
at org.apache.tika.fork.ForkClient.waitForResponse(ForkClient.java:169)
at org.apache.tika.fork.ForkClient.sendObject(ForkClient.java:137)
at org.apache.tika.fork.ForkClient.call(ForkClient.java:108)
at org.apache.tika.fork.ForkParser.parse(ForkParser.java:117)
... 1 more
org.apache.tika.exception.TikaException: Failed to communicate with a forked parser process. The process has most likely crashed due to some error like running out of memory. A new process will be started for the next parsing request.
at org.apache.tika.fork.ForkParser.parse(ForkParser.java:120)
at org.apache.tika.fork.ForkParserTest$1.run(ForkParserTest.java:80)
Caused by: java.io.IOException: Lost connection to a forked server process
at org.apache.tika.fork.ForkClient.waitForResponse(ForkClient.java:169)
at org.apache.tika.fork.ForkClient.sendObject(ForkClient.java:137)
at org.apache.tika.fork.ForkClient.call(ForkClient.java:108)
at org.apache.tika.fork.ForkParser.parse(ForkParser.java:117)
... 1 more
org.apache.tika.exception.TikaException: Failed to communicate with a forked parser process. The process has most likely crashed due to some error like running out of memory. A new process will be started for the next parsing request.
at org.apache.tika.fork.ForkParser.parse(ForkParser.java:120)
at org.apache.tika.fork.ForkParserTest$1.run(ForkParserTest.java:80)
Caused by: java.io.IOException: Lost connection to a forked server process
at org.apache.tika.fork.ForkClient.waitForResponse(ForkClient.java:169)
at org.apache.tika.fork.ForkClient.sendObject(ForkClient.java:137)
at org.apache.tika.fork.ForkClient.call(ForkClient.java:108)
at org.apache.tika.fork.ForkParser.parse(ForkParser.java:117)
... 1 more
org.apache.tika.exception.TikaException: Failed to communicate with a forked parser process. The process has most likely crashed due to some error like running out of memory. A new process will be started for the next parsing request.
at org.apache.tika.fork.ForkParser.parse(ForkParser.java:120)
at org.apache.tika.fork.ForkParserTest$1.run(ForkParserTest.java:80)
Caused by: java.io.IOException: Lost connection to a forked server process
at org.apache.tika.fork.ForkClient.waitForResponse(ForkClient.java:169)
at org.apache.tika.fork.ForkClient.sendObject(ForkClient.java:137)
at org.apache.tika.fork.ForkClient.call(ForkClient.java:108)
at org.apache.tika.fork.ForkParser.parse(ForkParser.java:117)
... 1 more
org.apache.tika.exception.TikaException: Failed to communicate with a forked parser process. The process has most likely crashed due to some error like running out of memory. A new process will be started for the next parsing request.
at org.apache.tika.fork.ForkParser.parse(ForkParser.java:120)
at org.apache.tika.fork.ForkParserTest$1.run(ForkParserTest.java:80)
Caused by: java.io.IOException: Lost connection to a forked server process
at org.apache.tika.fork.ForkClient.waitForResponse(ForkClient.java:169)
at org.apache.tika.fork.ForkClient.sendObject(ForkClient.java:137)
at org.apache.tika.fork.ForkClient.call(ForkClient.java:108)
at org.apache.tika.fork.ForkParser.parse(ForkParser.java:117)
... 1 more
org.apache.tika.exception.TikaException: Failed to communicate with a forked parser process. The process has most likely crashed due to some error like running out of memory. A new process will be started for the next parsing request.
at org.apache.tika.fork.ForkParser.parse(ForkParser.java:120)
at org.apache.tika.fork.ForkParserTest$1.run(ForkParserTest.java:80)
Caused by: java.io.IOException: Lost connection to a forked server process
at org.apache.tika.fork.ForkClient.waitForResponse(ForkClient.java:169)
at org.apache.tika.fork.ForkClient.sendObject(ForkClient.java:137)
at org.apache.tika.fork.ForkClient.call(ForkClient.java:108)
at org.apache.tika.fork.ForkParser.parse(ForkParser.java:117)
... 1 more
java.lang.ClassNotFoundException: Unable to find class org.apache.tika.metadata.Metadata
at org.apache.tika.fork.ClassLoaderProxy.findClass(ClassLoaderProxy.java:117)
at java.lang.ClassLoader.loadClass(libgcj.so.90)
at java.lang.ClassLoader.loadClass(libgcj.so.90)
at java.lang.reflect.Method.getType(libgcj.so.90)
at java.lang.reflect.Method.getParameterTypes(libgcj.so.90)
at org.apache.tika.fork.ForkServer.call(ForkServer.java:130)
at org.apache.tika.fork.ForkServer.processRequests(ForkServer.java:116)
at org.apache.tika.fork.ForkServer.main(ForkServer.java:64)
org.apache.tika.exception.TikaException: Failed to communicate with a forked parser process. The process has most likely crashed due to some error like running out of memory. A new process will be started for the next parsing request.
at org.apache.tika.fork.ForkParser.parse(ForkParser.java:120)
at org.apache.tika.fork.ForkParserTest$1.run(ForkParserTest.java:80)
Caused by: java.io.IOException: Lost connection to a forked server process
at org.apache.tika.fork.ForkClient.waitForResponse(ForkClient.java:169)
at org.apache.tika.fork.ForkClient.sendObject(ForkClient.java:137)
at org.apache.tika.fork.ForkClient.call(ForkClient.java:108)
at org.apache.tika.fork.ForkParser.parse(ForkParser.java:117)
... 1 more
Tests run: 3, Failures: 1, Errors: 2, Skipped: 0, Time elapsed: 1.621 sec <<< FAILURE!
Running org.apache.tika.metadata.TestMetadata
Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.016 sec
Running org.apache.tika.mime.MediaTypeTest
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.012 sec
Running org.apache.tika.detect.TextDetectorTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.006 sec
Running org.apache.tika.TikaTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.157 sec
Running org.apache.tika.detect.TypeDetectorTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.006 sec
Running org.apache.tika.sax.SafeContentHandlerTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.004 sec
Running org.apache.tika.sax.BodyContentHandlerTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.003 sec
Running org.apache.tika.mime.MimeDetectionTest
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.631 sec
Running org.apache.tika.language.LanguageProfileTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 sec
Running org.apache.tika.language.LanguageIdentifierTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.949 sec
Running org.apache.tika.TestRereadableInputStream
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.007 sec
Running org.apache.tika.language.ProfilingWriterTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec
Results :
Failed tests:
testParallelParsing(org.apache.tika.fork.ForkParserTest)
Tests in error:
testHelloWorld(org.apache.tika.fork.ForkParserTest)
testSerialParsing(org.apache.tika.fork.ForkParserTest)
Tests run: 83, Failures: 1, Errors: 2, Skipped: 0
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
I'm getting this error when compiling Apache Tika the latest version on debian. Any help will be appreciated.
I've downloaded the latest version from tika.apache.org/download.html. Installed maven with aptitude. I use debian. And also have installed sun-java6-jdk. Set JAVA_HOME variable. Then I just go to base tika folder and run "mvn clean install". More interesting is that I could install a few days ago it on another debian server without any problems.
Running org.apache.tika.fork.ForkParserTest
java.lang.ClassNotFoundException: Unable to find class org.apache.tika.metadata.Metadata
at org.apache.tika.fork.ClassLoaderProxy.findClass(ClassLoaderProxy.java:117)
at java.lang.ClassLoader.loadClass(libgcj.so.90)
at java.lang.ClassLoader.loadClass(libgcj.so.90)
at java.lang.reflect.Method.getType(libgcj.so.90)
at java.lang.reflect.Method.getParameterTypes(libgcj.so.90)
at org.apache.tika.fork.ForkServer.call(ForkServer.java:130)
at org.apache.tika.fork.ForkServer.processRequests(ForkServer.java:116)
at org.apache.tika.fork.ForkServer.main(ForkServer.java:64)
java.lang.ClassNotFoundException: Unable to find class org.apache.tika.metadata.Metadata
at org.apache.tika.fork.ClassLoaderProxy.findClass(ClassLoaderProxy.java:117)
at java.lang.ClassLoader.loadClass(libgcj.so.90)
at java.lang.ClassLoader.loadClass(libgcj.so.90)
at java.lang.reflect.Method.getType(libgcj.so.90)
at java.lang.reflect.Method.getParameterTypes(libgcj.so.90)
at org.apache.tika.fork.ForkServer.call(ForkServer.java:130)
at org.apache.tika.fork.ForkServer.processRequests(ForkServer.java:116)
at org.apache.tika.fork.ForkServer.main(ForkServer.java:64)
java.lang.ClassNotFoundException: Unable to find class org.apache.tika.metadata.Metadata
at org.apache.tika.fork.ClassLoaderProxy.findClass(ClassLoaderProxy.java:117)
at java.lang.ClassLoader.loadClass(libgcj.so.90)
at java.lang.ClassLoader.loadClass(libgcj.so.90)
at java.lang.reflect.Method.getType(libgcj.so.90)
at java.lang.reflect.Method.getParameterTypes(libgcj.so.90)
at org.apache.tika.fork.ForkServer.call(ForkServer.java:130)
at org.apache.tika.fork.ForkServer.processRequests(ForkServer.java:116)
at org.apache.tika.fork.ForkServer.main(ForkServer.java:64)
java.lang.ClassNotFoundException: Unable to find class org.apache.tika.metadata.Metadata
at org.apache.tika.fork.ClassLoaderProxy.findClass(ClassLoaderProxy.java:117)
at java.lang.ClassLoader.loadClass(libgcj.so.90)
at java.lang.ClassLoader.loadClass(libgcj.so.90)
at java.lang.reflect.Method.getType(libgcj.so.90)
at java.lang.reflect.Method.getParameterTypes(libgcj.so.90)
at org.apache.tika.fork.ForkServer.call(ForkServer.java:130)
at org.apache.tika.fork.ForkServer.processRequests(ForkServer.java:116)
at org.apache.tika.fork.ForkServer.main(ForkServer.java:64)
java.lang.ClassNotFoundException: Unable to find class org.apache.tika.metadata.Metadata
at org.apache.tika.fork.ClassLoaderProxy.findClass(ClassLoaderProxy.java:117)
at java.lang.ClassLoader.loadClass(libgcj.so.90)
at java.lang.ClassLoader.loadClass(libgcj.so.90)
at java.lang.reflect.Method.getType(libgcj.so.90)
at java.lang.reflect.Method.getParameterTypes(libgcj.so.90)
at org.apache.tika.fork.ForkServer.call(ForkServer.java:130)
at org.apache.tika.fork.ForkServer.processRequests(ForkServer.java:116)
at org.apache.tika.fork.ForkServer.main(ForkServer.java:64)
java.lang.ClassNotFoundException: Unable to find class org.apache.tika.metadata.Metadata
at org.apache.tika.fork.ClassLoaderProxy.findClass(ClassLoaderProxy.java:117)
at java.lang.ClassLoader.loadClass(libgcj.so.90)
at java.lang.ClassLoader.loadClass(libgcj.so.90)
at java.lang.reflect.Method.getType(libgcj.so.90)
at java.lang.reflect.Method.getParameterTypes(libgcj.so.90)
at org.apache.tika.fork.ForkServer.call(ForkServer.java:130)
at org.apache.tika.fork.ForkServer.processRequests(ForkServer.java:116)
at org.apache.tika.fork.ForkServer.main(ForkServer.java:64)
java.lang.ClassNotFoundException: Unable to find class org.apache.tika.metadata.Metadata
at org.apache.tika.fork.ClassLoaderProxy.findClass(ClassLoaderProxy.java:117)
at java.lang.ClassLoader.loadClass(libgcj.so.90)
at java.lang.ClassLoader.loadClass(libgcj.so.90)
at java.lang.reflect.Method.getType(libgcj.so.90)
at java.lang.reflect.Method.getParameterTypes(libgcj.so.90)
at org.apache.tika.fork.ForkServer.call(ForkServer.java:130)
at org.apache.tika.fork.ForkServer.processRequests(ForkServer.java:116)
at org.apache.tika.fork.ForkServer.main(ForkServer.java:64)
java.lang.ClassNotFoundException: Unable to find class org.apache.tika.metadata.Metadata
at org.apache.tika.fork.ClassLoaderProxy.findClass(ClassLoaderProxy.java:117)
at java.lang.ClassLoader.loadClass(libgcj.so.90)
at java.lang.ClassLoader.loadClass(libgcj.so.90)
at java.lang.reflect.Method.getType(libgcj.so.90)
at java.lang.reflect.Method.getParameterTypes(libgcj.so.90)
at org.apache.tika.fork.ForkServer.call(ForkServer.java:130)
at org.apache.tika.fork.ForkServer.processRequests(ForkServer.java:116)
at org.apache.tika.fork.ForkServer.main(ForkServer.java:64)
java.lang.ClassNotFoundException: Unable to find class org.apache.tika.metadata.Metadata
at org.apache.tika.fork.ClassLoaderProxy.findClass(ClassLoaderProxy.java:117)
at java.lang.ClassLoader.loadClass(libgcj.so.90)
at java.lang.ClassLoader.loadClass(libgcj.so.90)
at java.lang.reflect.Method.getType(libgcj.so.90)
at java.lang.reflect.Method.getParameterTypes(libgcj.so.90)
at org.apache.tika.fork.ForkServer.call(ForkServer.java:130)
at org.apache.tika.fork.ForkServer.processRequests(ForkServer.java:116)
at org.apache.tika.fork.ForkServer.main(ForkServer.java:64)
java.lang.ClassNotFoundException: Unable to find class org.apache.tika.metadata.Metadata
at org.apache.tika.fork.ClassLoaderProxy.findClass(ClassLoaderProxy.java:117)
at java.lang.ClassLoader.loadClass(libgcj.so.90)
at java.lang.ClassLoader.loadClass(libgcj.so.90)
at java.lang.reflect.Method.getType(libgcj.so.90)
at java.lang.reflect.Method.getParameterTypes(libgcj.so.90)
at org.apache.tika.fork.ForkServer.call(ForkServer.java:130)
at org.apache.tika.fork.ForkServer.processRequests(ForkServer.java:116)
at org.apache.tika.fork.ForkServer.main(ForkServer.java:64)
java.lang.ClassNotFoundException: Unable to find class org.apache.tika.metadata.Metadata
at org.apache.tika.fork.ClassLoaderProxy.findClass(ClassLoaderProxy.java:117)
at java.lang.ClassLoader.loadClass(libgcj.so.90)
at java.lang.ClassLoader.loadClass(libgcj.so.90)
at java.lang.reflect.Method.getType(libgcj.so.90)
at java.lang.reflect.Method.getParameterTypes(libgcj.so.90)
at org.apache.tika.fork.ForkServer.call(ForkServer.java:130)
at org.apache.tika.fork.ForkServer.processRequests(ForkServer.java:116)
at org.apache.tika.fork.ForkServer.main(ForkServer.java:64)
org.apache.tika.exception.TikaException: Failed to communicate with a forked parser process. The process has most likely crashed due to some error like running out of memory. A new process will be started for the next parsing request.
at org.apache.tika.fork.ForkParser.parse(ForkParser.java:120)
at org.apache.tika.fork.ForkParserTest$1.run(ForkParserTest.java:80)
Caused by: java.io.IOException: Lost connection to a forked server process
at org.apache.tika.fork.ForkClient.waitForResponse(ForkClient.java:169)
at org.apache.tika.fork.ForkClient.sendObject(ForkClient.java:137)
at org.apache.tika.fork.ForkClient.call(ForkClient.java:108)
at org.apache.tika.fork.ForkParser.parse(ForkParser.java:117)
... 1 more
org.apache.tika.exception.TikaException: Failed to communicate with a forked parser process. The process has most likely crashed due to some error like running out of memory. A new process will be started for the next parsing request.
at org.apache.tika.fork.ForkParser.parse(ForkParser.java:120)
at org.apache.tika.fork.ForkParserTest$1.run(ForkParserTest.java:80)
Caused by: java.io.IOException: Lost connection to a forked server process
at org.apache.tika.fork.ForkClient.waitForResponse(ForkClient.java:169)
at org.apache.tika.fork.ForkClient.sendObject(ForkClient.java:137)
at org.apache.tika.fork.ForkClient.call(ForkClient.java:108)
at org.apache.tika.fork.ForkParser.parse(ForkParser.java:117)
... 1 more
org.apache.tika.exception.TikaException: Failed to communicate with a forked parser process. The process has most likely crashed due to some error like running out of memory. A new process will be started for the next parsing request.
at org.apache.tika.fork.ForkParser.parse(ForkParser.java:120)
at org.apache.tika.fork.ForkParserTest$1.run(ForkParserTest.java:80)
Caused by: java.io.IOException: Lost connection to a forked server process
at org.apache.tika.fork.ForkClient.waitForResponse(ForkClient.java:169)
at org.apache.tika.fork.ForkClient.sendObject(ForkClient.java:137)
at org.apache.tika.fork.ForkClient.call(ForkClient.java:108)
at org.apache.tika.fork.ForkParser.parse(ForkParser.java:117)
... 1 more
org.apache.tika.exception.TikaException: Failed to communicate with a forked parser process. The process has most likely crashed due to some error like running out of memory. A new process will be started for the next parsing request.
at org.apache.tika.fork.ForkParser.parse(ForkParser.java:120)
at org.apache.tika.fork.ForkParserTest$1.run(ForkParserTest.java:80)
Caused by: java.io.IOException: Lost connection to a forked server process
at org.apache.tika.fork.ForkClient.waitForResponse(ForkClient.java:169)
at org.apache.tika.fork.ForkClient.sendObject(ForkClient.java:137)
at org.apache.tika.fork.ForkClient.call(ForkClient.java:108)
at org.apache.tika.fork.ForkParser.parse(ForkParser.java:117)
... 1 more
org.apache.tika.exception.TikaException: Failed to communicate with a forked parser process. The process has most likely crashed due to some error like running out of memory. A new process will be started for the next parsing request.
at org.apache.tika.fork.ForkParser.parse(ForkParser.java:120)
at org.apache.tika.fork.ForkParserTest$1.run(ForkParserTest.java:80)
Caused by: java.io.IOException: Lost connection to a forked server process
at org.apache.tika.fork.ForkClient.waitForResponse(ForkClient.java:169)
at org.apache.tika.fork.ForkClient.sendObject(ForkClient.java:137)
at org.apache.tika.fork.ForkClient.call(ForkClient.java:108)
at org.apache.tika.fork.ForkParser.parse(ForkParser.java:117)
... 1 more
org.apache.tika.exception.TikaException: Failed to communicate with a forked parser process. The process has most likely crashed due to some error like running out of memory. A new process will be started for the next parsing request.
at org.apache.tika.fork.ForkParser.parse(ForkParser.java:120)
at org.apache.tika.fork.ForkParserTest$1.run(ForkParserTest.java:80)
Caused by: java.io.IOException: Lost connection to a forked server process
at org.apache.tika.fork.ForkClient.waitForResponse(ForkClient.java:169)
at org.apache.tika.fork.ForkClient.sendObject(ForkClient.java:137)
at org.apache.tika.fork.ForkClient.call(ForkClient.java:108)
at org.apache.tika.fork.ForkParser.parse(ForkParser.java:117)
... 1 more
org.apache.tika.exception.TikaException: Failed to communicate with a forked parser process. The process has most likely crashed due to some error like running out of memory. A new process will be started for the next parsing request.
at org.apache.tika.fork.ForkParser.parse(ForkParser.java:120)
at org.apache.tika.fork.ForkParserTest$1.run(ForkParserTest.java:80)
Caused by: java.io.IOException: Lost connection to a forked server process
at org.apache.tika.fork.ForkClient.waitForResponse(ForkClient.java:169)
at org.apache.tika.fork.ForkClient.sendObject(ForkClient.java:137)
at org.apache.tika.fork.ForkClient.call(ForkClient.java:108)
at org.apache.tika.fork.ForkParser.parse(ForkParser.java:117)
... 1 more
org.apache.tika.exception.TikaException: Failed to communicate with a forked parser process. The process has most likely crashed due to some error like running out of memory. A new process will be started for the next parsing request.
at org.apache.tika.fork.ForkParser.parse(ForkParser.java:120)
at org.apache.tika.fork.ForkParserTest$1.run(ForkParserTest.java:80)
Caused by: java.io.IOException: Lost connection to a forked server process
at org.apache.tika.fork.ForkClient.waitForResponse(ForkClient.java:169)
at org.apache.tika.fork.ForkClient.sendObject(ForkClient.java:137)
at org.apache.tika.fork.ForkClient.call(ForkClient.java:108)
at org.apache.tika.fork.ForkParser.parse(ForkParser.java:117)
... 1 more
org.apache.tika.exception.TikaException: Failed to communicate with a forked parser process. The process has most likely crashed due to some error like running out of memory. A new process will be started for the next parsing request.
at org.apache.tika.fork.ForkParser.parse(ForkParser.java:120)
at org.apache.tika.fork.ForkParserTest$1.run(ForkParserTest.java:80)
Caused by: java.io.IOException: Lost connection to a forked server process
at org.apache.tika.fork.ForkClient.waitForResponse(ForkClient.java:169)
at org.apache.tika.fork.ForkClient.sendObject(ForkClient.java:137)
at org.apache.tika.fork.ForkClient.call(ForkClient.java:108)
at org.apache.tika.fork.ForkParser.parse(ForkParser.java:117)
... 1 more
java.lang.ClassNotFoundException: Unable to find class org.apache.tika.metadata.Metadata
at org.apache.tika.fork.ClassLoaderProxy.findClass(ClassLoaderProxy.java:117)
at java.lang.ClassLoader.loadClass(libgcj.so.90)
at java.lang.ClassLoader.loadClass(libgcj.so.90)
at java.lang.reflect.Method.getType(libgcj.so.90)
at java.lang.reflect.Method.getParameterTypes(libgcj.so.90)
at org.apache.tika.fork.ForkServer.call(ForkServer.java:130)
at org.apache.tika.fork.ForkServer.processRequests(ForkServer.java:116)
at org.apache.tika.fork.ForkServer.main(ForkServer.java:64)
org.apache.tika.exception.TikaException: Failed to communicate with a forked parser process. The process has most likely crashed due to some error like running out of memory. A new process will be started for the next parsing request.
at org.apache.tika.fork.ForkParser.parse(ForkParser.java:120)
at org.apache.tika.fork.ForkParserTest$1.run(ForkParserTest.java:80)
Caused by: java.io.IOException: Lost connection to a forked server process
at org.apache.tika.fork.ForkClient.waitForResponse(ForkClient.java:169)
at org.apache.tika.fork.ForkClient.sendObject(ForkClient.java:137)
at org.apache.tika.fork.ForkClient.call(ForkClient.java:108)
at org.apache.tika.fork.ForkParser.parse(ForkParser.java:117)
... 1 more
Tests run: 3, Failures: 1, Errors: 2, Skipped: 0, Time elapsed: 1.621 sec <<< FAILURE!
Running org.apache.tika.metadata.TestMetadata
Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.016 sec
Running org.apache.tika.mime.MediaTypeTest
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.012 sec
Running org.apache.tika.detect.TextDetectorTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.006 sec
Running org.apache.tika.TikaTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.157 sec
Running org.apache.tika.detect.TypeDetectorTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.006 sec
Running org.apache.tika.sax.SafeContentHandlerTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.004 sec
Running org.apache.tika.sax.BodyContentHandlerTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.003 sec
Running org.apache.tika.mime.MimeDetectionTest
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.631 sec
Running org.apache.tika.language.LanguageProfileTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 sec
Running org.apache.tika.language.LanguageIdentifierTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.949 sec
Running org.apache.tika.TestRereadableInputStream
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.007 sec
Running org.apache.tika.language.ProfilingWriterTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec
Results :
Failed tests:
testParallelParsing(org.apache.tika.fork.ForkParserTest)
Tests in error:
testHelloWorld(org.apache.tika.fork.ForkParserTest)
testSerialParsing(org.apache.tika.fork.ForkParserTest)
Tests run: 83, Failures: 1, Errors: 2, Skipped: 0
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据您的堆栈跟踪,我认为您没有使用 Sun JDK。相反,我认为您正在使用 GCJ(GNU Java 的东西)——如果您查看堆栈跟踪,您会看到对 libgcj.so 的引用,这是赠品。
因此,我认为您需要做的是使用 update-alternatives 来选择 Sunk JDK / JRE 而不是 GNU GCJ。之后,Tika 应该可以正常编译。
尝试:
您可以使用的选择
(您可能还想更新 jar、jarsigner 和其他一些)
Based on your stack trace, I don't think you're using the Sun JDK. Instead, I think you're using GCJ (the GNU Java stuff) - if you look in the stacktrace you'll see references to libgcj.so which is the giveaway.
I think therefore that what you need to do is use update-alternatives to pick the Sunk JDK / JRE instead of the GNU GCJ one. After that, Tika ought to compile fine.
Try:
The to pick you can use
(You might also want to update jar, jarsigner and a few others too)