0

Upgrading to jakarta caused some issues for me.

I'm using the following maven plugin:

<groupId>org.patrodyne.jvnet</groupId>
<artifactId>hisrc-higherjaxb40-maven-plugin</artifactId>

And I use episodal compilation (have libraries). Suddenly I'm facing the following problem:

Can't have @XmlAnyAttribute when a base class has it already.
    this problem is related to the following location:
        at @jakarta.xml.bind.annotation.XmlAnyAttribute()

Closer inspection reveals that XJC suddenly generates the following field:

        @XmlAnyAttribute
        private Map<QName, String> otherAttributes = new HashMap<>();

which it did not generate before. How can I disable this?

Sjaak
  • 3,602
  • 17
  • 29
  • Please provide an [MRE](https://stackoverflow.com/help/minimal-reproducible-example). – Rick O'Sullivan Jul 16 '23 at 14:08
  • Hi Rick.. missed your request in my holiday period. We've got a temp fix (overriding selectively generated classes with binding). I'll try to make MRE. – Sjaak Aug 30 '23 at 15:30
  • MRE: https://github.com/sjaakd/jreproducer_jaxb .. However for some reason it does not yet show the same behaviourruntime. It does generate the troublesome 'otherAttributes'. I'll see if I can add more to the xsd to trigger the fault – Sjaak Aug 31 '23 at 08:50

0 Answers0