1 2 Previous Next 16 Replies Latest reply on Dec 5, 2010 8:27 AM by Freeman(Yue) Fang

    NoSuchMethodException: com.sun.xml.bind.v2.ContextFactory.createContext

    Daffy Duck Novice

      Hi,

       

      Using FUSE ESB 4.2.0 with Sun JDK 1.6 update 18, I got following exception when trying to create a new JAXBContext (JAXBContext.newInstance(packageName)):

       

      15:08:02,249 | ERROR | Event Dispatcher | ExchangeActivator                | my.exchange.ExchangeActivator   42 | javax.xml.bind.JAXBException: Unable to create context

      - with linked exception:

      java.lang.NoSuchMethodException: com.sun.xml.bind.v2.ContextFactory.createContext(java.lang.String, java.lang.ClassLoader)

       

      And yes by looking to the jaxb-impl jar provided with servicemix there is no such createContext() method that takes these parameters, I totally agree. The problem is why I got this exception?

       

      It works fine using PAX Exam (with a platform like FUSE ESB: equinox 3.5.1, same servicemix features deployed etc...).

       

      I've tried to put servicemix jaxb jars into the endorsed folder but the exception is still there.

       

      Thanks.

      CM

        1 2 Previous Next