问题描述
最近在玩james邮件服务器,一启动直接报这个错,请大家帮我看看下面是异常信息。INFO20:56:50,078|org.apache.james.container.spring.context.JamesServerApplicationContext|Refreshingorg.apache.james.container.spring.context.JamesServerApplicationContext@1d529be:startupdate[WedMar1220:56:50CST2014];rootofcontexthierarchyExceptioninthread"main"org.springframework.beans.factory.BeanDefinitionStoreException:FailedtocreatetheJAXBbinder;nestedexceptionisjavax.xml.bind.JAXBException:Providercom.sun.xml.internal.bind.v2.ContextFactorycouldnotbeinstantiated:com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException:1countsofIllegalAnnotationExceptionsClasshastwopropertiesofthesamename"outputs"thisproblemisrelatedtothefollowinglocation:atpublicjava.util.Listorg.apache.camel.model.ResequenceDefinition.getOutputs()atorg.apache.camel.model.ResequenceDefinitionthisproblemisrelatedtothefollowinglocation:atprivatejava.util.Listorg.apache.camel.model.ResequenceDefinition.outputsatorg.apache.camel.model.ResequenceDefinition-withlinkedexception:[com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException:1countsofIllegalAnnotationExceptionsClasshastwopropertiesofthesamename"outputs"thisproblemisrelatedtothefollowinglocation:atpublicjava.util.Listorg.apache.camel.model.ResequenceDefinition.getOutputs()atorg.apache.camel.model.ResequenceDefinitionthisproblemisrelatedtothefollowinglocation:atprivatejava.util.Listorg.apache.camel.model.ResequenceDefinition.outputsatorg.apache.camel.model.ResequenceDefinition]atorg.apache.camel.spring.handler.CamelNamespaceHandler$CamelContextBeanDefinitionParser.doParse(CamelNamespaceHandler.java:258)atorg.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser.parseInternal(AbstractSingleBeanDefinitionParser.java:85)atorg.springframework.beans.factory.xml.AbstractBeanDefinitionParser.parse(AbstractBeanDefinitionParser.java:59)atorg.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73)atorg.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1419)atorg.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1409)atorg.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:184)atorg.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:140)atorg.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:111)atorg.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493)atorg.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390)atorg.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)atorg.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)atorg.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174)atorg.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209)atorg.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180)atorg.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:243)atorg.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:127)atorg.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:93)atorg.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:131)atorg.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:522)atorg.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:436)atorg.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)atorg.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)atorg.apache.james.container.spring.context.JamesServerApplicationContext.<init>(JamesServerApplicationContext.java:39)atorg.apache.james.app.spring.JamesAppSpringMain.init(JamesAppSpringMain.java:61)atorg.apache.james.app.spring.JamesAppSpringMain.main(JamesAppSpringMain.java:42)Causedby:javax.xml.bind.JAXBException:Providercom.sun.xml.internal.bind.v2.ContextFactorycouldnotbeinstantiated:com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException:1countsofIllegalAnnotationExceptionsClasshastwopropertiesofthesamename"outputs"thisproblemisrelatedtothefollowinglocation:atpublicjava.util.Listorg.apache.camel.model.ResequenceDefinition.getOutputs()atorg.apache.camel.model.ResequenceDefinitionthisproblemisrelatedtothefollowinglocation:atprivatejava.util.Listorg.apache.camel.model.ResequenceDefinition.outputsatorg.apache.camel.model.ResequenceDefinition-withlinkedexception:[com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException:1countsofIllegalAnnotationExceptionsClasshastwopropertiesofthesamename"outputs"thisproblemisrelatedtothefollowinglocation:atpublicjava.util.Listorg.apache.camel.model.ResequenceDefinition.getOutputs()atorg.apache.camel.model.ResequenceDefinitionthisproblemisrelatedtothefollowinglocation:atprivatejava.util.Listorg.apache.camel.model.ResequenceDefinition.outputsatorg.apache.camel.model.ResequenceDefinition]atjavax.xml.bind.ContextFinder.newInstance(UnknownSource)atjavax.xml.bind.ContextFinder.find(UnknownSource)atjavax.xml.bind.JAXBContext.newInstance(UnknownSource)atjavax.xml.bind.JAXBContext.newInstance(UnknownSource)atorg.apache.camel.spring.handler.CamelNamespaceHandler.createJaxbContext(CamelNamespaceHandler.java:187)atorg.apache.camel.spring.handler.CamelNamespaceHandler.getJaxbContext(CamelNamespaceHandler.java:174)atorg.apache.camel.spring.handler.CamelNamespaceHandler$CamelContextBeanDefinitionParser.doParse(CamelNamespaceHandler.java:256)...26moreCausedby:com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException:1countsofIllegalAnnotationExceptionsClasshastwopropertiesofthesamename"outputs"thisproblemisrelatedtothefollowinglocation:atpublicjava.util.Listorg.apache.camel.model.ResequenceDefinition.getOutputs()atorg.apache.camel.model.ResequenceDefinitionthisproblemisrelatedtothefollowinglocation:atprivatejava.util.Listorg.apache.camel.model.ResequenceDefinition.outputsatorg.apache.camel.model.ResequenceDefinitionatcom.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException$Builder.check(UnknownSource)atcom.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(UnknownSource)atcom.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.<init>(UnknownSource)atcom.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.<init>(UnknownSource)atcom.sun.xml.internal.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(UnknownSource)atcom.sun.xml.internal.bind.v2.ContextFactory.createContext(UnknownSource)atcom.sun.xml.internal.bind.v2.ContextFactory.createContext(UnknownSource)atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)atsun.reflect.NativeMethodAccessorImpl.invoke(UnknownSource)atsun.reflect.DelegatingMethodAccessorImpl.invoke(UnknownSource)atjava.lang.reflect.Method.invoke(UnknownSource)atjavax.xml.bind.ContextFinder.newInstance(UnknownSource)...33more
解决方案
解决方案二:
同样碰到这个问题在Google中
解决方案三:
IfyourunJDK7,JameswillnotstartduetoabuginJAXB.Astemporaryworkaround,youcandownloadthelatest2.1versionofJAXBfromhttp://jaxb.java.net/2.1.13/JAXB2_20100510.jarandcopytheextractedjaxb-impl.jarintoconf/lib.