com.sun.istack.SAXException2: Instanz… ersetzt „java.lang.Object“, ist jedoch an einen anonymen Typ gebunden

Ich aktualisiere ein Projekt von Version 1.x auf jaxb 2.2.7.

Ich habe die App manchmal zum Laufen gebracht, aber bei einigen Antworten sehe ich Folgendes:

java.lang.RuntimeException: javax.xml.bind.MarshalException
- with linked exception:
[com.sun.istack.SAXException2: Instance of "com.mycompany.global.er.decoupling.binding.response.PricePointType$BalanceImpactRates$BalanceImpactRate" 
is substituting "java.lang.Object", but 
"com.mycompany.global.er.decoupling.binding.response.PricePointType$BalanceImpactRates$BalanceImpactRate"
 is bound to an anonymous type.]

Dies funktionierte gut in Jaxb 1.0. Ich habe keine Ahnung, woran das liegen könnte.

Hier ist ein Auszug aus dem xsd (den ich nicht ändern kann, da Clients es verwenden):

<xs:complexType name="price-pointType">
    <xs:sequence>
        <xs:element name="id" type="xs:string" />
.........
        <xs:element name="duration" type="durationType" />
        <xs:element name="order" type="xs:int" />
        <xs:element name="min-sub-period" type="xs:int" />
        <xs:element name="balance-impacts" minOccurs="0">
            <xs:complexType>
                <xs:sequence>
                    <xs:element name="balance-impact" type="charging-resourceType"
                        minOccurs="0" maxOccurs="unbounded" />
                </xs:sequence>
            </xs:complexType>
        </xs:element>
        <xs:element name="balance-impact-rates" minOccurs="0">
            <xs:complexType>
                <xs:sequence>
                    <xs:element name="balance-impact-rate" minOccurs="0"
                        maxOccurs="unbounded">
                        <xs:complexType>
                            <xs:sequence>
                                <xs:element name="rate" type="xs:double" />
                            </xs:sequence>
                            <xs:attribute name="charging-resource-code" type="xs:string"
                                use="required" />
                        </xs:complexType>
                    </xs:element>
                </xs:sequence>
            </xs:complexType>
        </xs:element>

Irgendwelche Vorschläge?

Antworten auf die Frage(2)

Ihre Antwort auf die Frage