Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8022465
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T22:16:27+00:00 2026-06-04T22:16:27+00:00

I use maven-jaxb2-plugin to generate jaxb annotated classes from xsd. I have many xsd

  • 0

I use maven-jaxb2-plugin to generate jaxb annotated classes from xsd. I have many xsd files like those:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="A3">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="loginPartner">
          <xs:complexType>
            <xs:sequence>
              <xs:element type="xs:string" name="login"/>
              <xs:element type="xs:string" name="password"/>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="A3">
    <xs:complexType>
      <xs:sequence>
        <xs:element type="xs:string" name="errorCode"/>
        <xs:element type="xs:string" name="errorDescription"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>

When I run maven plugin it gives me an error:

[ERROR] Error while parsing schema(s).Location [
file:schema1.xsd{10,16}]. org.xml.sax.SAXParseException: ‘A3’ is already
defined

Is there any way to fix this?
Actually I have many XSDs representing request/response messages to/from server. I want to simplify creating, validating, parsing messages. Maybe is there another solution for this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T22:16:28+00:00Added an answer on June 4, 2026 at 10:16 pm

    I had a similar problem; I had two separate and independent WSDL (each with several schema definitions in each) that I was running through JAXB (via the maven-jaxb2-plugin) to generate mapping classes.

    My WSDL’s shared a duplicate schema definition that was causing XJC to choke.

    Because they were both independent, I was able to generate JAXB mappings by running two separate executions of the maven-jaxb2-plugin – one for each WSDL (covered here – How can I tell jaxb / Maven to generate multiple schema packages?).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Maven project that uses the jaxb2-maven-plugin to compile some xsd files.
I have a modular project in which, for every single module, I use jaxb2-maven-plugin
I have configured my pom file to use maven-embedded-glassfish-plugin. In fact this is the
I am trying to use Maven to move all the *.xsd files contained in
I'd like to use Maven to build an IntelliJ IDEA plugin. Googling and searching
I would like to ask such question, I have XML xsd`s, which generate beans
I use maven-antrun-plugin for init config files for my project. But i need to
I use Maven to package as war a Java EE project. I use tomcat-maven-plugin,
I use the maven-properties-plugin during the initialization phase to read in a bunch of
We use the maven versions plugin to keep our versions up to date by

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.