title: jibx 1.2.3 modular schema to code generation - binding compilation causes Internal error - cannot modify class
body: <p>I have a maven multi-module project having hierarchy:</p>
  
  <pre><code>parent
      + ota-module
         + ota-common
         + ota-veh-avail-rate
  </code></pre>
  
  <p><strong>OTA2003B ( <a href="http://www.opentravel.org/Specifications/SchemaIndex.aspx?FolderName=2003B" rel="nofollow">http://www.opentravel.org/Specifications/SchemaIndex.aspx?FolderName=2003B</a> ) Schemas I am using:</strong>    </p>
  
  <pre><code>   Common:  
      OTA_CommonPrefs.xsd  
      OTA_CommonTypes.xsd  
      OTA_SimpleTypes.xsd  
      OTA_VehicleCommonTypes.xsd  
  
  VehAvailRate
      OTA_VehAvailRateRQ.xsd
      OTA_VehAvailRateRS.xsd
  </code></pre>
  
  <p><strong>ota-module - pom.xml</strong>  </p>
  
  <pre><code>    &lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
        &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
        &lt;parent&gt;
          &lt;artifactId&gt;parent&lt;/artifactId&gt;
          &lt;groupId&gt;com.poc.multimodule&lt;/groupId&gt;
          &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
          &lt;relativePath&gt;..&lt;/relativePath&gt;
        &lt;/parent&gt;
        &lt;artifactId&gt;ota-module&lt;/artifactId&gt;
        &lt;packaging&gt;pom&lt;/packaging&gt;
        &lt;name&gt;MultiModule OTA Parent Project&lt;/name&gt;
  
        &lt;build&gt;
          &lt;pluginManagement&gt;
              &lt;plugins&gt;
                  &lt;plugin&gt;
                      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                      &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                      &lt;version&gt;2.3.2&lt;/version&gt;
                      &lt;configuration&gt;
                          &lt;source&gt;1.6&lt;/source&gt;
                          &lt;target&gt;1.6&lt;/target&gt;
                      &lt;/configuration&gt;
                  &lt;/plugin&gt;
              &lt;/plugins&gt;
          &lt;/pluginManagement&gt;
        &lt;/build&gt;
  
        &lt;dependencies&gt;
          &lt;!-- JiBX dependencies --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.jibx&lt;/groupId&gt;
              &lt;artifactId&gt;jibx-run&lt;/artifactId&gt;
              &lt;version&gt;1.2.3&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.jibx&lt;/groupId&gt;
              &lt;artifactId&gt;jibx-extras&lt;/artifactId&gt;
              &lt;version&gt;1.2.3&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.jibx&lt;/groupId&gt;
              &lt;artifactId&gt;jibx-bind&lt;/artifactId&gt;
              &lt;version&gt;1.2.3&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- JUnit --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;junit&lt;/groupId&gt;
              &lt;artifactId&gt;junit&lt;/artifactId&gt;
              &lt;version&gt;4.9&lt;/version&gt;
          &lt;/dependency&gt;
        &lt;/dependencies&gt;
  
        &lt;modules&gt;
          &lt;module&gt;ota-common&lt;/module&gt;
          &lt;module&gt;ota-veh-avail-rate&lt;/module&gt;
        &lt;/modules&gt;
      &lt;/project&gt;
  </code></pre>
  
  <p><strong>ota-common - pom.xml</strong>  </p>
  
  <pre><code>    &lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
        &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
        &lt;parent&gt;
          &lt;artifactId&gt;ota-module&lt;/artifactId&gt;
          &lt;groupId&gt;com.poc.multimodule&lt;/groupId&gt;
          &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
          &lt;relativePath&gt;..&lt;/relativePath&gt;
        &lt;/parent&gt;
        &lt;artifactId&gt;ota-common&lt;/artifactId&gt;
        &lt;name&gt;Multi Module OTA Common Project&lt;/name&gt;
        &lt;packaging&gt;jar&lt;/packaging&gt;
  
        &lt;properties&gt;
              &lt;ota_common_base_path&gt;/media/data/Practice/Maven_Multi_Module/parent/ota-module/ota-common&lt;/ota_common_base_path&gt;
        &lt;/properties&gt;
  
        &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.jibx&lt;/groupId&gt;
                  &lt;artifactId&gt;jibx-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;1.2.3&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;!-- 
                      &lt;multimodule&gt;true&lt;/multimodule&gt;
                       --&gt;
                      &lt;customizations&gt;
                      &lt;customization&gt;${ota_common_base_path}/src/main/resources/jibx/customizations/custom_a.xml&lt;/customization&gt;
                      &lt;/customizations&gt;   
  
                      &lt;schemaLocation&gt;${ota_common_base_path}/src/main/resources/schemas/OTA2003B/Common&lt;/schemaLocation&gt;
  
                      &lt;includeSchemas&gt;
                    &lt;includeSchema&gt;*.xsd&lt;/includeSchema&gt;
              &lt;/includeSchemas&gt;
  
              &lt;schemaBindingDirectory&gt;${ota_common_base_path}/src/main/java&lt;/schemaBindingDirectory&gt;
  
              &lt;includeSchemaBindings&gt;
                  &lt;includeSchemaBindings&gt;*binding.xml&lt;/includeSchemaBindings&gt;
              &lt;/includeSchemaBindings&gt;
  
               &lt;options&gt;
                   &lt;u&gt;http://www.opentravel.org/OTA/2003/05&lt;/u&gt;
               &lt;/options&gt;
                   &lt;/configuration&gt;
  
                   &lt;executions&gt;
                          &lt;execution&gt;
                          &lt;id&gt;generate-java-code-from-schema&lt;/id&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;schema-codegen&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
  
                      &lt;execution&gt;
                          &lt;id&gt;compile-jibx-binding&lt;/id&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;bind&lt;/goal&gt;
                          &lt;/goals&gt;
                    &lt;/execution&gt;
                   &lt;/executions&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
        &lt;/build&gt;
      &lt;/project&gt;
  </code></pre>
  
  <p><strong>custom_a.xml</strong>  </p>
  
  <pre><code>&lt;schema-set prefer-inline="true" package="com.poc.multimodule.ota.common"
          xmlns:xs="http://www.w3.org/2001/XMLSchema"
          type-substitutions="xs:integer xs:int xs:decimal xs:float"
          binding-file-name="base-binding.xml"&gt;
  
    &lt;schema name="OTA_CommonPrefs.xsd" /&gt;
    &lt;schema name="OTA_CommonTypes.xsd" /&gt;
    &lt;schema name="OTA_SimpleTypes.xsd" /&gt;
    &lt;schema name="OTA_VehicleCommonTypes.xsd"&gt;
       &lt;complexType name="VehicleProfileRentalPrefType"&gt;
      &lt;element path="**" name="VendorPref" ignore="true"/&gt;
      &lt;/complexType&gt;
    &lt;/schema&gt;
  
  &lt;/schema-set&gt;
  </code></pre>
  
  <p><strong>ota-veh-avail-rate - pom.xml</strong>   </p>
  
  <pre><code>    &lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
        &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
        &lt;parent&gt;
          &lt;artifactId&gt;ota-module&lt;/artifactId&gt;
          &lt;groupId&gt;com.poc.multimodule&lt;/groupId&gt;
          &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
          &lt;relativePath&gt;..&lt;/relativePath&gt;
        &lt;/parent&gt;
        &lt;artifactId&gt;ota-veh-avail-rate&lt;/artifactId&gt;
        &lt;name&gt;OTA Multi Module VehAvailRate Project&lt;/name&gt;
  
        &lt;properties&gt;
              &lt;ota_veh_avail_rate_base_path&gt;/media/data/Practice/Maven_Multi_Module/parent/ota-module/ota-veh-avail-rate&lt;/ota_veh_avail_rate_base_path&gt;
        &lt;/properties&gt;
  
        &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.poc.multimodule&lt;/groupId&gt;
              &lt;artifactId&gt;ota-common&lt;/artifactId&gt;
              &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
          &lt;/dependency&gt;
        &lt;/dependencies&gt;
  
        &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.jibx&lt;/groupId&gt;
                  &lt;artifactId&gt;jibx-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;1.2.3&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;multimodule&gt;true&lt;/multimodule&gt;
  
                      &lt;modules&gt;
                          &lt;module&gt;com.poc.multimodule:ota-common&lt;/module&gt;
                      &lt;/modules&gt;
  
                      &lt;customizations&gt;
                      &lt;customization&gt;${ota_veh_avail_rate_base_path}/src/main/resources/jibx/customizations/custom_b.xml&lt;/customization&gt;
                      &lt;/customizations&gt;   
  
                      &lt;schemaLocation&gt;${ota_veh_avail_rate_base_path}/src/main/resources/schemas/OTA2003B/VehAvailRate&lt;/schemaLocation&gt;
  
                      &lt;includeSchemas&gt;
                    &lt;includeSchema&gt;OTA_VehAvailRateRQ.xsd&lt;/includeSchema&gt;
                    &lt;includeSchema&gt;OTA_VehAvailRateRS.xsd&lt;/includeSchema&gt;
              &lt;/includeSchemas&gt;
  
              &lt;schemaBindingDirectory&gt;${ota_veh_avail_rate_base_path}/src/main/java&lt;/schemaBindingDirectory&gt;
  
              &lt;includeSchemaBindings&gt;
                  &lt;includeSchemaBindings&gt;*binding.xml&lt;/includeSchemaBindings&gt;
              &lt;/includeSchemaBindings&gt;
  
              &lt;options&gt;
                  &lt;i&gt;classpath:base-binding.xml&lt;/i&gt;
              &lt;/options&gt;
  
                   &lt;/configuration&gt;
  
                   &lt;executions&gt;
                          &lt;execution&gt;
                          &lt;id&gt;generate-java-code-from-schema&lt;/id&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;schema-codegen&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
  
                      &lt;execution&gt;
                          &lt;id&gt;compile-jibx-binding&lt;/id&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;bind&lt;/goal&gt;
                          &lt;/goals&gt;
                    &lt;/execution&gt;
                   &lt;/executions&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
        &lt;/build&gt;
      &lt;/project&gt;
  </code></pre>
  
  <p><strong>custom_b.xml</strong>  </p>
  
  <pre><code>&lt;schema-set prefer-inline="true" 
          xmlns:xs="http://www.w3.org/2001/XMLSchema"
          type-substitutions="xs:integer xs:int xs:decimal xs:float" 
          package="com.poc.multimodule.ota.vehavailrate"&gt;
  
      &lt;name-converter strip-prefixes="OTA_"
        strip-suffixes="Type AttributeGroup Group Attributes"/&gt;
  
      &lt;schema name="OTA_VehAvailRateRQ.xsd" includes="OTA_VehAvailRateRQ" /&gt;
  
      &lt;schema name="OTA_VehAvailRateRS.xsd" includes="OTA_VehAvailRateRS" /&gt;             
  &lt;/schema-set&gt;
  </code></pre>
  
  <p><strong>mvn install output</strong>:</p>
  
  <pre><code>    $ mvn -e -Dskiptests=true install
      [INFO] Error stacktraces are turned on.
      [INFO] Scanning for projects...
      [INFO] ------------------------------------------------------------------------
      [INFO] Reactor Build Order:
      [INFO] 
      [INFO] MultiModule Parent Project
      [INFO] MultiModule OTA Parent Project
      [INFO] Multi Module OTA Common Project
      [INFO] OTA Multi Module VehAvailRate Project
      [INFO]                                                                         
      [INFO] ------------------------------------------------------------------------
      [INFO] Building MultiModule Parent Project 0.0.1-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      [INFO] 
      [INFO] --- maven-install-plugin:2.3.1:install (default-install) @ parent ---
      [INFO] Installing /media/data/Practice/Maven_Multi_Module/parent/pom.xml to /media/data/Env/Local_Maven_Repository/com/poc/multimodule/parent/0.0.1-SNAPSHOT/parent-0.0.1-SNAPSHOT.pom
      [INFO]                                                                         
      [INFO] ------------------------------------------------------------------------
      [INFO] Building MultiModule OTA Parent Project 0.0.1-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      [INFO] 
      [INFO] --- maven-install-plugin:2.3.1:install (default-install) @ ota-module ---
      [INFO] Installing /media/data/Practice/Maven_Multi_Module/parent/ota-module/pom.xml to /media/data/Env/Local_Maven_Repository/com/poc/multimodule/ota-module/0.0.1-SNAPSHOT/ota-module-0.0.1-SNAPSHOT.pom
      [INFO]                                                                         
      [INFO] ------------------------------------------------------------------------
      [INFO] Building Multi Module OTA Common Project 0.0.1-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      [INFO] 
      [INFO] --- jibx-maven-plugin:1.2.3:schema-codegen (generate-java-code-from-schema) @ ota-common ---
      [INFO] Generating Java sources in /media/data/Practice/Maven_Multi_Module/parent/ota-module/ota-common/src/main/java from schemas available in /media/data/Practice/Maven_Multi_Module/parent/ota-module/ota-common/src/main/resources/schemas/OTA2003B/Common...
      Loaded and validated 4 specified schema(s)
      Generated 202 top-level classes (plus 46 inner classes) in package com.poc.multimodule.ota.common
      Total top-level classes in model: 202
      Total classes (including inner classes) in model: 248
      [INFO] 
      [INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ ota-common ---
      [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
      [INFO] Copying 5 resources
      [INFO] 
      [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ ota-common ---
      [WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
      [INFO] Compiling 202 source files to /media/data/Practice/Maven_Multi_Module/parent/ota-module/ota-common/target/classes
      [INFO] 
      [INFO] --- jibx-maven-plugin:1.2.3:bind (compile-jibx-binding) @ ota-common ---
      [INFO] Running JiBX binding compiler (single-module mode) on 1 binding file(s)
      [INFO] 
      [INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ ota-common ---
      [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
      [INFO] Copying 0 resource
      [INFO] 
      [INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ ota-common ---
      [INFO] Nothing to compile - all classes are up to date
      [INFO] 
      [INFO] --- maven-surefire-plugin:2.7.2:test (default-test) @ ota-common ---
      [INFO] Surefire report directory: /media/data/Practice/Maven_Multi_Module/parent/ota-module/ota-common/target/surefire-reports
  
      -------------------------------------------------------
       T E S T S
      -------------------------------------------------------
      There are no tests to run.
  
      Results :
  
      Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
  
      [INFO] 
      [INFO] --- maven-jar-plugin:2.3.1:jar (default-jar) @ ota-common ---
      [INFO] Building jar: /media/data/Practice/Maven_Multi_Module/parent/ota-module/ota-common/target/ota-common-0.0.1-SNAPSHOT.jar
      [INFO] META-INF/maven/com.poc.multimodule/ota-common/pom.xml already added, skipping
      [INFO] META-INF/maven/com.poc.multimodule/ota-common/pom.properties already added, skipping
      [INFO] 
      [INFO] --- maven-install-plugin:2.3.1:install (default-install) @ ota-common ---
      [INFO] Installing /media/data/Practice/Maven_Multi_Module/parent/ota-module/ota-common/target/ota-common-0.0.1-SNAPSHOT.jar to /media/data/Env/Local_Maven_Repository/com/poc/multimodule/ota-common/0.0.1-SNAPSHOT/ota-common-0.0.1-SNAPSHOT.jar
      [INFO] Installing /media/data/Practice/Maven_Multi_Module/parent/ota-module/ota-common/pom.xml to /media/data/Env/Local_Maven_Repository/com/poc/multimodule/ota-common/0.0.1-SNAPSHOT/ota-common-0.0.1-SNAPSHOT.pom
      [INFO]                                                                         
      [INFO] ------------------------------------------------------------------------
      [INFO] Building OTA Multi Module VehAvailRate Project 0.0.1-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      [INFO] 
      [INFO] --- jibx-maven-plugin:1.2.3:schema-codegen (generate-java-code-from-schema) @ ota-veh-avail-rate ---
      [INFO] Generating Java sources in /media/data/Practice/Maven_Multi_Module/parent/ota-module/ota-veh-avail-rate/src/main/java from schemas available in /media/data/Practice/Maven_Multi_Module/parent/ota-module/ota-veh-avail-rate/src/main/resources/schemas/OTA2003B/VehAvailRate...
      Loaded and validated 2 specified schema(s) and 4 referenced schema(s)
      Generated 6 top-level classes (plus 4 inner classes) in package com.poc.multimodule.ota.vehavailrate
      Total top-level classes in model: 6
      Total classes (including inner classes) in model: 10
      [INFO] 
      [INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ ota-veh-avail-rate ---
      [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
      [INFO] Copying 3 resources
      [INFO] 
      [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ ota-veh-avail-rate ---
      [WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
      [INFO] Compiling 6 source files to /media/data/Practice/Maven_Multi_Module/parent/ota-module/ota-veh-avail-rate/target/classes
      [INFO] 
      [INFO] --- jibx-maven-plugin:1.2.3:bind (compile-jibx-binding) @ ota-veh-avail-rate ---
      [INFO] Running JiBX binding compiler (restricted multi-module mode) on 1 binding file(s)
      [INFO] ------------------------------------------------------------------------
      [INFO] Reactor Summary:
      [INFO] 
      [INFO] MultiModule Parent Project ........................ SUCCESS [0.325s]
      [INFO] MultiModule OTA Parent Project .................... SUCCESS [0.006s]
      [INFO] Multi Module OTA Common Project ................... SUCCESS [7.079s]
      [INFO] OTA Multi Module VehAvailRate Project ............. FAILURE [0.964s]
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 8.489s
      [INFO] Finished at: Tue Sep 27 16:54:14 IST 2011
      [INFO] Final Memory: 28M/195M
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.jibx:jibx-maven-plugin:1.2.3:bind (compile-jibx-binding) on project ota-veh-avail-rate: Internal error - cannot modify class com.poc.multimodule.ota.common.ActionType loaded from /media/data/Practice/Maven_Multi_Module/parent/ota-module/ota-common/target/classes -&gt; [Help 1]
      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jibx:jibx-maven-plugin:1.2.3:bind (compile-jibx-binding) on project ota-veh-avail-rate: Internal error - cannot modify class com.poc.multimodule.ota.common.ActionType loaded from /media/data/Practice/Maven_Multi_Module/parent/ota-module/ota-common/target/classes
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
          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:319)
          at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
          at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
          at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
          at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
          at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
          at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
      Caused by: org.apache.maven.plugin.MojoExecutionException: Internal error - cannot modify class com.poc.multimodule.ota.common.ActionType loaded from /media/data/Practice/Maven_Multi_Module/parent/ota-module/ota-common/target/classes
          at org.jibx.maven.AbstractBaseBindingMojo.compile(AbstractBaseBindingMojo.java:166)
          at org.jibx.maven.AbstractBaseBindingMojo.execute(AbstractBaseBindingMojo.java:133)
          at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
          ... 19 more
      Caused by: java.lang.IllegalStateException: Internal error - cannot modify class com.poc.multimodule.ota.common.ActionType loaded from /media/data/Practice/Maven_Multi_Module/parent/ota-module/ota-common/target/classes
          at org.jibx.binding.classes.ClassFile.getClassGen(ClassFile.java:1286)
          at org.jibx.binding.classes.ClassFile.removeMethod(ClassFile.java:1339)
          at org.jibx.binding.classes.ExistingMethod.delete(ExistingMethod.java:144)
          at org.jibx.binding.classes.MungedClass.purgeUnusedMethods(MungedClass.java:151)
          at org.jibx.binding.classes.MungedClass.fixDispositions(MungedClass.java:381)
          at org.jibx.binding.Compile.compile(Compile.java:237)
          at org.jibx.maven.AbstractBaseBindingMojo.compile(AbstractBaseBindingMojo.java:163)
          ... 22 more
      [ERROR] 
      [ERROR] Re-run Maven using the -X switch to enable full debug logging.
      [ERROR] 
      [ERROR] For more information about the errors and possible solutions, please read the following articles:
      [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
      [ERROR] 
      [ERROR] After correcting the problems, you can resume the build with the command
      [ERROR]   mvn &lt;goals&gt; -rf :ota-veh-avail-rate
  </code></pre>
  
  <p><strong>Error Cause:</strong>   </p>
  
  <pre><code>Caused by: java.lang.IllegalStateException: Internal error - cannot modify class com.poc.multimodule.ota.common.ActionType loaded from /media/data/Practice/Maven_Multi_Module/parent/ota-module/ota-common/target/classes
              at org.jibx.binding.classes.ClassFile.getClassGen(ClassFile.java:1286)
              at org.jibx.binding.classes.ClassFile.removeMethod(ClassFile.java:1339)
              at org.jibx.binding.classes.ExistingMethod.delete(ExistingMethod.java:144)
              at org.jibx.binding.classes.MungedClass.purgeUnusedMethods(MungedClass.java:151)
              at org.jibx.binding.classes.MungedClass.fixDispositions(MungedClass.java:381)
              at org.jibx.binding.Compile.compile(Compile.java:237)
              at org.jibx.maven.AbstractBaseBindingMojo.compile(AbstractBaseBindingMojo.java:163)
              ... 22 more
  </code></pre>
  
  <p><strong>com.poc.multimodule.ota.common.ActionType</strong> is a type generated by ota-common module and is there in generated <em>base-binding.xml</em> I am using.It is part of the schema OTA_SimpleTypes.xsd</p>
  
  <p><em>ActionType</em> definition in schema file</p>
  
  <pre><code>&lt;xs:simpleType name="ActionType"&gt;
      &lt;xs:restriction base="xs:string"&gt;
          &lt;xs:enumeration value="Add-Update"/&gt;
          &lt;xs:enumeration value="Cancel"/&gt;
          &lt;xs:enumeration value="Delete"/&gt;
      &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  </code></pre>
  
  <p>What is causing this java.lang.IllegalStateException: Internal error - cannot modify class and how to resolve this?</p>
  
  <p>Thanks,<br>
  Jignesh</p>