title: InvocationTargetException: Plugin (Bundle) "org.datanucleus" is already registered
body: <p>I am trying to follow the DataNucleus <a href="http://www.datanucleus.org/products/accessplatform_3_0/guides/jdo/tutorial.html" rel="nofollow">tutorial</a> for JDO. I am using Maven and I have followed the instructions available <a href="http://www.datanucleus.org/products/accessplatform_3_0/enhancer.html#maven2" rel="nofollow">here</a> for the enhancer.</p>
  
  <p>However, I am getting the following error:</p>
  
  <pre><code>[datanucleus:enhance]
  Could not transfer metadata asm:asm/maven-metadata.xml from/to local.repository (file:../../local.repository/trunk): No connector available to access repository local.repository (file:../../local.repository/trunk) of type legacy using the available factories WagonRepositoryConnectorFactory
    CP: C:\... \.m2\repository\org\datanucleus\maven-datanucleus-plugin\3.0.0-release\maven-datanucleus-plugin-3.0.0-release.jar
    CP: C:\... \.m2\repository\org\datanucleus\datanucleus-core\3.0.2\datanucleus-core-3.0.2.jar
    CP: C:\... \.m2\repository\org\datanucleus\datanucleus-enhancer\3.0.0-release\datanucleus-enhancer-3.0.0-release.jar
    CP: C:\... \.m2\repository\javax\jdo\jdo-api\3.1-SNAPSHOT-20110926\jdo-api-3.1-SNAPSHOT-20110926.jar
    CP: C:\... \.m2\repository\javax\transaction\transaction-api\1.1\transaction-api-1.1.jar
    CP: C:\... \.m2\repository\org\apache\geronimo\specs\geronimo-jpa_2.0_spec\1.0\geronimo-jpa_2.0_spec-1.0.jar
    CP: C:\... \.m2\repository\asm\asm\3.3.1\asm-3.3.1.jar
    CP: C:\... \.m2\repository\org\codehaus\plexus\plexus-utils\1.2\plexus-utils-1.2.jar
    CP: C:\... \.m2\repository\junit\junit\3.8.1\junit-3.8.1.jar
    CP: C:\... \trunk\plasma\target\classes
    CP: C:\... \.m2\repository\net\dwst\generics\1.2.0\generics-1.2.0.jar
    CP: C:\... \.m2\repository\org\swinglabs\swing-layout\1.0.3\swing-layout-1.0.3.jar
    CP: C:\... \.m2\repository\org\apache\maven\maven-plugin-api\2.0.8\maven-plugin-api-2.0.8.jar
    CP: C:\... \.m2\repository\org\apache\maven\maven-project\2.0.8\maven-project-2.0.8.jar
    CP: C:\... \.m2\repository\org\apache\maven\maven-settings\2.0.8\maven-settings-2.0.8.jar
    CP: C:\... \.m2\repository\org\apache\maven\maven-profile\2.0.8\maven-profile-2.0.8.jar
    CP: C:\... \.m2\repository\org\apache\maven\maven-model\2.0.8\maven-model-2.0.8.jar
    CP: C:\... \.m2\repository\org\apache\maven\maven-artifact-manager\2.0.8\maven-artifact-manager-2.0.8.jar
    CP: C:\... \.m2\repository\org\apache\maven\maven-repository-metadata\2.0.8\maven-repository-metadata-2.0.8.jar
    CP: C:\... \.m2\repository\org\apache\maven\wagon\wagon-provider-api\1.0-beta-2\wagon-provider-api-1.0-beta-2.jar
    CP: C:\... \.m2\repository\org\apache\maven\maven-plugin-registry\2.0.8\maven-plugin-registry-2.0.8.jar
    CP: C:\... \.m2\repository\org\apache\maven\maven-artifact\2.0.8\maven-artifact-2.0.8.jar
    CP: C:\... \.m2\repository\org\codehaus\plexus\plexus-container-default\1.0-alpha-9-stable-1\plexus-container-default-1.0-alpha-9-stable-1.jar
    CP: C:\... \.m2\repository\classworlds\classworlds\1.1-alpha-2\classworlds-1.1-alpha-2.jar
    CP: C:\... \.m2\repository\org\codehaus\plexus\plexus-utils\1.4.5\plexus-utils-1.4.5.jar
    CP: C:\... \.m2\repository\com\h2database\h2\1.3.158\h2-1.3.158.jar
    CP: C:\... \.m2\repository\org\jboss\netty\netty\3.2.4.Final\netty-3.2.4.Final.jar
    CP: C:\... \.m2\repository\org\apache\commons\commons-math\2.2\commons-math-2.2.jar
    CP: C:\... \.m2\repository\net\flat\flat\1.2.0\flat-1.2.0.jar
    CP: C:\... \.m2\repository\com\pyx4me\proguard-maven-plugin\2.0.4\proguard-maven-plugin-2.0.4.jar
    CP: C:\... \.m2\repository\ant\ant\1.6.5\ant-1.6.5.jar
    CP: C:\... \.m2\repository\org\apache\maven\maven-archiver\2.3\maven-archiver-2.3.jar
    CP: C:\... \.m2\repository\org\codehaus\plexus\plexus-archiver\1.0-alpha-9\plexus-archiver-1.0-alpha-9.jar
    CP: C:\... \.m2\repository\org\codehaus\plexus\plexus-io\1.0-alpha-1\plexus-io-1.0-alpha-1.jar
    CP: C:\... \.m2\repository\com\sun\codemodel\codemodel\2.4\codemodel-2.4.jar
    CP: C:\... \.m2\repository\org\datanucleus\datanucleus-core\3.0.0-release\datanucleus-core-3.0.0-release.jar
    CP: C:\... \.m2\repository\org\datanucleus\datanucleus-api-jdo\3.0.0-release\datanucleus-api-jdo-3.0.0-release.jar
    CP: C:\... \.m2\repository\org\datanucleus\datanucleus-rdbms\3.0.0-release\datanucleus-rdbms-3.0.0-release.jar
    CP: C:\... \.m2\repository\javax\jdo\jdo-api\3.0\jdo-api-3.0.jar
  07-oct.-2011 18:01:05 org.datanucleus.enhancer.DataNucleusEnhancer &lt;init&gt;
  INFO: DataNucleus Enhancer : Using ClassEnhancer "ASM" for API "JDO"
  ------------------------------------------------------------------------
  BUILD FAILURE
  ------------------------------------------------------------------------
  Total time: 8.475s
  Finished at: Fri Oct 07 18:01:05 CEST 2011
  Final Memory: 12M/29M
  ------------------------------------------------------------------------
  Failed to execute goal org.datanucleus:maven-datanucleus-plugin:3.0.0-release:enhance (default) on project plasma:
  Error executing enhancer: InvocationTargetException: Plugin (Bundle) "org.datanucleus" is already registered.
  Ensure you dont have multiple JAR versions of the same plugin in the classpath.
  The URL "file:/C:/... /.m2/repository/org/datanucleus/datanucleus-core/3.0.2/datanucleus-core-3.0.2.jar" is already registered,
  and you are trying to register an identical plugin located at URL "file:/C:/... /.m2/repository/org/datanucleus/datanucleus-core/3.0.0-release/datanucleus-core-3.0.0-release.jar." -&gt; [Help 1]
  </code></pre>
  
  <p>Does anyone know how can I solve this one? What is the proper <code>pom.xml</code> configuration to make this tutorial work with release <code>3.0.0-release</code>?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Here is my <code>pom.xml</code>:</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;groupId&gt;net.dwst&lt;/groupId&gt;
      &lt;artifactId&gt;datanucleus&lt;/artifactId&gt;
      &lt;version&gt;1.0.0&lt;/version&gt;
  
      &lt;name&gt;DataNucleus 1.0.0&lt;/name&gt;
      &lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;project.build.source&gt;1.6&lt;/project.build.source&gt;
          &lt;project.build.target&gt;1.6&lt;/project.build.target&gt;
      &lt;/properties&gt;
  
      &lt;build&gt;
  
          &lt;finalName&gt;DataNucleus&lt;/finalName&gt;
  
          &lt;resources&gt;
              &lt;resource&gt;
                  &lt;directory&gt;src/main/resources&lt;/directory&gt;
                  &lt;filtering&gt;true&lt;/filtering&gt;
              &lt;/resource&gt;
          &lt;/resources&gt;        
  
          &lt;plugins&gt;
  
              &lt;!-- Source code target JDK version &amp; encoding --&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;${project.build.source}&lt;/source&gt;
                      &lt;target&gt;${project.build.target}&lt;/target&gt;
                      &lt;encoding&gt;${project.build.sourceEncoding}&lt;/encoding&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
  
              &lt;plugin&gt;
                  &lt;groupId&gt;org.datanucleus&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-datanucleus-plugin&lt;/artifactId&gt;
                  &lt;version&gt;3.0.0-release&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;log4jConfiguration&gt;${basedir}/log4j.properties&lt;/log4jConfiguration&gt;
                      &lt;verbose&gt;true&lt;/verbose&gt;
                      &lt;fork&gt;false&lt;/fork&gt;
                      &lt;!-- props&gt;${basedir}/datanucleus.properties&lt;/props --&gt;
                  &lt;/configuration&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;phase&gt;process-classes&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;enhance&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
  
          &lt;/plugins&gt;
  
      &lt;/build&gt;
  
      &lt;dependencies&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;junit&lt;/groupId&gt;
              &lt;artifactId&gt;junit&lt;/artifactId&gt;
              &lt;version&gt;4.8.2&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.datanucleus&lt;/groupId&gt;
              &lt;artifactId&gt;datanucleus-core&lt;/artifactId&gt;
              &lt;version&gt;3.0.0-release&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.datanucleus&lt;/groupId&gt;
              &lt;artifactId&gt;datanucleus-api-jdo&lt;/artifactId&gt;
              &lt;version&gt;3.0.0-release&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.datanucleus&lt;/groupId&gt;
              &lt;artifactId&gt;datanucleus-rdbms&lt;/artifactId&gt;
              &lt;version&gt;3.0.0-release&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.datanucleus&lt;/groupId&gt;
              &lt;artifactId&gt;maven-datanucleus-plugin&lt;/artifactId&gt;
              &lt;version&gt;3.0.0-release&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;javax.jdo&lt;/groupId&gt;
              &lt;artifactId&gt;jdo-api&lt;/artifactId&gt;
              &lt;version&gt;3.0&lt;/version&gt;
          &lt;/dependency&gt;        
  
      &lt;/dependencies&gt;
  
  &lt;/project&gt;
  </code></pre>