Ich habe Web-Service mit Methode, die meine benutzerdefinierte Ausnahme werfen.@ApplicationException mit Java 1.7
@WebMethod void someMethod(...) throws MyException
MyException
Klasse mit @ApplicationException
kommentierte
@ApplicationException
class public MyException extends Exception {...}
Ich war bauen mein Projekt mit maven
, JDK 1.6
und jaxws-maven-plugin
WSDL zur Erzeugung und alles gut funktioniert.
Aber jetzt will ich mit JDK 1.7
das gleiche tun, und ich bekomme jetzt Irgendwelche Ideen
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
Fehler entdeckt?
unterschiedlich ist, ist, dass mit JDK 1.6 Klasse MyExceptionBean wie
public class MyExceptionBean {
private String message;
aber mit JDK
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>