Unable to create JAXBContext creating my wsdl

前端 未结 8 1002
旧巷少年郎
旧巷少年郎 2020-11-27 22:20

I am trying to generate my WSDL for webservices but I get this error:

Note:   ap round: 2
Exception in thread \"main\" javax.xml.ws.WebServiceException: Unable to         


        
相关标签:
8条回答
  • 2020-11-27 22:58

    It looks like a part of your declared API includes a type that extends a type with an internal field of type StackTraceElement[ ].

    Because StackTraceElement has no zero-argument constructor, JAXB cannot de-serialize instances of this class .

    Try removing the nextException field from SQLExceptionBean, or removing parameters of type SQLExceptionBean from your service APIs.

    0 讨论(0)
  • 2020-11-27 22:59

    I have resolved this issue by fixing the jaxb-impl version from 2.1.9 to 2.2.6 and it works fine now

    <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-impl</artifactId>
            <version>2.2.6</version>
    </dependency>
    
    0 讨论(0)
提交回复
热议问题