Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-14561

Camel-Blueprint fails on JDK8 with NPE

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.1.0
    • Component/s: camel-blueprint
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      17:59:47.865 ERROR [fileinstall-/home/oscerd/playground/apache-karaf-4.2.7/deploy] Unable to start container for blueprint bundle camel-context.xml/0.0.0org.osgi.service.blueprint.container.ComponentDefinitionException: Failed to create the JAXB binder : javax.xml.bind.JAXBException: Provider class com.sun.xml.internal.bind.v2.ContextFactory could not be instantiated: java.lang.NullPointerException	 - with linked exception:[java.lang.NullPointerException]	at org.apache.camel.blueprint.handler.CamelNamespaceHandler.parseCamelContextNode(CamelNamespaceHandler.java:252) ~[?:?]	at org.apache.camel.blueprint.handler.CamelNamespaceHandler.parse(CamelNamespaceHandler.java:204) ~[?:?]	at org.apache.aries.blueprint.parser.Parser.parseCustomElement(Parser.java:1369) ~[!/:1.10.2]	at org.apache.aries.blueprint.parser.Parser.loadComponents(Parser.java:427) ~[!/:1.10.2]	at org.apache.aries.blueprint.parser.Parser.populate(Parser.java:331) ~[!/:1.10.2]	at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:371) [!/:1.10.2]	at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:298) [!/:1.10.2]	at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:311) [!/:1.10.2]	at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:280) [!/:1.10.2]	at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:276) [!/:1.10.2]	at org.apache.aries.blueprint.container.BlueprintExtender.modifiedBundle(BlueprintExtender.java:266) [!/:1.10.2]	at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:500) [!/:1.10.2]	at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:433) [!/:1.10.2]	at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$AbstractTracked.track(BundleHookBundleTracker.java:725) [!/:1.10.2]	at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.bundleChanged(BundleHookBundleTracker.java:463) [!/:1.10.2]	at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$BundleEventHook.event(BundleHookBundleTracker.java:422) [!/:1.10.2]	at org.apache.felix.framework.util.SecureAction.invokeBundleEventHook(SecureAction.java:1179) [org.apache.felix.framework-5.6.12.jar:?]	at org.apache.felix.framework.EventDispatcher.createWhitelistFromHooks(EventDispatcher.java:730) [org.apache.felix.framework-5.6.12.jar:?]	at org.apache.felix.framework.EventDispatcher.fireBundleEvent(EventDispatcher.java:485) [org.apache.felix.framework-5.6.12.jar:?]	at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4579) [org.apache.felix.framework-5.6.12.jar:?]	at org.apache.felix.framework.Felix.startBundle(Felix.java:2174) [org.apache.felix.framework-5.6.12.jar:?]	at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998) [org.apache.felix.framework-5.6.12.jar:?]	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [!/:3.6.4]	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [!/:3.6.4]	at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:520) [!/:3.6.4]	at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [!/:3.6.4]	at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [!/:3.6.4]Caused by: javax.xml.bind.JAXBException: Provider class com.sun.xml.internal.bind.v2.ContextFactory could not be instantiated: java.lang.NullPointerException		at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:202) ~[?:1.8.0_201]	at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:129) ~[?:1.8.0_201]	at javax.xml.bind.ContextFinder.find(ContextFinder.java:318) ~[?:1.8.0_201]	at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:478) ~[?:1.8.0_201]	at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:435) ~[?:1.8.0_201]	at org.apache.camel.impl.DefaultModelJAXBContextFactory.newJAXBContext(DefaultModelJAXBContextFactory.java:38) ~[?:?]	at org.apache.camel.blueprint.handler.CamelNamespaceHandler.getJaxbContext(CamelNamespaceHandler.java:678) ~[?:?]	at org.apache.camel.blueprint.handler.CamelNamespaceHandler.parseCamelContextNode(CamelNamespaceHandler.java:250) ~[?:?]	... 26 moreCaused by: java.lang.NullPointerException	at javax.xml.bind.ContextFinder.handleClassCastException(ContextFinder.java:114) ~[?:1.8.0_201]	at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:187) ~[?:1.8.0_201]	at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:129) ~[?:1.8.0_201]	at javax.xml.bind.ContextFinder.find(ContextFinder.java:318) ~[?:1.8.0_201]	at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:478) ~[?:1.8.0_201]	at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:435) ~[?:1.8.0_201]	at org.apache.camel.impl.DefaultModelJAXBContextFactory.newJAXBContext(DefaultModelJAXBContextFactory.java:38) ~[?:?]	at org.apache.camel.blueprint.handler.CamelNamespaceHandler.getJaxbContext(CamelNamespaceHandler.java:678) ~[?:?]	at org.apache.camel.blueprint.handler.CamelNamespaceHandler.parseCamelContextNode(CamelNamespaceHandler.java:250) ~[?:?]	... 26 more17:59:47.871 DEBUG [fileinstall-/home/oscerd/playground/apache-karaf-4.2.7/deploy] Sending blueprint container event BlueprintEvent[type=FAILURE, exception=Failed to create the JAXB binder : javax.xml.bind.JAXBException: Provider class com.sun.xml.internal.bind.v2.ContextFactory could not be instantiated: java.lang.NullPointerException
      

      With a simple blueprint.xml. With JDK11 this is ok.

       

        Attachments

          Activity

            People

            • Assignee:
              gnodet Guillaume Nodet
              Reporter:
              acosentino Andrea Cosentino
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: