JAXB Not Generating Java Objects In IntelliJ 10.0.2 Follow
Answered
I'm running IntelliJ 10.02. build #IU 103.72 on Windows XP SP 3.
I'd like to generate objects from an .xsd using JAXB. I have the web services plug-in installed and enabled.
If I open the .xsd in the editor and right click inside, I walk down to the web services->Generate Java code from XML schema selection and supply an output package name.
The only output I get is an echo of the .xsd; no objects generated.
What did I miss? What am I doing wrong. Thanks.
Please sign in to leave a comment.
Hello Michael,
could you please send me your xsd file to kb at jetbrains dot com.
Thank you.
No problem with IntelliJ or JAXB1; the .xsd was the culprit. There were two elements whose names differed by a single character: one lower case, the other upper. All was well once I removed the lower case version. My apologies for the bother. Sincerely, Duffy
Is there a way to identify what is the error on the file? Intellij doesn't show any error logs, it just finish the task as it succeeded but doesn't generate the classes.
Hello,
Aren't there errors/warnings in idea.log ("Help | Show Log in...")?
Hi! No errors is appended in any of those files. Here is the xsd file, XSD analysers found no error on it:
Here are errors I got when running xjc from command line:
parsing a schema...
[ERROR] Current configuration of the parser doesn't allow a maxOccurs attribute value to be set greater than the value 5 000.
line 86 of file:<FILE_NAME>.xsd
Failed to parse a schema.
parsing a schema...
[ERROR] Current configuration of the parser doesn't allow a maxOccurs attribute value to be set greater than the value 5 000.
line 156 of file:<FILE_NAME>.xsd
Changing values from 9999 to 4000 fixes the issue.
We have related requests on YouTrack to show XJC errors: https://youtrack.jetbrains.com/issue/IDEA-92973, https://youtrack.jetbrains.com/issue/IDEA-148755
Thank you very much for your help!
You are welcome!