Unable to Generate Enum Class via XJCHow to generate a random alpha-numeric string?Java inner class and static nested classHow do I generate random integers within a specific range in Java?How to create a generic array in Java?How to get an enum value from a string value in Java?No @XmlRootElement generated by JAXBA 'for' loop to iterate over an enum in JavaComparing Java enum members: == or equals()?How to get a class instance of generics type TIs it possible to override embedded jaxb customizations with externally defined ones?
Examples of proofs by making reduction to a finite set
Amortized Loans seem to benefit the bank more than the customer
Permutations in Disguise
Is it appropriate to CC a lot of people on an email
Python web-scraper to download table of transistor counts from Wikipedia
Meaning of Swimming their horses
How would you control supersoldiers in a late iron-age society?
How to control the output voltage of a solid state relay
Why don't airports use arresting gears to recover energy from landing passenger planes?
Ambiguity in notation resolved by +
Test to know when to use GLM over Linear Regression?
How much would a 1 foot tall human weigh?
Why any infinite sequence of real functions can be generated from a finite set through composition?
Are there objective criteria for classifying consonance v. dissonance?
Why is the year in this ISO timestamp not 2019?
If I want an interpretable model, are there methods other than Linear Regression?
Are space camera sensors usually round, or square?
Bit one of the Intel 8080's Flags register
Unable to find solution to 6 simultaneous equations
Planar regular languages
How to be sure services and researches offered by the University are not becoming cases of unfair competition?
Output a Super Mario Image
Block diagram vs flow chart?
Shouldn't countries like Russia and Canada support global warming?
Unable to Generate Enum Class via XJC
How to generate a random alpha-numeric string?Java inner class and static nested classHow do I generate random integers within a specific range in Java?How to create a generic array in Java?How to get an enum value from a string value in Java?No @XmlRootElement generated by JAXBA 'for' loop to iterate over an enum in JavaComparing Java enum members: == or equals()?How to get a class instance of generics type TIs it possible to override embedded jaxb customizations with externally defined ones?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I have an XSD tag as:
<xs:complexType name="ifExpression">
<xs:annotation>
<xs:documentation>Boolean logic depending on expressions</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="variableName" type="xs:string"/>
<xs:element name="operation">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="eq"/>
<xs:enumeration value="ne"/>
<xs:enumeration value="gt"/>
<xs:enumeration value="lt"/>
<xs:enumeration value="ge"/>
<xs:enumeration value="le"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="value" type="tet:valueType"/>
</xs:sequence>
</xs:complexType>
I have a binding file:
<jxb:bindings schemaLocation="Selector.xsd">
<jxb:bindings node="//xsd:element[@name='ifExpression']/xsd:sequence/xsd:element[@name='operation']">
<jxb:typesafeEnumClass name="Operation" />
</jxb:bindings>
</jxb:bindings>
I have this as my global bindings:
<jxb:globalBindings generateIsSetMethod="true" enableJavaNamingConventions="true" underscoreBinding="asCharInWord" typesafeEnumMemberName="generateName" typesafeEnumBase="xsd:string" fixedAttributeAsConstantProperty="true" />
Now when I run mvn clean install, I get the following error:
com.sun.istack.SAXParseException2: compiler was unable to honor this enum customization. It is attached to a wrong place, or its inconsistent with other bindings.
at com.sun.tools.xjc.ErrorReceiver.error (ErrorReceiver.java:86)
at com.sun.tools.xjc.reader.xmlschema.ErrorReporter.error (ErrorReporter.java:84)
at com.sun.tools.xjc.reader.xmlschema.UnusedCustomizationChecker.check (UnusedCustomizationChecker.java:150)
.
.
.
com.sun.istack.SAXParseException2: (the above customization is attached to the following location in the schema)
at com.sun.tools.xjc.ErrorReceiver.error (ErrorReceiver.java:86)
at com.sun.tools.xjc.reader.xmlschema.ErrorReporter.error (ErrorReporter.java:84)
at com.sun.tools.xjc.reader.xmlschema.UnusedCustomizationChecker.check (UnusedCustomizationChecker.java:155)
at com.sun.tools.xjc.reader.xmlschema.UnusedCustomizationChecker.check (UnusedCustomizationChecker.java:128)
at com.sun.tools.xjc.reader.xmlschema.UnusedCustomizationChecker.elementDecl (UnusedCustomizationChecker.java:233)
Just wanted to know am I doing something wrong in the path in the binding file? Or am I on the wrong path completely?
java jaxb xjc cxf-xjc-plugin
add a comment
|
I have an XSD tag as:
<xs:complexType name="ifExpression">
<xs:annotation>
<xs:documentation>Boolean logic depending on expressions</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="variableName" type="xs:string"/>
<xs:element name="operation">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="eq"/>
<xs:enumeration value="ne"/>
<xs:enumeration value="gt"/>
<xs:enumeration value="lt"/>
<xs:enumeration value="ge"/>
<xs:enumeration value="le"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="value" type="tet:valueType"/>
</xs:sequence>
</xs:complexType>
I have a binding file:
<jxb:bindings schemaLocation="Selector.xsd">
<jxb:bindings node="//xsd:element[@name='ifExpression']/xsd:sequence/xsd:element[@name='operation']">
<jxb:typesafeEnumClass name="Operation" />
</jxb:bindings>
</jxb:bindings>
I have this as my global bindings:
<jxb:globalBindings generateIsSetMethod="true" enableJavaNamingConventions="true" underscoreBinding="asCharInWord" typesafeEnumMemberName="generateName" typesafeEnumBase="xsd:string" fixedAttributeAsConstantProperty="true" />
Now when I run mvn clean install, I get the following error:
com.sun.istack.SAXParseException2: compiler was unable to honor this enum customization. It is attached to a wrong place, or its inconsistent with other bindings.
at com.sun.tools.xjc.ErrorReceiver.error (ErrorReceiver.java:86)
at com.sun.tools.xjc.reader.xmlschema.ErrorReporter.error (ErrorReporter.java:84)
at com.sun.tools.xjc.reader.xmlschema.UnusedCustomizationChecker.check (UnusedCustomizationChecker.java:150)
.
.
.
com.sun.istack.SAXParseException2: (the above customization is attached to the following location in the schema)
at com.sun.tools.xjc.ErrorReceiver.error (ErrorReceiver.java:86)
at com.sun.tools.xjc.reader.xmlschema.ErrorReporter.error (ErrorReporter.java:84)
at com.sun.tools.xjc.reader.xmlschema.UnusedCustomizationChecker.check (UnusedCustomizationChecker.java:155)
at com.sun.tools.xjc.reader.xmlschema.UnusedCustomizationChecker.check (UnusedCustomizationChecker.java:128)
at com.sun.tools.xjc.reader.xmlschema.UnusedCustomizationChecker.elementDecl (UnusedCustomizationChecker.java:233)
Just wanted to know am I doing something wrong in the path in the binding file? Or am I on the wrong path completely?
java jaxb xjc cxf-xjc-plugin
add a comment
|
I have an XSD tag as:
<xs:complexType name="ifExpression">
<xs:annotation>
<xs:documentation>Boolean logic depending on expressions</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="variableName" type="xs:string"/>
<xs:element name="operation">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="eq"/>
<xs:enumeration value="ne"/>
<xs:enumeration value="gt"/>
<xs:enumeration value="lt"/>
<xs:enumeration value="ge"/>
<xs:enumeration value="le"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="value" type="tet:valueType"/>
</xs:sequence>
</xs:complexType>
I have a binding file:
<jxb:bindings schemaLocation="Selector.xsd">
<jxb:bindings node="//xsd:element[@name='ifExpression']/xsd:sequence/xsd:element[@name='operation']">
<jxb:typesafeEnumClass name="Operation" />
</jxb:bindings>
</jxb:bindings>
I have this as my global bindings:
<jxb:globalBindings generateIsSetMethod="true" enableJavaNamingConventions="true" underscoreBinding="asCharInWord" typesafeEnumMemberName="generateName" typesafeEnumBase="xsd:string" fixedAttributeAsConstantProperty="true" />
Now when I run mvn clean install, I get the following error:
com.sun.istack.SAXParseException2: compiler was unable to honor this enum customization. It is attached to a wrong place, or its inconsistent with other bindings.
at com.sun.tools.xjc.ErrorReceiver.error (ErrorReceiver.java:86)
at com.sun.tools.xjc.reader.xmlschema.ErrorReporter.error (ErrorReporter.java:84)
at com.sun.tools.xjc.reader.xmlschema.UnusedCustomizationChecker.check (UnusedCustomizationChecker.java:150)
.
.
.
com.sun.istack.SAXParseException2: (the above customization is attached to the following location in the schema)
at com.sun.tools.xjc.ErrorReceiver.error (ErrorReceiver.java:86)
at com.sun.tools.xjc.reader.xmlschema.ErrorReporter.error (ErrorReporter.java:84)
at com.sun.tools.xjc.reader.xmlschema.UnusedCustomizationChecker.check (UnusedCustomizationChecker.java:155)
at com.sun.tools.xjc.reader.xmlschema.UnusedCustomizationChecker.check (UnusedCustomizationChecker.java:128)
at com.sun.tools.xjc.reader.xmlschema.UnusedCustomizationChecker.elementDecl (UnusedCustomizationChecker.java:233)
Just wanted to know am I doing something wrong in the path in the binding file? Or am I on the wrong path completely?
java jaxb xjc cxf-xjc-plugin
I have an XSD tag as:
<xs:complexType name="ifExpression">
<xs:annotation>
<xs:documentation>Boolean logic depending on expressions</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="variableName" type="xs:string"/>
<xs:element name="operation">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="eq"/>
<xs:enumeration value="ne"/>
<xs:enumeration value="gt"/>
<xs:enumeration value="lt"/>
<xs:enumeration value="ge"/>
<xs:enumeration value="le"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="value" type="tet:valueType"/>
</xs:sequence>
</xs:complexType>
I have a binding file:
<jxb:bindings schemaLocation="Selector.xsd">
<jxb:bindings node="//xsd:element[@name='ifExpression']/xsd:sequence/xsd:element[@name='operation']">
<jxb:typesafeEnumClass name="Operation" />
</jxb:bindings>
</jxb:bindings>
I have this as my global bindings:
<jxb:globalBindings generateIsSetMethod="true" enableJavaNamingConventions="true" underscoreBinding="asCharInWord" typesafeEnumMemberName="generateName" typesafeEnumBase="xsd:string" fixedAttributeAsConstantProperty="true" />
Now when I run mvn clean install, I get the following error:
com.sun.istack.SAXParseException2: compiler was unable to honor this enum customization. It is attached to a wrong place, or its inconsistent with other bindings.
at com.sun.tools.xjc.ErrorReceiver.error (ErrorReceiver.java:86)
at com.sun.tools.xjc.reader.xmlschema.ErrorReporter.error (ErrorReporter.java:84)
at com.sun.tools.xjc.reader.xmlschema.UnusedCustomizationChecker.check (UnusedCustomizationChecker.java:150)
.
.
.
com.sun.istack.SAXParseException2: (the above customization is attached to the following location in the schema)
at com.sun.tools.xjc.ErrorReceiver.error (ErrorReceiver.java:86)
at com.sun.tools.xjc.reader.xmlschema.ErrorReporter.error (ErrorReporter.java:84)
at com.sun.tools.xjc.reader.xmlschema.UnusedCustomizationChecker.check (UnusedCustomizationChecker.java:155)
at com.sun.tools.xjc.reader.xmlschema.UnusedCustomizationChecker.check (UnusedCustomizationChecker.java:128)
at com.sun.tools.xjc.reader.xmlschema.UnusedCustomizationChecker.elementDecl (UnusedCustomizationChecker.java:233)
Just wanted to know am I doing something wrong in the path in the binding file? Or am I on the wrong path completely?
java jaxb xjc cxf-xjc-plugin
java jaxb xjc cxf-xjc-plugin
asked Mar 28 at 12:13
hell_storm2004hell_storm2004
1723 silver badges18 bronze badges
1723 silver badges18 bronze badges
add a comment
|
add a comment
|
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55397371%2funable-to-generate-enum-class-via-xjc%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.
Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55397371%2funable-to-generate-enum-class-via-xjc%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown