Sni*_*tor 1 javac maven apache-tika
我正在尝试遵循Apache TikaJAXRS 看起来非常简单的编译指令.我在Windows 8.1 64bit上运行.
好.我已经完成了第1步,但是我在第2步遇到了磕磕绊.显然这里有一些未编写的先决条件,所以我试图解决它们如下:
C:\Program Files\Java\jdk1.8.0_25.C:\Program Files\Java\jdk1.8.0_25\binC:\apache-maven-3.2.5\bin然后从tika-1.7目录(src下载的zip的内容)我运行mvn install.在吐出下面粘贴的错误输出之前,编译快乐地进行几分钟,此时编译似乎冻结.
问题看起来可能就是这个问题 - https://issues.apache.org/jira/browse/TIKA-1276 那里有一些关于重新创建捆绑包并修改文件以解决问题的讨论,但我坦率地说发现奇怪的是,为了获得Tika的工作副本,我必须跳过这样的箍 - 没有提供二进制分发!
我需要做些什么才能解决这个编译问题?
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running org.apache.tika.bundle.BundleIT
[main] INFO org.ops4j.pax.exam.spi.DefaultExamSystem - Pax Exam System (Version: 2.2.0) created.
Jan 19, 2015 11:48:40 AM org.ops4j.pax.url.mvn.internal.AetherBasedResolver resolve
INFO: Resolved (org.junit:com.springsource.org.junit:jar:4.4.0) as C:\Users\Jason\.m2\repository\org\junit\com.springsource.org.junit\4.4.0\com.springsource.org.junit-4.4.0.jar
ERROR: Bundle org.ops4j.pax.exam.rbc [1] Error starting link:classpath:META-INF/links/org.ops4j.pax.exam.rbc.link (org.osgi.framework.BundleException: Activator start error in bundle org.ops4j.pax.exam.rbc [1].)
java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
at org.ops4j.pax.exam.rbc.internal.Activator.<clinit>(Activator.java:47)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
at java.lang.Class.newInstance(Class.java:438)
at org.apache.felix.framework.Felix.createBundleActivator(Felix.java:4169)
at org.apache.felix.framework.Felix.activateBundle(Felix.java:1972)
at org.apache.felix.framework.Felix.startBundle(Felix.java:1895)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1191)
at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:295)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory not found by org.ops4j.pax.exam.rbc [1]
at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1460)
at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:72)
at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1843)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 12 more
ERROR: Bundle org.ops4j.pax.exam.extender.service [2] Error starting link:classpath:META-INF/links/org.ops4j.pax.extender.service.link (org.osgi.framework.BundleException: Unresolved constraint in bundle org.ops4j.pax.exam.extender.service [2]: Unable to resolve 2.0: missing requirement [2.0] osgi.wiring.package; (&(osgi.wiring.package=org.slf4j)(version>=1.6.0)(!(version>=2.0.0))) [caused by: Unable to resolve 4.0: missing requirement [4.0] osgi.wiring.package; (osgi.wiring.package=javax.xml.parsers)])
org.osgi.framework.BundleException: Unresolved constraint in bundle org.ops4j.pax.exam.extender.service [2]: Unable to resolve 2.0: missing requirement [2.0] osgi.wiring.package; (&(osgi.wiring.package=org.slf4j)(version>=1.6.0)(!(version>=2.0.0))) [caused by: Unable to resolve 4.0: missing requirement [4.0] osgi.wiring.package; (osgi.wiring.package=javax.xml.parsers)]
at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3818)
at org.apache.felix.framework.Felix.startBundle(Felix.java:1868)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1191)
at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:295)
at java.lang.Thread.run(Thread.java:745)
ERROR: Bundle org.ops4j.pax.logging.pax-logging-api [4] Error starting link:classpath:META-INF/links/org.ops4j.pax.logging.api.link (org.osgi.framework.BundleException: Unresolved constraint in bundle org.ops4j.pax.logging.pax-logging-api [4]: Unable to resolve 4.0: missing requirement [4.0] osgi.wiring.package; (osgi.wiring.package=javax.xml.parsers))
org.osgi.framework.BundleException: Unresolved constraint in bundle org.ops4j.pax.logging.pax-logging-api [4]: Unable to resolve 4.0: missing requirement [4.0] osgi.wiring.package; (osgi.wiring.package=javax.xml.parsers)
at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3818)
at org.apache.felix.framework.Felix.startBundle(Felix.java:1868)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1191)
at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:295)
at java.lang.Thread.run(Thread.java:745)
ERROR: Bundle org.apache.tika.core [6] Error starting file:/C:/Users/Jason/Desktop/FullText/Tika/tika-1.7/tika-bundle/target/test-bundles/tika-core.jar (org.osgi.framework.BundleException: Unresolved constraint in bundle org.apache.tika.core [6]: Unable to resolve 6.0: missing requirement [6.0] osgi.wiring.package; (osgi.wiring.package=javax.crypto))
org.osgi.framework.BundleException: Unresolved constraint in bundle org.apache.tika.core [6]: Unable to resolve 6.0: missing requirement [6.0] osgi.wiring.package; (osgi.wiring.package=javax.crypto)
at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3818)
at org.apache.felix.framework.Felix.startBundle(Felix.java:1868)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1191)
at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:295)
at java.lang.Thread.run(Thread.java:745)
ERROR: Bundle org.apache.tika.bundle [7] Error starting file:/C:/Users/Jason/Desktop/FullText/Tika/tika-1.7/tika-bundle/target/test-bundles/tika-bundle.jar (org.osgi.framework.BundleException: Unresolved constraint in bundle org.apache.tika.bundle [7]: Unable to resolve 7.0: missing requirement [7.0] osgi.wiring.package; (osgi.wiring.package=javax.crypto))
org.osgi.framework.BundleException: Unresolved constraint in bundle org.apache.tika.bundle [7]: Unable to resolve 7.0: missing requirement [7.0] osgi.wiring.package; (osgi.wiring.package=javax.crypto)
at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3818)
at org.apache.felix.framework.Felix.startBundle(Felix.java:1868)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1191)
at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:295)
at java.lang.Thread.run(Thread.java:745)
Run Code Online (Sandbox Code Playgroud)
推荐评论答案......
我不确定为什么你的构建在那个测试中失败了,因为它传递给我和自动构建/测试系统.但是......你可能不想做任何这样的事情!
如果你去到Apache的蒂卡下载页面,你会看到一个链接,下载最新的稳定蒂卡服务器运行的JAR.按照该链接,选择您喜欢的镜像,下载,验证校验和并运行.Simples!
如果你确实需要从源(例如,如果你将要作出改变的话)建立蒂卡服务器,您可以跳过通过运行单元测试mvn install -DskipTests将没有测试做构建,也可以编辑pom.xml在您的源签出的根目录并注释掉该行<module>tika-bundle</module>以从您的构建中排除整个捆绑部分(测试和所有).如果您只想使用Tika Server,那么您不需要OSGi包,因此可以安全地跳过它
| 归档时间: |
|
| 查看次数: |
1898 次 |
| 最近记录: |