9 Replies Latest reply: Mar 10, 2012 6:56 PM by Davide D'Alto RSS

Seam 3.1.0.Final Booking Example Error

Robert Morse Apprentice

I'm trying to get something going with Seam3 since it appears that Seam2 is dead.   So, I downloaded and upacked seam-3.1.0.Final, as well as JBoss AS7.1.0.Final.

Started up AS7 just fine.   Built the seam booking example using Maven 3.0.4 following the directions in the read me and immediately encountered the error below.

Might help a bit if the examples actually worked.

 

 

[ERROR] Failed to execute goal org.jboss.arquillian.maven:arquillian-maven-plugin:1.0.0.Alpha1:run (default-cli) on project seam-booking: Execution default-cli of goal org.jboss.arquillian.maven:arquillian-maven-plugin:1.0.0.Alpha1:run failed: An API incompatibility was encountered while executing org.jboss.arquillian.maven:arquillian-maven-plugin:1.0.0.Alpha1:run: java.lang.NoSuchMethodError: org.jboss.arquillian.container.spi.Container.getState()Lorg/jboss/arquillian/container/spi/Container$State;

[ERROR] -----------------------------------------------------

[ERROR] realm =    plugin>org.jboss.arquillian.maven:arquillian-maven-plugin:1.0.0.Alpha1

