Using JAXB for classes extending third party objects
161271Feb 1 2013 — edited Feb 4 2013I am trying to use JMX WS connector in my project. I have stuck with a problem I cannot solve. For example, I have class
public class TypedObjectName extends ObjectName
I do not know how to annotate this class. If I am trying to use @XmlRootElement annotation and provide no-arg default constructor for this class, JAXB throws an error
Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
javax.management.ObjectName does not have a no-arg default constructor.
this problem is related to the following location:
at javax.management.ObjectName
at com.hp.usage.mgmt.naming.TypedObjectName
I am not able to modify ObjectName because it is a part of jdk, third party class from javax.management. I need to have this class in JAXB context since one my service has a method with this type, for example
*public interface PerformanceMeasurement {*
*...*
public TypedObjectName getJob();
*}*
Any ideas to make it workable?