Closed razum90 closed 10 months ago
@razum90 seems this error is only trigger by the validation phase of xjc. It seems it doesnt handle big scheme definition (5k nodes is a big one) Could you provide more context about this one so we can test it ? Regards
Heya @laurentschoelens, thanks for the reply. I am afraid I cannot provide the XSD file I am working with. But it is indeed very big. Should be able to reproduce it by finding some big XSD (more than 5k nodes) online, and trying with that one maybe?
Yes for sure, but will have to find one :)
By analysting the stacktrace, it seems that only validation failed :
at com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory.newSchema (XMLSchemaFactory.java:281)`
That should explain why generation is OK and you have only this error that pops out of "nowhere"
Yes, I guess that's the hard part 😅
Yup it is not blocking the generation. But would be nice to get rid of the error msg.
My guess is this should be configurable See https://github.com/JetBrains/jdk8u_jaxp/blob/ef214d85066b758a01f9949298b255b8ffd8ab19/src/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSAttributeChecker.java#L1194
I'll try to look deeper later
@razum90 : Could you try adding following systemproperty when running your generation ?
http://www.oracle.com/xml/jaxp/properties/maxOccurLimit
(deprecated since jdk17 but still observed)
jdk.xml.maxOccurLimit
Defining to 0
means no limit
Default is 5000
If this works, we should be able to add some property in system based on plugin parameter to parse bigger schema with "noLimit" value defined.
Yes @laurentschoelens, it appears to be working when providing that system property 👍 getting no exceptions.
I.e. mvn clean compile ... -Djdk.xml.maxOccurLimit=99999999
Hi and thank you for developing this. It has unblocked us so that we can now finally update spring-boot to the latest version in our project.
There's an error I am getting when using this plugin for our bigger xsd files, saying:
I did not get this error before upgrading. However the generation seems to be working anyway, so I am confused what the implications of getting this error is for us.
Any ideas?