java.lang.IllegalArgumentException: trying to create the same field twice: additionalProperties

GitHub | ctrimble | 4 months ago
  1. 0

    GitHub comment 608#239608389

    GitHub | 4 months ago | ctrimble
    java.lang.IllegalArgumentException: trying to create the same field twice: additionalProperties
  2. 0

    generate-api , needs to report the path to the field for failure.

    GitHub | 4 months ago | chabhishek123
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jsonschema2pojo:jsonschema2pojo-maven-plugin:0.4.24:generate (generate-api) on project xyz-spec: Execution generate-api of goal org.jsonschema2pojo:jsonschema2pojo-maven-plugin:0.4.24:generate failed: trying to create the same field twice: additionalProperties
  3. 0

    trying to create the same field twice: instance_

    GitHub | 3 years ago | wintersandroid
    java.lang.IllegalArgumentException: trying to create the same field twice: instance_ int textColourStd; ^
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    [jwsc] error: Response wrapper bean names must be unique ?

    Oracle Community | 9 years ago | 666705
    java.lang.IllegalArgumentException: trying to create thesame field twice: config [jwsc]
  6. 0

    Trace: Exception in thread "main" java.lang.IllegalArgumentException: trying to create the same field twice: ts1EnbDirectInfoTransferTrir at com.sun.codemodel.JDefinedClass.field(JDefinedClass.java:421) at com.sun.codemodel.JDefinedClass.field(JDefinedClass.java:392) at com.sun.tools.xjc.generator.bean.field.AbstractFieldWithVar.createField(AbstractFieldWithVar.java:77) at com.sun.tools.xjc.generator.bean.field.SingleField.<init>(SingleField.java:94) at com.sun.tools.xjc.generator.bean.field.SingleField.<init>(SingleField.java:81) at sun.reflect.GeneratedConstructorAccessor8.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at com.sun.tools.xjc.generator.bean.field.GenericFieldRenderer.generate(GenericFieldRenderer.java:69) at com.sun.tools.xjc.generator.bean.field.DefaultFieldRenderer.generate(DefaultFieldRenderer.java:84) at com.sun.tools.xjc.generator.bean.BeanGenerator.generateFieldDecl(BeanGenerator.java:764) at com.sun.tools.xjc.generator.bean.BeanGenerator.generateClassBody(BeanGenerator.java:545) at com.sun.tools.xjc.generator.bean.BeanGenerator.<init>(BeanGenerator.java:248) at com.sun.tools.xjc.generator.bean.BeanGenerator.generate(BeanGenerator.java:166) at com.sun.tools.xjc.model.Model.generateCode(Model.java:290) at com.sun.tools.xjc.Driver.run(Driver.java:348) at com.sun.tools.xjc.Driver.run(Driver.java:196) at com.sun.tools.xjc.Driver._main(Driver.java:121) at com.sun.tools.xjc.Driver.access$000(Driver.java:79) at com.sun.tools.xjc.Driver$1.run(Driver.java:101) In XML I have two fields with the same name, but the are in different cases, which is legal: <!-- - Name: ts1EnbDirectInfoTransferTrir - Defined in: lte.NaccTimersConf - Units: ms - Min/Max: 1 to 10000 - Default: 3000 - Access: Read-Write --> <xsd:element name="ts1EnbDirectInfoTransferTrir" minOccurs="0"> <xsd:simpleType> <xsd:restriction base="xsd:int"> <xsd:minInclusive value="1"/> <xsd:maxInclusive value="10000"/> </xsd:restriction> </xsd:simpleType> </xsd:element> <!-- - Name: tS1EnbDirectInfoTransferTrir - Defined in: lte.NaccTimersConf - Units: ms - Min/Max: 1 to 10000 - Default: 3000 - Access: Read-Write --> <xsd:element name="tS1EnbDirectInfoTransferTrir" minOccurs="0"> <xsd:simpleType> <xsd:restriction base="xsd:int"> <xsd:minInclusive value="1"/> <xsd:maxInclusive value="10000"/> </xsd:restriction> </xsd:simpleType> </xsd:element>

    Java.net JIRA | 6 years ago | wargoth
    java.lang.IllegalArgumentException: trying to create the same field twice: ts1EnbDirectInfoTransferTrir

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      trying to create the same field twice: additionalProperties

      at com.sun.codemodel.JDefinedClass.field()
    2. Old JAXB XJC
      JDefinedClass.field
      1. com.sun.codemodel.JDefinedClass.field(JDefinedClass.java:425)
      2. com.sun.codemodel.JDefinedClass.field(JDefinedClass.java:396)
      2 frames
    3. org.jsonschema2pojo.rules
      SchemaRule.apply
      1. org.jsonschema2pojo.rules.AdditionalPropertiesRule.addAdditionalPropertiesField(AdditionalPropertiesRule.java:128)
      2. org.jsonschema2pojo.rules.AdditionalPropertiesRule.apply(AdditionalPropertiesRule.java:108)
      3. org.jsonschema2pojo.rules.AdditionalPropertiesRule.apply(AdditionalPropertiesRule.java:43)
      4. org.jsonschema2pojo.rules.ObjectRule.apply(ObjectRule.java:137)
      5. org.jsonschema2pojo.rules.ObjectRule.apply(ObjectRule.java:72)
      6. org.jsonschema2pojo.rules.TypeRule.apply(TypeRule.java:89)
      7. org.jsonschema2pojo.rules.TypeRule.apply(TypeRule.java:39)
      8. org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:73)
      9. org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:66)
      10. org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:30)
      10 frames
    4. org.jsonschema2pojo
      Jsonschema2Pojo.generate
      1. org.jsonschema2pojo.SchemaMapper.generate(SchemaMapper.java:88)
      2. org.jsonschema2pojo.Jsonschema2Pojo.generate(Jsonschema2Pojo.java:75)
      2 frames
    5. org.jsonschema2pojo.maven
      Jsonschema2PojoMojo.execute
      1. org.jsonschema2pojo.maven.Jsonschema2PojoMojo.execute(Jsonschema2PojoMojo.java:594)
      1 frame