Skip to content

Cannot resolve the name MyType to a(n) 'type definition' component #273

@stondo

Description

@stondo

Dear jaxb2-maven-team,

I am having some issues understanding how to avoid the error mentioned above while trying to generate some Java classes from XSDs.
I know the XSDs are correct because xsdata, a Python tool, can generate good Python classes from the same files and I am probably missing some specific config.

I cannot share those XSDs here unfortunately. Is there any change the error message I pasted above give you any hints at all?
But let me try to extract the some useful information to make it easier for you to help me maybe.

I have a complexType with some complex content which contains the problematic element throwing the above mentioned error:
<xs:element name="flight" type="fx:MyType" minOccurs="1" maxOccurs="1"> <xs:annotation> <xs:documentation>Some doc.</xs:documentation> </xs:annotation> </xs:element>

MyType is imported from another XSD, which defines it. IntelliJ is able to navigate the relationship correctly:
<xs:complexType name="MyType"> ...

Even xjc from command line fails for the same reason.
Tried with different JVM versions from Java 8 till Java 17.
Any clue what might be wrong please?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions