Details

    • Type: Bug Fix Bug Fix
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.2
    • Fix Version/s: 2.4
    • Component/s: Database
    • Security Level: Public (Public: Anyone can view)
    • Labels:
      None
    • Similar issues:
      KULRICE-10742Failed to execute goal org.kuali.maven.plugins:sql-maven-plugin:
      KULRICE-4804maven no longer executing tests for empty packages
      KULRICE-9296Fix maven smoke test execution
      KULRICE-1473Switch from the Maven Assembly plugin to the Ant maven plugin for packaging tasks
      KULRICE-10970KD 2013 Install Fest Prep: Create Rice DB SQL script
      KULRICE-3675Execute final packaging and deployment of Rice 1.0.1
      KULRICE-1248Execution of ActionInvocationProcessor oftentimes results in a proxy creation exception
      KULRICE-8997Maven timeout of access to nexus.kuali.org reposistory
      KULRICE-4535Extract travel "sample app" out into it's own maven module
      KULRICE-8499Rice version is wrong in installation guide documentation for maven archetype (section 5, maven cli)
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required
    • Code Review Status:
      Not Required
    • Include in Release Notes?:
      Yes

      Description

      Attempting to run impex from trunk, or 'mvn clean install' from db/sql, I encountered the error below.

      [ERROR] Failed to execute goal org.kuali.maven.plugins:spring-maven-plugin:2.0.14:load (project-metainf) on project rice-sql: Execution project-metainf of goal org.kuali.maven.plugins:spring-maven-plugin:2.0.14:loa
      d failed: Error creating bean with name 'executable' defined in class org.kuali.maven.plugins.spring.config.MojoConfig: Invocation of init method failed; nested exception is java.lang.IllegalStateException: java.la
      ng.reflect.InvocationTargetException: Error creating bean with name 'storePropertiesExecutablesExectuable' defined in class org.kuali.common.util.spring.MetaInfProjectPropertiesConfig: Invocation of init method fai
      led; nested exception is java.lang.NoSuchMethodError: org.apache.commons.io.FileUtils.write(Ljava/io/File;Ljava/lang/CharSequence;Ljava/lang/String;)V -> [Help 1]
      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.kuali.maven.plugins:spring-maven-plugin:2.0.14:load (project-metainf) on project rice-sql: Execution project-metainf of goal org.kuali.maven.plugins:spring-maven-plugin:2.0.14:load failed: Error creating bean with name 'executable' defined in class org.kuali.maven.plugins.spring.config.MojoConfig: Invocation of init method failed; nested exception is java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException
              at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225)
              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.PluginExecutionException: Execution project-metainf of goal org.kuali.maven.plugins:spring-maven-plugin:2.0.14:load failed: Error creating bean with name 'executable' defined in c
      lass org.kuali.maven.plugins.spring.config.MojoConfig: Invocation of init method failed; nested exception is java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException
              at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
              at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
              ... 19 more
      Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'executable' defined in class org.kuali.maven.plugins.spring.config.MojoConfig: Invocation of init method failed; ne
      sted exception is java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1486)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
              at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
              at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
              at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
              at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
              at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:607)
              at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
              at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
              at org.kuali.common.util.spring.SpringUtils.refreshQuietly(SpringUtils.java:424)
              at org.kuali.common.util.service.DefaultSpringService.load(DefaultSpringService.java:152)
              at org.kuali.maven.plugins.spring.DefaultSpringMojoService.loadSpring(DefaultSpringMojoService.java:71)
              at org.kuali.maven.plugins.spring.AbstractSpringMojo.execute(AbstractSpringMojo.java:118)
              at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
              ... 20 more
      Caused by: java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException
      
              at org.kuali.maven.plugins.spring.MojoExecutable.invoke(MojoExecutable.java:41)
              at org.kuali.maven.plugins.spring.MojoExecutable.execute(MojoExecutable.java:28)
              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.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1612)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1553)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1483)
              ... 34 more
      Caused by: java.lang.reflect.InvocationTargetException
              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.springframework.util.MethodInvoker.invoke(MethodInvoker.java:273)
              at org.kuali.maven.plugins.spring.MojoExecutable.invoke(MojoExecutable.java:35)
              ... 42 more
      Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'storePropertiesExecutablesExectuable' defined in class org.kuali.common.util.spring.MetaInfProjectPropertiesConfig: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.apache.commons.io.FileUtils.write(Ljava/io/File;Ljava/lang/CharSequence;Ljava/lang/String;)V
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1486)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
              at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
              at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
              at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
              at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
              at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:607)
              at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
              at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
              at org.kuali.common.util.spring.SpringUtils.refreshQuietly(SpringUtils.java:424)
              at org.kuali.common.util.service.DefaultSpringService.load(DefaultSpringService.java:152)
              at org.kuali.maven.plugins.spring.DefaultSpringMojoService.mojoCallback(DefaultSpringMojoService.java:116)
              ... 48 more
      Caused by: java.lang.NoSuchMethodError: org.apache.commons.io.FileUtils.write(Ljava/io/File;Ljava/lang/CharSequence;Ljava/lang/String;)V
              at org.kuali.common.util.execute.StoreRicePropertiesExecutable.store(StoreRicePropertiesExecutable.java:31)
              at org.kuali.common.util.execute.StorePropertiesExecutable.execute(StorePropertiesExecutable.java:62)
              at org.kuali.common.util.execute.ExecutablesExecutable.execute(ExecutablesExecutable.java:54)
              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.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod
      
      
      (AbstractAutowireCapableBeanFactory.java:1612)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1553)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1483)
              ... 60 more
      

      This is on Windows 8, Java 6u45, Maven 3.0.5, Rice trunk.

      This is caused by spring-maven-plugin depending on an old version of commons-io, inherited from an old version of kuali-maven. Newer versions of kuali-maven point at a viable commons-io, but there doesn't appear to be a newer version of spring-maven-plugin.

      I have worked around the error as follows:

      1. Check out https://svn.kuali.org/repos/foundation/tags/spring-maven-plugin-2.0.14
      2. Apply:
        Index: pom.xml
        ===================================================================
        --- pom.xml     (revision 23578)
        +++ pom.xml     (working copy)
        @@ -21,7 +21,7 @@
           <parent>
             <groupId>org.kuali.pom</groupId>
             <artifactId>kuali-maven</artifactId>
        -    <version>3.0.8</version>
        +    <version>3.3.3</version>
           </parent>
           <groupId>org.kuali.maven.plugins</groupId>
           <artifactId>spring-maven-plugin</artifactId>
        
      3. (cd spring-maven-plugin-2.0.14;mvn clean install)

      Rice compile and impex work as expected after applying this workaround.

        Activity

        Hide
        Jeff Caddel (Inactive) added a comment - - edited
        • As a temporary workaround, adding the property project.metainf.phase=none to the pom for 2.3 prevents this issue from occurring
        • This has been done on the 2.3 branch
        • Longer term, need to bump the pom version from 3.0.x to 3.3.x
        • Jumping major versions like that has the potential to destabilize the automated nightly deployment processes, so it needs to be done in a controlled manner
        Show
        Jeff Caddel (Inactive) added a comment - - edited As a temporary workaround, adding the property project.metainf.phase=none to the pom for 2.3 prevents this issue from occurring This has been done on the 2.3 branch Longer term, need to bump the pom version from 3.0.x to 3.3.x Jumping major versions like that has the potential to destabilize the automated nightly deployment processes, so it needs to be done in a controlled manner
        Hide
        Jeff Caddel (Inactive) added a comment - - edited
        • Adding the XML snippet below to the top level POM is a better temporary fix than setting the property
          project.metainf.phase=none
        • The underlying issue here was permanently fixed beginning with version 3.2.9 of the top level Kuali pom, so the best solution is to be on that version (or later)
        • This snippet is safe to apply immediately (for projects using an older version of the pom), allows metadata to be generated like normal, and avoids the commons-io issue.
          <pluginManagement>
           <plugins>
            ...
             <plugin>
               <groupId>org.kuali.maven.plugins</groupId>
               <artifactId>spring-maven-plugin</artifactId>
               <dependencies>
                <dependency>
                 <groupId>commons-io</groupId>
                 <artifactId>commons-io</artifactId>
                 <version>2.4</version>
                </dependency>
               </dependencies>
              </plugin>
            ...
           <plugins>
          <pluginManagement>
          
        Show
        Jeff Caddel (Inactive) added a comment - - edited Adding the XML snippet below to the top level POM is a better temporary fix than setting the property project.metainf.phase=none The underlying issue here was permanently fixed beginning with version 3.2.9 of the top level Kuali pom, so the best solution is to be on that version (or later) This snippet is safe to apply immediately (for projects using an older version of the pom), allows metadata to be generated like normal, and avoids the commons-io issue. <pluginManagement> <plugins> ... <plugin> <groupId>org.kuali.maven.plugins</groupId> <artifactId>spring-maven-plugin</artifactId> <dependencies> <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> <version>2.4</version> </dependency> </dependencies> </plugin> ... <plugins> <pluginManagement>

          People

          • Assignee:
            Jeff Caddel (Inactive)
            Reporter:
            Mark Fyffe (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Structure Helper Panel