jaxb
  1. jaxb
  2. JAXB-1021

When an element have same name that his element ancestor, jvc generate bad java classes, with a parent and a son with the same name.

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.2.7
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      Windows 7 64,

      Description

      If you have en element with the same name that his parent, jvc run without problems but generate bad java classes.
      If you tray to binding the name, then jvc generate a run time error like:

      D:\PCBCK\Java\jaxb\jaxb-ri-2.2.7\samples\aod>xjc -nv -verbose messages.xsd -b bindingset.xml
      Exception in thread "main" java.lang.IllegalArgumentException: Illegal class inheritance loop.
      Outer class TargetSpeedElement may not subclass from inner class:
      <<classnale>>
      at com.sun.codemodel.internal.JDefinedClass._extends(JDefinedClass.java:257)
      at com.sun.tools.internal.xjc.generator.bean.ImplStructureStrategy$1._extends(ImplStructureStrategy.java:104)
      at com.sun.tools.internal.xjc.generator.bean.BeanGenerator.<init>(BeanGenerator.java:197)
      at com.sun.tools.internal.xjc.generator.bean.BeanGenerator.generate(BeanGenerator.java:151)
      at com.sun.tools.internal.xjc.model.Model.generateCode(Model.java:275)
      at com.sun.tools.internal.xjc.Driver.run(Driver.java:342)
      at com.sun.tools.internal.xjc.Driver.run(Driver.java:184)
      at com.sun.tools.internal.xjc.Driver._main(Driver.java:107)
      at com.sun.tools.internal.xjc.Driver.access$000(Driver.java:64)
      at com.sun.tools.internal.xjc.Driver$1.run(Driver.java:87)

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Iaroslav Savytskyi
            Reporter:
            jpsanchez
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: