I have a web service with a method that throws my user exit.
@WebMethod void someMethod(...) throws MyException
MyException class annotated with @ApplicationException
@ApplicationException class public MyException extends Exception {...}
I created my project using maven , JDK 1.6 and the jaxws-maven-plugin to create WSDL, and everything worked fine.
But now I want to do the same with JDK 1.7 , and now I get an error
Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions java.lang.StackTraceElement does not have a no-arg default constructor. this problem is related to the following location: at java.lang.StackTraceElement at public java.lang.StackTraceElement[] java.lang.Throwable.getStackTrace() at java.lang.Throwable at private java.lang.Throwable[] com.MyPackage.MyExceptionBean.suppressed at com.MyPackage.MyExceptionBean
Any ideas?
Unlike JDK 1.6, the MyExceptionBean class was thrown as
public class MyExceptionBean { private String message;
but with JDK 1.7
public class MyExceptionBean { private String message; private Throwable[] suppressed;
jaxws-maven-plugin
<groupId>org.codehaus.mojo</groupId> <artifactId>jaxws-maven-plugin</artifactId> <version>1.10</version>
source share