[ https://issues.apache.org/jira/browse/SM-4310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17057168#comment-17057168 ]
Simon Wimmesberger edited comment on SM-4310 at 3/11/20, 4:28 PM: ------------------------------------------------------------------ Can confirm - we encountered the same issue... This problem can be mitigated by adding following system property: {code:java} javax.xml.bind.context.factory=com.sun.xml.internal.bind.v2.ContextFactory {code} This ensures that the missing method isn't called. But then we have following issue: The [jaxb-runtime-2.3.2_1.jar|https://repo1.maven.org/maven2/org/apache/servicemix/bundles/org.apache.servicemix.bundles.jaxb-runtime/2.3.2_1/org.apache.servicemix.bundles.jaxb-runtime-2.3.2_1.jar] does not contain any services metadata (META-INF/services) therefore the OsgiLocator can't find the "javax.xml.bind.JAXBContext". was (Author: swimmesberger): Can confirm - we encountered the same issue... > Jaxb-API-2.3 has missing method > ------------------------------- > > Key: SM-4310 > URL: https://issues.apache.org/jira/browse/SM-4310 > Project: ServiceMix > Issue Type: Bug > Environment: I am running the osgi container felix with: > org.apache.servicemix.specs.activation-api-1.2.1-1.2.1_1.jar > org.apache.servicemix.specs.jaxb-api-2.3-2.3_2.jar > org.apache.servicemix.specs.stax-api-1.0-2.9.0.jar > I inspected servicemix.specs.jaxb-api ant there is indeed no method > ServiceLoaderUtil.lookupUsingOSGiServiceLoader() in there. > Reporter: Veselin > Priority: Blocker > > When I use org.apache.servicemix.specs.jaxb-api-2.3-2.3_2.jar and call > JAXBContext._newInstance_(Class) I get following exception: > java.lang.NoSuchMethodError: > javax.xml.bind.ServiceLoaderUtil.lookupUsingOSGiServiceLoader(Ljava/lang/String;Ljava/util/logging/Logger;)Ljava/lang/Object;java.lang.NoSuchMethodError: > > javax.xml.bind.ServiceLoaderUtil.lookupUsingOSGiServiceLoader(Ljava/lang/String;Ljava/util/logging/Logger;)Ljava/lang/Object; > at javax.xml.bind.ContextFinder.find(ContextFinder.java:413) ~[?:1.8.0_161] > at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:721) > ~[?:1.8.0_161] at > javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:662) ~[?:1.8.0_161] -- This message was sent by Atlassian Jira (v8.3.4#803005)