使用jdk 1.7启动Apache James

5
我曾尝试在Linux Mint 64位(Debian)上使用Java jdk 1.7u17运行apache-james-3.0-beta4服务器,但由于JAXB库的错误而失败。根据文档,应下载不同的jar文件(http://jaxb.java.net/2.1.13/JAXB2_20100510.jar)并将其放入conf/lib目录中。我已经这样做了,但问题仍然存在。当我切换到jdk 1.6时,一切都开始正常工作。

有人解决过这个问题吗?

以下是部分堆栈跟踪:

INFO  19:45:24,669 | org.apache.james.container.spring.context.JamesServerApplicationContext | Refreshing org.apache.james.container.spring.context.JamesServerApplicationContext@11641923: startup date [Mon Apr 22 19:45:24 CEST 2013]; root of context hierarchy
Exception in thread "main" org.springframework.beans.factory.BeanDefinitionStoreException: Failed to create the JAXB binder; nested exception is javax.xml.bind.JAXBException: Provider com.sun.xml.internal.bind.v2.ContextFactory could not be instantiated: com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
Class has two properties of the same name "outputs"
        this problem is related to the following location:
                at public java.util.List org.apache.camel.model.ResequenceDefinition.getOutputs()
                at org.apache.camel.model.ResequenceDefinition
        this problem is related to the following location:
                at private java.util.List org.apache.camel.model.ResequenceDefinition.outputs
                at org.apache.camel.model.ResequenceDefinition

 - with linked exception:
[com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
Class has two properties of the same name "outputs"
        this problem is related to the following location:
                at public java.util.List org.apache.camel.model.ResequenceDefinition.getOutputs()
                at org.apache.camel.model.ResequenceDefinition
        this problem is related to the following location:
                at private java.util.List org.apache.camel.model.ResequenceDefinition.outputs
                at org.apache.camel.model.ResequenceDefinition
]
...

我在使用James时没有遇到过这个问题(但从JBoss的角度来看,我有经验),为了解决它,您需要在任何通配符之前明确声明类路径中的JAR文件。也许这会有所帮助。 - Jason Sperske
似乎下一个beta5版本将修复https://issues.apache.org/jira/browse/JAMES-1450。 - Saša
不,beta5-854 也不行。不过堆栈跟踪不同。 - Saša
也许它与这个有关:https://issues.apache.org/jira/browse/JAMES-1451 - ieugen
1个回答

6

我下载的文件不是最新的。当我下载了beta5的更新版本后,它就运行良好了。


3
链接失效了,你可以在这里找到beta5版本:https://repository.apache.org/content/repositories/snapshots/org/apache/james/apache-james/3.0-beta5-SNAPSHOT/ - Vittorio Cozzolino
是的,每个直接链接都会在有新版本发布时不时中断。他们仅保留最近的2个版本。您可以查看当前可用的修订版本,并选择您喜欢的版本。 - Saša

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接