4 Replies Latest reply on Sep 27, 2012 7:17 PM by Anton Nikulin

    MojoExecutionException with mvn clean install

    Anton Nikulin Newbie

      Can you help me, please?
      I have a SwitchYard project in Eclipse, and there are no error there. However when I try to invoke mvn clean install command (either from eclipse or from console) I have such exception:

       

       

      [ERROR] Failed to execute goal org.switchyard:switchyard-plugin:0.6.0-SNAPSHOT:configure (default) on project order-service: org.apache.crimson.tree.XmlDocument.normalizeDocument()V -> [Help 1]

      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.switchyard:switchyard-plugin:0.6.0-SNAPSHOT:configure (default) on project order-service: org.apache.crimson.tree.XmlDocument.normalizeDocument()V

                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:320)

                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: org.apache.crimson.tree.XmlDocument.normalizeDocument()V

                at org.switchyard.tools.maven.plugins.switchyard.ConfigureMojo.execute(ConfigureMojo.java:199)

                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.AbstractMethodError: org.apache.crimson.tree.XmlDocument.normalizeDocument()V

                at org.switchyard.common.io.pull.ElementPuller.pull(ElementPuller.java:98)

                at org.switchyard.common.io.pull.ElementPuller.pull(ElementPuller.java:87)

                at org.switchyard.common.io.pull.ElementPuller.pull(ElementPuller.java:73)

                at org.switchyard.common.io.pull.ElementPuller.pull(ElementPuller.java:58)

                at org.switchyard.common.io.pull.ElementPuller.pull(ElementPuller.java:152)

                at org.switchyard.config.DOMConfiguration.<init>(DOMConfiguration.java:79)

                at org.switchyard.config.ConfigurationPuller.pull(ConfigurationPuller.java:105)

                at org.switchyard.config.model.BaseModel.<init>(BaseModel.java:47)

                at org.switchyard.config.model.BaseNamedModel.<init>(BaseNamedModel.java:39)

                at org.switchyard.config.model.switchyard.v1.V1SwitchYardModel.<init>(V1SwitchYardModel.java:50)

                at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

                at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

                at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

                at java.lang.reflect.Constructor.newInstance(Constructor.java:513)

                at java.lang.Class.newInstance0(Class.java:355)

                at java.lang.Class.newInstance(Class.java:308)

                at org.switchyard.config.model.MergeScanner.scan(MergeScanner.java:84)

                at org.switchyard.tools.maven.plugins.switchyard.ConfigureMojo.execute(ConfigureMojo.java:177)xml

       

      my pom.xml:

      <project

                xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"

                xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

                <modelVersion>4.0.0</modelVersion>

                <groupId>com.example.switchyard</groupId>

                <artifactId>order-service</artifactId>

                <version>0.0.1-SNAPSHOT</version>

                <name>com.example.switchyard:order-service</name>

                <properties>

                          <switchyard.version>0.6.0-SNAPSHOT</switchyard.version>

                          <hornet-version>2.2.5.Final</hornet-version>

                </properties>

                <dependencies>

                          <dependency>

                                    <groupId>org.switchyard.components</groupId>

                                    <artifactId>switchyard-component-bean</artifactId>

                                    <version>${switchyard.version}</version>

                          </dependency>

                          <dependency>

                                    <groupId>org.switchyard</groupId>

                                    <artifactId>switchyard-api</artifactId>

                                    <version>${switchyard.version}</version>

                          </dependency>

                          <dependency>

                                    <groupId>org.switchyard</groupId>

                                    <artifactId>switchyard-transform</artifactId>

                                    <version>${switchyard.version}</version>

                          </dependency>

                          <dependency>

                                    <groupId>org.switchyard</groupId>

                                    <artifactId>switchyard-validate</artifactId>

                                    <version>${switchyard.version}</version>

                          </dependency>

                          <dependency>

                                    <groupId>org.switchyard</groupId>

                                    <artifactId>switchyard-plugin</artifactId>

                                    <version>${switchyard.version}</version>

                          </dependency>

                          <dependency>

                                    <groupId>org.switchyard</groupId>

                                    <artifactId>switchyard-test</artifactId>

                                    <version>${switchyard.version}</version>

                          </dependency>

                          <dependency>

                                    <groupId>org.switchyard.components</groupId>

                                    <artifactId>switchyard-component-hornetq</artifactId>

                                    <version>${switchyard.version}</version>

                          </dependency>

                          <dependency>

                                    <groupId>javax.jms</groupId>

                                    <artifactId>jms-api</artifactId>

                                    <version>1.1-rev-1</version>

                          </dependency>

                          <dependency>

                                    <groupId>org.switchyard.components</groupId>

                                    <artifactId>switchyard-component-soap</artifactId>

                                    <version>${switchyard.version}</version>

                          </dependency>

                          <dependency>

                                    <groupId>org.switchyard.components</groupId>

                                    <artifactId>switchyard-component-camel</artifactId>

                                    <version>${switchyard.version}</version>

                          </dependency>

                          <dependency>

                                    <groupId>org.switchyard.components</groupId>

                                    <artifactId>switchyard-component-camel-cdi</artifactId>

                                    <version>${switchyard.version}</version>

                                    <scope>test</scope>

                          </dependency>

                          <dependency>

                                    <groupId>com.magick</groupId>

                                    <artifactId>magick-model</artifactId>

                                    <version>1.0</version>

                          </dependency>

                </dependencies>

                <repositories>

                          <repository>

                                    <id>jboss-public-repository</id>

                                    <name>JBoss Public Maven Repository</name>

                                    <url>http://repository.jboss.org/nexus/content/groups/public</url>

                          </repository>

                </repositories>

                <pluginRepositories>

                          <pluginRepository>

                                    <id>jboss-public-repository</id>

                                    <name>JBoss Public Maven Repository</name>

                                    <url>http://repository.jboss.org/nexus/content/groups/public</url>

                          </pluginRepository>

                </pluginRepositories>

                <build>

                          <plugins>

                                    <plugin>

                                              <groupId>org.switchyard</groupId>

                                              <artifactId>switchyard-plugin</artifactId>

                                              <version>${switchyard.version}</version>

                                              <executions>

                                                        <execution>

                                                                  <goals>

                                                                            <goal>configure</goal>

                                                                  </goals>

                                                        </execution>

                                              </executions>

                                              <configuration>

                                                        <archive>

                                                                  <manifestEntries>

                                                                            <Dependencies>com.magick.models</Dependencies>

                                                                  </manifestEntries>

                                                        </archive>

                                                        <scannerClassNames>

                                                                  <param>org.switchyard.transform.config.model.TransformSwitchYardScanner</param>

                                                        </scannerClassNames>

                                              </configuration>

                                    </plugin>

                                    <plugin>

                                              <artifactId>maven-compiler-plugin</artifactId>

                                              <version>2.3.2</version>

                                              <configuration>

                                                        <source>1.6</source>

                                                        <target>1.6</target>

                                                        <debug>true</debug>

                                                        <showWarnings>true</showWarnings>

                                                        <showDeprecation>true</showDeprecation>

                                              </configuration>

                                    </plugin>

                          </plugins>

                </build>

      </project>

       

      Thanks.

        • 1. Re: MojoExecutionException with mvn clean install
          Keith Babo Master

          It looks like Apache Crimson is leaking into your class path somehow.  What do the dependencies look like for com.magick:magick-model?

          • 2. Re: MojoExecutionException with mvn clean install
            Anton Nikulin Newbie

            Yes, there is crimson in magick-model dependencies.

             

            the dependencies for com.magick:magick-model:

            <dependencies>

                <dependency>

                  <groupId>junit</groupId>

                  <artifactId>junit</artifactId>

                  <version>3.8.1</version>

                  <scope>test</scope>

                </dependency>

               

                <!-- JFX RELATED -->

                   

                    <dependency>

                        <groupId>crimson</groupId>

                        <artifactId>crimson</artifactId>

                        <version>1.1.3</version>

                    </dependency>

                   

                    <dependency>

                        <groupId>jfx</groupId>

                        <artifactId>jfx</artifactId>

                        <version>1.5.8</version>

                    </dependency>

                       

                    <dependency>

                        <groupId>mx4j</groupId>

                        <artifactId>mx4j</artifactId>

                        <version>3.0.2</version>

                    </dependency>

                    

                    <dependency>

                        <groupId>mx4j</groupId>

                        <artifactId>mx4j-tools</artifactId>

                        <version>3.0.1</version>

                    </dependency>

             

             

                    <dependency>

                              <groupId>xerces</groupId>

                              <artifactId>xerces</artifactId>

                              <version>2.4.0</version>

                    </dependency>

              </dependencies>




            • 3. Re: MojoExecutionException with mvn clean install
              Keith Babo Master

              So that needs to go away or be ignored via a dependency exclusion in your SY application pom.xml.