Java 11: Run into JAXBException
Issue #167
new
While running the 0.9-SNAPSHOT library in a Java 11 environment, the following error is received:
javax.xml.bind.DataBindingException: javax.xml.bind.JAXBException
- with linked exception:
[com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 3 counts of IllegalAnnotationExceptions
rocks.xmpp.addr.Jid is an interface, and JAXB can't handle interfaces.
this problem is related to the following location:
at rocks.xmpp.addr.Jid
at public final synchronized rocks.xmpp.addr.Jid rocks.xmpp.core.stanza.model.Stanza.getFrom()
at rocks.xmpp.core.stanza.model.Stanza
at rocks.xmpp.core.stanza.model.ExtensibleStanza
at rocks.xmpp.core.stanza.model.Message
at rocks.xmpp.core.stanza.model.server.ServerMessage
Two classes have the same XML type name "type". Use @XmlType.name and @XmlType.namespace to assign different names to them.
this problem is related to the following location:
at rocks.xmpp.core.stanza.model.Message$Type
at public final synchronized rocks.xmpp.core.stanza.model.Message$Type rocks.xmpp.core.stanza.model.Message.getType()
at rocks.xmpp.core.stanza.model.Message
at rocks.xmpp.core.stanza.model.server.ServerMessage
this problem is related to the following location:
at rocks.xmpp.core.stanza.model.IQ$Type
at public final synchronized rocks.xmpp.core.stanza.model.IQ$Type rocks.xmpp.core.stanza.model.IQ.getType()
at rocks.xmpp.core.stanza.model.IQ
at rocks.xmpp.core.stanza.model.server.ServerIQ
Two classes have the same XML type name "type". Use @XmlType.name and @XmlType.namespace to assign different names to them.
this problem is related to the following location:
at rocks.xmpp.core.stanza.model.IQ$Type
at public final synchronized rocks.xmpp.core.stanza.model.IQ$Type rocks.xmpp.core.stanza.model.IQ.getType()
at rocks.xmpp.core.stanza.model.IQ
at rocks.xmpp.core.stanza.model.server.ServerIQ
this problem is related to the following location:
at rocks.xmpp.core.stanza.model.Presence$Type
at public final synchronized rocks.xmpp.core.stanza.model.Presence$Type rocks.xmpp.core.stanza.model.Presence.getType()
at rocks.xmpp.core.stanza.model.Presence
at rocks.xmpp.core.stanza.model.server.ServerPresence
]
Comments (1)
-
repo owner - Log in to comment
This is really weird.
Because the Message/IQ/Presence classes have already a
@XmlType(name = "messageType")
annotation and the Jid interface has a@XmlJavaTypeAdapter(JidAdapter.class)
declared.All unit tests, which do a lot marshalling/unmarshalling have no issues with this.
Which JAXB implementation do you use?