5 Replies Latest reply on Oct 22, 2012 3:22 AM by Claus Ibsen

    JAXBException "...nor any of its super class is known to this context"

    maxvar Newbie

      I have a spring-xml-configured jaxrs:server based on a single serviceBean engine with a customized org.apache.cxf.jaxrs.provider.JAXBElementProvider.

      Provider properties are used as

      -


       

                          <entry key="ru.alfastrah.interplat4.rest.greencard.types.Policy"

                               value="policy" />

                          <entry

                               key="ru.alfastrah.interplat4.rest.greencard.types.PolicyLoadResult"

                               value="policyLoadResult" />

                     </map>

                </property>

      -


      to allow for proper (un)marshalling of classes without XMLRootElement annotation.

      The project is packaged as an osgi bundle and deployed and works fine until osgi:refreshed from the console. Then it starts to barf with

      -


      javax.xml.bind.MarshalException

      - with linked exception:

      [com.sun.istack.SAXException2: class ru.alfastrah.interplat4.rest.greencard.types.PolicyLoadResult nor any of its super class is known to this context.

      javax.xml.bind.JAXBException: class ru.alfastrah.interplat4.rest.greencard.types.PolicyLoadResult nor any of its super class is known to this context.]

      -


      The problem persists until I restart the whole servicemix.

      Where should I look for a more suitable solution to the issue? The bundle needs to be able to restart fine because it's a good way to reread its config and some slowly changing persisted data.