org.apache.maven.lifecycle.LifecycleExecutionException: Error executing ant tasks

Hibernate JIRA | Brill Pappin | 10 years ago
  1. 0

    I have a reasonably complex maven 2 build with multiple projects. More than one of the projects uses the hbm2java task and at least one of the projects uses the Codehaus xslt-maven-plugin. When running the project that uses both hbm2java and XSLT, it works fine. But running the master build throws the following error. org.apache.maven.lifecycle.LifecycleExecutionException: Error executing ant tasks at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559) [snip] Caused by: java.lang.IllegalStateException: 3.1.0.beta4 found when setting version at org.hibernate.tool.hbm2x.TemplateHelper.putInContext(TemplateHelper.java:223) [snip] I can't really explain where this error is coming from. I looked at the source for putInContext and it is using the Plexus options class and failing because the value of "version" is already in the options. I assumed from this it was a problem with the xstl-maven-plugin from Codehaus also using some Plexus libraries, but I refactored the mojo so it was ONLY using javax.xml.transform and the problem remained. I then changed my slimmed down mojo to force use of Saxon instead of the default JAXP implementation (Xalan?). .. and it worked fine! So this is definitely a problem with the instantiation of the default XSLT functionality in JDK1.4, although how that can possibly affect the build in this way is beyond me. You might consider this a Maven bug but it's very strange that it doesn't happen for any old mojo combination. I also think it is probably much easier to fix in Hibernate tools than in Maven. I'd suggest a couple of possible fixes/improvements: - Make "version" key more specific, eg. hibernate.tools.version to avoid possible clash with other Plexus clients in the same JVM - Don't throw an exception on any existing value being set as it is now but compare the value in the options to the new value and only throw an exception if they differ I can't think of a way to track down the underlying cause of this issue. It's a very odd one. Attached is a simple three project build to reproduce the problem. Just run 'mvn clean package' on the parent project to reproduce.

    Hibernate JIRA | 1 decade ago | Alfie Kirkpatrick
    org.apache.maven.lifecycle.LifecycleExecutionException: Error executing ant tasks
  2. 0

    I have a reasonably complex maven 2 build with multiple projects. More than one of the projects uses the hbm2java task and at least one of the projects uses the Codehaus xslt-maven-plugin. When running the project that uses both hbm2java and XSLT, it works fine. But running the master build throws the following error. org.apache.maven.lifecycle.LifecycleExecutionException: Error executing ant tasks at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559) [snip] Caused by: java.lang.IllegalStateException: 3.1.0.beta4 found when setting version at org.hibernate.tool.hbm2x.TemplateHelper.putInContext(TemplateHelper.java:223) [snip] I can't really explain where this error is coming from. I looked at the source for putInContext and it is using the Plexus options class and failing because the value of "version" is already in the options. I assumed from this it was a problem with the xstl-maven-plugin from Codehaus also using some Plexus libraries, but I refactored the mojo so it was ONLY using javax.xml.transform and the problem remained. I then changed my slimmed down mojo to force use of Saxon instead of the default JAXP implementation (Xalan?). .. and it worked fine! So this is definitely a problem with the instantiation of the default XSLT functionality in JDK1.4, although how that can possibly affect the build in this way is beyond me. You might consider this a Maven bug but it's very strange that it doesn't happen for any old mojo combination. I also think it is probably much easier to fix in Hibernate tools than in Maven. I'd suggest a couple of possible fixes/improvements: - Make "version" key more specific, eg. hibernate.tools.version to avoid possible clash with other Plexus clients in the same JVM - Don't throw an exception on any existing value being set as it is now but compare the value in the options to the new value and only throw an exception if they differ I can't think of a way to track down the underlying cause of this issue. It's a very odd one. Attached is a simple three project build to reproduce the problem. Just run 'mvn clean package' on the parent project to reproduce.

    Hibernate JIRA | 10 years ago | Brill Pappin
    org.apache.maven.lifecycle.LifecycleExecutionException: Error executing ant tasks
  3. 0

    Neo4j - java.lang.IllegalStateException: Cannot apply update with given version 186300 when base version is 186300

    Stack Overflow | 2 weeks ago | Dawolf
    org.neo4j.graphdb.TransactionFailureException: Transaction was marked as successful, but unable to commit transaction so rolled back.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    GitHub comment 253#144479324

    GitHub | 1 year ago | sschaef
    java.lang.IllegalStateException: Cannot find template processing for Play version: version not found.
  6. 0

    GitHub comment 253#144638431

    GitHub | 1 year ago | wpopielarski
    java.lang.IllegalStateException: Cannot find template processing for Play version: version not found.

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalStateException

      3.1.0.beta4 found when setting version

      at org.hibernate.tool.hbm2x.TemplateHelper.putInContext()
    2. Hibernate Tools
      TemplateHelper.putInContext
      1. org.hibernate.tool.hbm2x.TemplateHelper.putInContext(TemplateHelper.java:223)[snip]
      1 frame