1

我们最近将 Open JDK 7 的版本升级到了 1.7.0_u21 版本,并开始遇到该版本中包含的 Camel 和 JAXB 问题。从 1.7.0_u9 或更低版本开始的版本似乎可以按预期工作。我们在 OSGi 容器中运行东西,JAXB-API 是 2.2.7 版,而 JAXB-IMPL 是从 JDK 中提取的。如果有任何其他人遇到这个问题的任何想法如何解决它?

org.springframework.beans.factory.config.BeanPostProcessor is an interface, and JAXB can't handle interfaces.
this problem is related to the following location:
at org.springframework.beans.factory.config.BeanPostProcessor
at public org.springframework.beans.factory.config.BeanPostProcessor org.apache.camel.spring.CamelContextFactoryBean.getBeanPostProcessor()
at org.apache.camel.spring.CamelContextFactoryBean

at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:212) ~[jaxb-api_2.2.7.jar:na]
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:146) ~[jaxb-api_2.2.7.jar:na]
... 159 common frames omitted
Caused by: com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException: 39 counts of IllegalAnnotationExceptions
at com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException$Builder.check(IllegalAnnotationsException.java:91) ~[na:1.7.0_21]
at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:451) ~[na:1.7.0_21]
at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:283) ~[na:1.7.0_21]
at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:126) ~[na:1.7.0_21]
at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(JAXBContextImpl.java:1148) ~[na:1.7.0_21]
at com.sun.xml.internal.bind.v2.ContextFactory.createContext(ContextFactory.java:130) ~[na:1.7.0_21]
at com.sun.xml.internal.bind.v2.ContextFactory.createContext(ContextFactory.java:221) ~[na:1.7.0_21]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_21]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_21]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_21]
at java.lang.reflect.Method.invoke(Method.java:601) ~[na:1.7.0_21]
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:186) ~[jaxb-api_2.2.7.jar:na]
... 160 common frames omitted 

更新:更多信息,如果我使用 Oracle JDK 7 运行,一切似乎都按预期工作。但是,我们需要使用 Open JDK 7,所以除了尝试随机的 Open JDK 来查看是否有效之外,我们还想看看是否有修复。

4

0 回答 0