Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
stondo opened this issue Oct 10, 2023 · 1 comment
Open

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

stondo opened this issue Oct 10, 2023 · 1 comment

Comments

@stondo
Copy link

stondo commented Oct 10, 2023

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?

@perlovga
Copy link

I have the same issue with that. Seems it's related to referring to the type with a prefix. I haven't been able to solve this up to now so I'd appreciate any feedback someone might have.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants