jaxb
  1. jaxb
  2. JAXB-992

Property "Value" is already defined in /com/sun/xml/xsom/impl/parser/datatypes.xsd[14,33]

    Details

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

      Windows 7 + Java 1.7.45 + Maven 3.11 + Eclipse Kepler

      Description

      Attempting to compile a schema exposes duplicate propertty in datatypes.xsd

      [ERROR] jar:file:/C:/Users/MSpamer/.m2/repository/com/sun/xml/bind/jaxb-xjc/2.1.13/jaxb-xjc-2.1.13.jar!/com/sun/xml/xsom/impl/parser/datatypes.xsd[14,33]
      com.sun.istack.SAXParseException2; systemId: jar:file:/C:/Users/MSpamer/.m2/repository/com/sun/xml/bind/jaxb-xjc/2.1.13/jaxb-xjc-2.1.13.jar!/com/sun/xml/xsom/impl/parser/datatypes.xsd; lineNumber: 14; columnNumber: 33; Property "Value" is already defined. Use <jaxb:property> to resolve this conflict.
      at com.sun.tools.xjc.ErrorReceiver.error(ErrorReceiver.java:82)
      at com.sun.tools.xjc.reader.ModelChecker.checkPropertyCollision(ModelChecker.java:108)
      at com.sun.tools.xjc.reader.ModelChecker.check(ModelChecker.java:94)
      at com.sun.tools.xjc.reader.ModelChecker.check(ModelChecker.java:67)
      at com.sun.tools.xjc.reader.xmlschema.BGMBuilder._build(BGMBuilder.java:189)
      at com.sun.tools.xjc.reader.xmlschema.BGMBuilder.build(BGMBuilder.java:116)
      at com.sun.tools.xjc.ModelLoader.annotateXMLSchema(ModelLoader.java:415)
      at com.sun.tools.xjc.ModelLoader.load(ModelLoader.java:167)
      at com.sun.tools.xjc.ModelLoader.load(ModelLoader.java:113)
      at com.sun.tools.xjc.Driver.run(Driver.java:313)
      at org.codehaus.mojo.jaxb2.AbstractXjcMojo.execute(AbstractXjcMojo.java:327)
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
      at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
      at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
      at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
      at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
      at org.codehaus.classworlds.Launcher.main(Launcher.java:46)

        Activity

        Hide
        Iaroslav Savytskyi added a comment -

        Hi,

        Please provide more info:

        1) What exactly are you trying to do?
        2) Why are you using JAXB 2.1.x?

        Thanks.

        Show
        Iaroslav Savytskyi added a comment - Hi, Please provide more info: 1) What exactly are you trying to do? 2) Why are you using JAXB 2.1.x? Thanks.
        Hide
        martinspamer added a comment - - edited

        I'm writing an automation test suite for a system that has a unrigourously defined schema from a third party over which I have no control.

        I was using http://mojo.codehaus.org/jaxb2-maven-plugin/ because I wanted to utilise its feature for creating test classes for the element object model. That plugin uses 2.1.13.

        Show
        martinspamer added a comment - - edited I'm writing an automation test suite for a system that has a unrigourously defined schema from a third party over which I have no control. I was using http://mojo.codehaus.org/jaxb2-maven-plugin/ because I wanted to utilise its feature for creating test classes for the element object model. That plugin uses 2.1.13.
        Hide
        Iaroslav Savytskyi added a comment -

        Can you please send me testcase to iaroslav.savytskyi at oracle.com so I will attach it here.

        Thanks.

        Hopefully we will update maven plugin for JAXB-RI soon.

        Show
        Iaroslav Savytskyi added a comment - Can you please send me testcase to iaroslav.savytskyi at oracle.com so I will attach it here. Thanks. Hopefully we will update maven plugin for JAXB-RI soon.
        Hide
        anupamb82 added a comment -

        I also faced the same issue when I tried to generate the class out of this xsd file.

        ftp://ftp.ncbi.nlm.nih.gov/pubchem/data_spec/pubchem.xsd

        I hope this will help to resolve the problem.

        Regards
        Anupam

        Show
        anupamb82 added a comment - I also faced the same issue when I tried to generate the class out of this xsd file. ftp://ftp.ncbi.nlm.nih.gov/pubchem/data_spec/pubchem.xsd I hope this will help to resolve the problem. Regards Anupam

          People

          • Assignee:
            Iaroslav Savytskyi
            Reporter:
            martinspamer
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: