1 Reply Latest reply on Apr 17, 2008 9:19 AM by toto titi

    WebServiceContext is an interface and JaxB can't handle inte

    Catherine Pires da Silva Newbie

      Hello,
      when deploying a (simple) stateful endpoint with WSAddressing by copying the war under deploy directory, I get IllegalAnnotationsException, WebServiceContext is an interface and JAXB can't handle interfaces.

      I'm using Jboss-4.0.5.GA and Jboss-1.2.0.SP1.

      I don't see differences with the samples.
      It seems there are (or there were) some problems with WebServiceContext injection? (JBWS-1468)

      Is there some tricks in the samples deployment so it is not exactly the same thing as copying a war under deploy?
      Any idea?
      Please help.
      Catherine

        • 1. Re: WebServiceContext is an interface and JaxB can't handle
          toto titi Newbie

          I guess you found your answer one year ago, but posting it as it appears as one of the first results when you google "JAXB can't handle interfaces".

          It can occur when you try to marshall/unmarshall with Java classes containing members that are not declared static, and which (or one of their own members) don't have a non-arg constructor. For example a logger, or a JAXB Marshaller object that has a ValidationEventHandler with no non-arg constructor. Then JAXB tries to marshall/unmarshall them and fails with the above error message.

          Just set them as 'static' and the problem should go.

          If it doesn't resolve your problem, it can be more tricky with concerns about your web service document style. Take a look here:

          http://forums.java.net/jive/message.jspa?messageID=215688