[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy

[ERROR] urls[0] = file:/Users/rmorse/.m2/repository/org/jboss/arquillian/maven/arquillian-maven-plugin/1.0.0.Alpha1/arquillian-maven-plugin-1.0.0.Alpha1.jar

[ERROR] urls[1] = file:/Users/rmorse/.m2/repository/org/sonatype/sisu/sisu-inject-bean/1.4.2/sisu-inject-bean-1.4.2.jar

[ERROR] urls[2] = file:/Users/rmorse/.m2/repository/org/sonatype/sisu/sisu-guice/2.1.7/sisu-guice-2.1.7-noaop.jar

[ERROR] urls[3] = file:/Users/rmorse/.m2/repository/org/sonatype/aether/aether-util/1.7/aether-util-1.7.jar

[ERROR] urls[4] = file:/Users/rmorse/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar

[ERROR] urls[5] = file:/Users/rmorse/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar

[ERROR] urls[6] = file:/Users/rmorse/.m2/repository/org/codehaus/plexus/plexus-utils/2.0.4/plexus-utils-2.0.4.jar

[ERROR] urls[7] = file:/Users/rmorse/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.14/plexus-interpolation-1.14.jar

[ERROR] urls[8] = file:/Users/rmorse/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar

[ERROR] urls[9] = file:/Users/rmorse/.m2/repository/org/jboss/arquillian/core/arquillian-core-api/1.0.0.CR1/arquillian-core-api-1.0.0.CR1.jar

[ERROR] urls[10] = file:/Users/rmorse/.m2/repository/org/jboss/arquillian/core/arquillian-core-spi/1.0.0.CR1/arquillian-core-spi-1.0.0.CR1.jar

[ERROR] urls[11] = file:/Users/rmorse/.m2/repository/org/jboss/arquillian/container/arquillian-container-spi/1.0.0.CR1/arquillian-container-spi-1.0.0.CR1.jar

[ERROR] urls[12] = file:/Users/rmorse/.m2/repository/org/jboss/arquillian/config/arquillian-config-api/1.0.0.CR1/arquillian-config-api-1.0.0.CR1.jar

[ERROR] urls[13] = file:/Users/rmorse/.m2/repository/org/jboss/arquillian/config/arquillian-config-impl-base/1.0.0.CR1/arquillian-config-impl-base-1.0.0.CR1.jar

[ERROR] urls[14] = file:/Users/rmorse/.m2/repository/org/jboss/shrinkwrap/descriptors/shrinkwrap-descriptors-impl/1.0.0-beta-1/shrinkwrap-descriptors-impl-1.0.0-beta-1.jar

[ERROR] urls[15] = file:/Users/rmorse/.m2/repository/org/jboss/shrinkwrap/shrinkwrap-api/1.0.0-beta-3/shrinkwrap-api-1.0.0-beta-3.jar

[ERROR] urls[16] = file:/Users/rmorse/.m2/repository/org/jboss/shrinkwrap/descriptors/shrinkwrap-descriptors-api/1.0.0-beta-1/shrinkwrap-descriptors-api-1.0.0-beta-1.jar

[ERROR] urls[17] = file:/Users/rmorse/.m2/repository/org/jboss/shrinkwrap/shrinkwrap-impl-base/1.0.0-beta-3/shrinkwrap-impl-base-1.0.0-beta-3.jar

[ERROR] urls[18] = file:/Users/rmorse/.m2/repository/org/jboss/shrinkwrap/shrinkwrap-spi/1.0.0-beta-3/shrinkwrap-spi-1.0.0-beta-3.jar

[ERROR] Number of foreign imports: 1

[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]

  • 1. Re: Seam 3.1.0.Final Booking Example Error
    jack wang Newbie

    me too

  • 2. Re: Seam 3.1.0.Final Booking Example Error
    Robert Morse Apprentice

    I tried changing the AS7 version in the parent pom, but this resulted in a ClassNotFoundException

     

    Created:  https://issues.jboss.org/browse/SEAM-134

  • 3. Re: Seam 3.1.0.Final Booking Example Error
    Jason Porter Master

    It looks like the version of Arquillian being used is very old. The current version of Arquillian is CR7. Try changing the version of Arquillian. If that works, please submit a pull request.

  • 4. Re: Seam 3.1.0.Final Booking Example Error
    Robert Morse Apprentice

    I modified seam-parent-19.pom as follows, and it resulted in the same error.

     

      <!-- Arquillian versions -->
      <arquillian.version>1.0.0.CR7</arquillian.version>
      <arquillian.drone.version>1.0.0.CR3</arquillian.drone.version>
      <arquillian.ajocado.version>1.0.0.CR2</arquillian.ajocado.version>
      <arquillian.jacoco.version>1.0.0.Alpha2</arquillian.jacoco.version>
      <arquillian.jboss.version>1.0.0.CR7</arquillian.jboss.version>
      <arquillian.jetty.version>1.0.0.CR7</arquillian.jetty.version>
      <arquillian.tomcat.version>1.0.0.CR7</arquillian.tomcat.version>
      <arquillian.weld.version>1.0.0.CR7</arquillian.weld.version>
      <arquillian.glassfish.version>1.0.0.CR2</arquillian.glassfish.version>
      <arquillian.openwebbeans.version>1.0.0.CR1</arquillian.openwebbeans.version>
      <arquillian.maven.plugin.version>1.0.0.Alpha1</arquillian.maven.plugin.version>
      <arquillian.openshift.express.version>1.0.0.Alpha1</arquillian.openshift.express.version>

     

      <!-- Container versions -->
      <jbossas7.version>7.1.0.Final</jbossas7.version>

     

    The Maven Error is:

     

    [ERROR] Failed to execute goal org.jboss.arquillian.maven:arquillian-maven-plugin:1.0.0.Alpha1:run (default-cli) on project seam-booking: Execution default-cli of goal org.jboss.arquillian.maven:arquillian-maven-plugin:1.0.0.Alpha1:run failed: An API incompatibility was encountered while executing org.jboss.arquillian.maven:arquillian-maven-plugin:1.0.0.Alpha1:run: java.lang.NoSuchMethodError: org.jboss.arquillian.container.spi.Container.getState()Lorg/jboss/arquillian/container/spi/Container$State;

    [ERROR] -----------------------------------------------------

    [ERROR] realm =    plugin>org.jboss.arquillian.maven:arquillian-maven-plugin:1.0.0.Alpha1

    [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy

    [ERROR] urls[0] = file:/Users/rmorse/.m2/repository/org/jboss/arquillian/maven/arquillian-maven-plugin/1.0.0.Alpha1/arquillian-maven-plugin-1.0.0.Alpha1.jar

    [ERROR] urls[1] = file:/Users/rmorse/.m2/repository/org/sonatype/sisu/sisu-inject-bean/1.4.2/sisu-inject-bean-1.4.2.jar

    [ERROR] urls[2] = file:/Users/rmorse/.m2/repository/org/sonatype/sisu/sisu-guice/2.1.7/sisu-guice-2.1.7-noaop.jar

    [ERROR] urls[3] = file:/Users/rmorse/.m2/repository/org/sonatype/aether/aether-util/1.7/aether-util-1.7.jar

    [ERROR] urls[4] = file:/Users/rmorse/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar

    [ERROR] urls[5] = file:/Users/rmorse/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar

    [ERROR] urls[6] = file:/Users/rmorse/.m2/repository/org/codehaus/plexus/plexus-utils/2.0.4/plexus-utils-2.0.4.jar

    [ERROR] urls[7] = file:/Users/rmorse/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.14/plexus-interpolation-1.14.jar

    [ERROR] urls[8] = file:/Users/rmorse/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar

    [ERROR] urls[9] = file:/Users/rmorse/.m2/repository/org/jboss/arquillian/core/arquillian-core-api/1.0.0.CR1/arquillian-core-api-1.0.0.CR1.jar

    [ERROR] urls[10] = file:/Users/rmorse/.m2/repository/org/jboss/arquillian/core/arquillian-core-spi/1.0.0.CR1/arquillian-core-spi-1.0.0.CR1.jar

    [ERROR] urls[11] = file:/Users/rmorse/.m2/repository/org/jboss/arquillian/container/arquillian-container-spi/1.0.0.CR1/arquillian-container-spi-1.0.0.CR1.jar

    [ERROR] urls[12] = file:/Users/rmorse/.m2/repository/org/jboss/arquillian/config/arquillian-config-api/1.0.0.CR1/arquillian-config-api-1.0.0.CR1.jar

    [ERROR] urls[13] = file:/Users/rmorse/.m2/repository/org/jboss/arquillian/config/arquillian-config-impl-base/1.0.0.CR1/arquillian-config-impl-base-1.0.0.CR1.jar

    [ERROR] urls[14] = file:/Users/rmorse/.m2/repository/org/jboss/shrinkwrap/descriptors/shrinkwrap-descriptors-impl/1.0.0-beta-1/shrinkwrap-descriptors-impl-1.0.0-beta-1.jar

    [ERROR] urls[15] = file:/Users/rmorse/.m2/repository/org/jboss/shrinkwrap/shrinkwrap-api/1.0.0-beta-3/shrinkwrap-api-1.0.0-beta-3.jar

    [ERROR] urls[16] = file:/Users/rmorse/.m2/repository/org/jboss/shrinkwrap/descriptors/shrinkwrap-descriptors-api/1.0.0-beta-1/shrinkwrap-descriptors-api-1.0.0-beta-1.jar

    [ERROR] urls[17] = file:/Users/rmorse/.m2/repository/org/jboss/shrinkwrap/shrinkwrap-impl-base/1.0.0-beta-3/shrinkwrap-impl-base-1.0.0-beta-3.jar

    [ERROR] urls[18] = file:/Users/rmorse/.m2/repository/org/jboss/shrinkwrap/shrinkwrap-spi/1.0.0-beta-3/shrinkwrap-spi-1.0.0-beta-3.jar

    [ERROR] Number of foreign imports: 1

    [ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]

    [ERROR]

     

    Are you able to build the booking example?

  • 5. Re: Seam 3.1.0.Final Booking Example Error
    Aslak Knutsen Master

    Does this example import the arquillian-bom in the dependencyManagement section? in theory this bom should upgrade the versions used by the Maven plugin and Container..

  • 6. Re: Seam 3.1.0.Final Booking Example Error
    Robert Morse Apprentice

    Yes, and modifying arquillian.version in the parent POM to CR7 causes it to pull the CR7 version, but the problem persists.

  • 7. Re: Seam 3.1.0.Final Booking Example Error
    Aslak Knutsen Master

    Maybe adding the Arquillian deps to the arquillian-maven plugin dependencies section halps?

  • 8. Re: Seam 3.1.0.Final Booking Example Error
    Robert Morse Apprentice

    Thanks for your reply.

    Unfortunately, this is my first interaction with Arquillian, so I'm definitely no expert.  Adding the arquillian-bom in the arquillian-maven plugin section didn't change anything.

    I was actually hoping that whoever put the example together would try it out, but I'm willing to spend some time trying to sort through this.   I'm just trying to get something working so I can migrate from Seam2.

  • 9. Re: Seam 3.1.0.Final Booking Example Error
    Davide D'Alto Newbie

    Hi,

    you should be able to solve the issue changing the seam-parent-19.pom where the arquillian-maven-plugin is declared with the following:

     

    <plugin>

         <groupId>org.jboss.arquillian.maven</groupId>

         <artifactId>arquillian-maven-plugin</artifactId>

         <version>${arquillian.maven.plugin.version}</version>

         <dependencies>

              <dependency>

                   <groupId>org.jboss.arquillian.container</groupId>

                   <artifactId>arquillian-container-spi</artifactId>

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

              </dependency>

         </dependencies>

    </plugin>

     

    Alternatively, you can add this plugin in the pom of the booking example: examples/seam-booking/pom.xml.

     

    The problem is the arquillian-container-spi: too new in the latest version of the plugin and too old in the previous.

     

    Cheers,

    Davide