7 Replies Latest reply on Jun 13, 2009 7:45 AM by Arbi Sookazian

    unable to build Seam 3 booking project

    Arbi Sookazian Master

      Using JBoss 5.0.0.GA and Maven 2.0.10 with SVN co of Seam 3 examples, docs, modules as per these instructions from Download page in this forum:


      # Anonymous SVN checkout of the 3.0 development branch (trunk):
      mkdir seam-trunk && cd seam-trunk # creates directory to host the source
      svn co http://anonsvn.jboss.org/repos/seam/docs/trunk docs
      svn co http://anonsvn.jboss.org/repos/seam/examples/trunk examples
      svn co http://anonsvn.jboss.org/repos/seam/modules/trunk modules
      cd modules/version-matrix && mvn install # seeds the Maven 2 repository
      



      I am seeing the following after executing mvn install -e.  What am I doing wrong or is the build broken???


      C:\java\seam-trunk\examples\booking>mvn install -e
      + Error stacktraces are turned on.
      [INFO] Scanning for projects...
      [INFO] snapshot org.jboss.seam:seam-version-matrix:3.0.0-SNAPSHOT: checking for
      updates from lunarlogic
      [WARNING] repository metadata for: 'snapshot org.jboss.seam:seam-version-matrix:
      3.0.0-SNAPSHOT' could not be retrieved from repository: lunarlogic due to an err
      or: Error transferring file
      [INFO] Repository 'lunarlogic' will be blacklisted
      [INFO] Reactor build order:
      [INFO]   Seam Booking Example (Java EE 5)
      [INFO]   Seam Booking Example (EJB module)
      [INFO]   Seam Booking Example (Web module)
      [INFO]   Seam Booking Example (Enterprise application)
      WAGON_VERSION: 1.0-beta-2
      [INFO] ------------------------------------------------------------------------
      [INFO] Building Seam Booking Example (Java EE 5)
      [INFO]    task-segment: [install]
      [INFO] ------------------------------------------------------------------------
      [INFO] [enforcer:enforce {execution: enforce}]
      [INFO] [site:attach-descriptor]
      [INFO] Preparing source:jar
      [WARNING] Removing: jar from forked lifecycle, to prevent recursive invocation.
      [INFO] [enforcer:enforce {execution: enforce}]
      [INFO] [source:jar {execution: attach-sources}]
      [INFO] [install:install]
      [INFO] Installing C:\java\seam-trunk\examples\booking\pom.xml to C:\Users\asooka
      zian\.m2\repository\org\jboss\seam\examples\seam-booking\3.0.0-SNAPSHOT\seam-boo
      king-3.0.0-SNAPSHOT.pom
      [INFO] ------------------------------------------------------------------------
      [INFO] Building Seam Booking Example (EJB module)
      [INFO]    task-segment: [install]
      [INFO] ------------------------------------------------------------------------
      [INFO] [enforcer:enforce {execution: enforce}]
      [INFO] [resources:resources]
      [INFO] Using default encoding to copy filtered resources.
      [INFO] [compiler:compile]
      [INFO] Compiling 25 source files to C:\java\seam-trunk\examples\booking\ejb-jar\
      target\classes
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Compilation failure
      C:\java\seam-trunk\examples\booking\ejb-jar\src\main\java\org\jboss\seam\example
      s\booking\security\AuthenticationEventListener.java:[39,122] incompatible types
      found   : javax.enterprise.inject.spi.Bean<capture of ?>
      required: javax.enterprise.inject.spi.Bean<org.jboss.seam.examples.booking.model
      .User>
      
      
      
      C:\java\seam-trunk\examples\booking\ejb-jar\src\main\java\org\jboss\seam\example
      s\booking\security\AuthenticationEventListener.java:[39,122] incompatible types
      found   : javax.enterprise.inject.spi.Bean<capture of ?>
      required: javax.enterprise.inject.spi.Bean<org.jboss.seam.examples.booking.model
      .User>
      
      
      [INFO] ------------------------------------------------------------------------
      [INFO] Trace
      org.apache.maven.BuildFailureException: Compilation failure
      C:\java\seam-trunk\examples\booking\ejb-jar\src\main\java\org\jboss\seam\example
      s\booking\security\AuthenticationEventListener.java:[39,122] incompatible types
      found   : javax.enterprise.inject.spi.Bean<capture of ?>
      required: javax.enterprise.inject.spi.Bean<org.jboss.seam.examples.booking.model
      .User>
      
      
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
      ultLifecycleExecutor.java:580)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
      fecycle(DefaultLifecycleExecutor.java:500)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
      ltLifecycleExecutor.java:479)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
      dleFailures(DefaultLifecycleExecutor.java:331)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
      ts(DefaultLifecycleExecutor.java:292)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
      fecycleExecutor.java:142)
              at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
              at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
              at org.apache.maven.cli.MavenCli.main(MavenCli.java:301)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:585)
              at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
              at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
              at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
      
              at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
      Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation fail
      ure
      C:\java\seam-trunk\examples\booking\ejb-jar\src\main\java\org\jboss\seam\example
      s\booking\security\AuthenticationEventListener.java:[39,122] incompatible types
      found   : javax.enterprise.inject.spi.Bean<capture of ?>
      required: javax.enterprise.inject.spi.Bean<org.jboss.seam.examples.booking.model
      .User>
      
      
              at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompiler
      Mojo.java:516)
              at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:114)
              at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
      nManager.java:453)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
      ultLifecycleExecutor.java:559)
              ... 16 more
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 38 seconds
      [INFO] Finished at: Fri Jun 12 20:58:09 PDT 2009
      [INFO] Final Memory: 19M/34M
      [INFO] ------------------------------------------------------------------------

        • 1. Re: unable to build Seam 3 booking project
          Arbi Sookazian Master

          Well I re-did the SVN co operations above and reproduced the error.  Code in question is:


          public
          @RequestScoped
          class AuthenticationEventListener
          {
             private @Logger Log log;
             
             /**
              * Clear the dummy register user when a login event occurs. Temporary workaround
              * for not being able to clear this out some other way.
              */
             public void onLogin(@Observes LoggedInEvent loggedInEvent, BeanManager manager)
             {
                log.info(loggedInEvent.getPrincipal().getName() + " has logged in; clearing instance of @Registered User");
                Bean<User> registeredUserBean = manager.getBeans(User.class, new AnnotationLiteral<Registered>() {}).iterator().next();
                Context sessionContext = manager.getContext(SessionScoped.class);
                ((AbstractThreadLocalMapContext) sessionContext).getBeanStore().remove(registeredUserBean);
             }
             
             ...
             
          }

          • 2. Re: unable to build Seam 3 booking project
            Arbi Sookazian Master

            I commented out the contents of the onLogin() method and the mvn install operation was successful.


            Let's see what happens now...

            • 3. Re: unable to build Seam 3 booking project
              Arbi Sookazian Master
              2009-06-12 21:41:44,269 DEBUG [org.jboss.ejb3.deployers.Ejb3Deployer] (main) ********* Ejb3Deployer Begin Unit: seam-booking-ejb.jar jar: seam-booking-ejb.jar
              2009-06-12 21:41:44,397 DEBUG [org.jboss.ejb3.interceptors.metadata.InterceptorMetaDataBridge] (main) ======> Creating interceptor metadata bridge
              2009-06-12 21:41:44,538 DEBUG [org.jboss.ejb3.deployers.Ejb3Deployer] (main) Error during deploy: vfszip:/C:/java/jboss-5.0.0.GA/server/default/deploy/seam-booking.ear/seam-booking-ejb.jar
              org.jboss.deployers.spi.DeploymentException: Error deploying seam-booking-ejb.jar: Lorg/jboss/webbeans/log/Log;
                   at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:203)
                   at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:104)
                   at org.jboss.deployers.vfs.spi.deployer.AbstractVFSRealDeployer.internalDeploy(AbstractVFSRealDeployer.java:45)
                   at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
                   at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
                   at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
                   at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
                   at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)
                   at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
                   at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
                   at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
                   at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
                   at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
                   at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
                   at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
                   at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
                   at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
                   at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:545)
                   at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:304)
                   at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
                   at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
                   at org.jboss.Main.boot(Main.java:209)
                   at org.jboss.Main$1.run(Main.java:547)
                   at java.lang.Thread.run(Thread.java:595)
              Caused by: java.lang.NoClassDefFoundError: Lorg/jboss/webbeans/log/Log;
                   at java.lang.Class.getDeclaredFields0(Native Method)
                   at java.lang.Class.privateGetDeclaredFields(Class.java:2259)
                   at java.lang.Class.getDeclaredFields(Class.java:1715)
                   at org.jboss.aop.Advisor.doDeployAnnotationOverride(Advisor.java:454)
                   at org.jboss.aop.Advisor$DeployAnnotationOverrideAction$2.deploy(Advisor.java:2016)
                   at org.jboss.aop.Advisor.deployAnnotationOverride(Advisor.java:415)
                   at org.jboss.aop.Advisor.deployAnnotationOverrides(Advisor.java:399)
                   at org.jboss.aop.ClassAdvisor.rebindClassMetaData(ClassAdvisor.java:1223)
                   at org.jboss.ejb3.interceptors.container.ManagedObjectAdvisor.rebindClassMetaData(ManagedObjectAdvisor.java:180)
                   at org.jboss.aop.ClassAdvisor$1.run(ClassAdvisor.java:290)
                   at java.security.AccessController.doPrivileged(Native Method)
                   at org.jboss.aop.ClassAdvisor.attachClass(ClassAdvisor.java:274)
                   at org.jboss.ejb3.interceptors.container.ManagedObjectAdvisor.initialize(ManagedObjectAdvisor.java:174)
                   at org.jboss.ejb3.aop.ExtendedManagedObjectAdvisor.initialize(ExtendedManagedObjectAdvisor.java:70)
                   at org.jboss.ejb3.interceptors.container.AbstractContainer.initializeAdvisor(AbstractContainer.java:162)
                   at org.jboss.ejb3.aop.BeanContainer.initialize(BeanContainer.java:206)
                   at org.jboss.ejb3.EJBContainer.<init>(EJBContainer.java:245)
                   at org.jboss.ejb3.session.SessionContainer.<init>(SessionContainer.java:117)
                   at org.jboss.ejb3.session.SessionSpecContainer.<init>(SessionSpecContainer.java:71)
                   at org.jboss.ejb3.stateless.StatelessContainer.<init>(StatelessContainer.java:116)
                   at org.jboss.ejb3.Ejb3AnnotationHandler.getStatelessContainer(Ejb3AnnotationHandler.java:310)
                   at org.jboss.ejb3.Ejb3AnnotationHandler.getContainers(Ejb3AnnotationHandler.java:203)
                   at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:668)
                   at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:628)
                   at org.jboss.ejb3.Ejb3Deployment.deployUrl(Ejb3Deployment.java:610)
                   at org.jboss.ejb3.Ejb3Deployment.deploy(Ejb3Deployment.java:573)
                   at org.jboss.ejb3.Ejb3Deployment.create(Ejb3Deployment.java:488)
                   at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:189)
                   ... 23 more



              2009-06-12 21:41:44,807 ERROR [org.jboss.system.server.profileservice.ProfileServiceBootstrap] (main) Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
              
              *** CONTEXTS IN ERROR: Name -> Error
              
              vfszip:/C:/java/jboss-5.0.0.GA/server/default/deploy/seam-booking.ear -> java.lang.NoClassDefFoundError: Lorg/jboss/webbeans/log/Log;
              

              • 4. Re: unable to build Seam 3 booking project
                Arbi Sookazian Master

                Above error would be solved by this:



                You'll also need the 1.0.0-SNAPSHOT of the Web Beans logger extension. You can
                find it in the Web Beans extensions source tree. Run 'mvn install' in that
                directory to have it installed in your local Maven 2 repository.

                But where exactly is the Web Beans extensions source tree located?

                • 6. Re: unable to build Seam 3 booking project
                  Arbi Sookazian Master

                  Almost there...


                  2009-06-12 22:30:53,628 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (main) Error installing to Start: name=vfsfile:/C:/java/jboss-5.0.0.GA/server/default/deploy/seam-booking.ear/_WebBeansBootstrapBean state=Create
                  java.lang.NoSuchMethodError: javax.enterprise.inject.spi.InjectionPoint.getAnnotated()Ljavax/enterprise/inject/spi/Annotated;
                       at org.jboss.webbeans.BeanValidator.validate(BeanValidator.java:85)
                       at org.jboss.webbeans.bootstrap.WebBeansBootstrap.boot(WebBeansBootstrap.java:209)
                       at org.jboss.webbeans.bootstrap.api.helpers.BootstrapBean.boot(BootstrapBean.java:120)
                       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.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59)
                       at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:150)
                       at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
                       at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:241)
                       at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)
                       at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:109)
                       at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:70)
                       at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:221)
                       at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)
                       at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)
                       at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
                       at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
                       at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
                       at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
                       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
                       at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
                       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
                       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
                       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
                       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
                       at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
                       at org.jboss.system.ServiceController.start(ServiceController.java:460)
                       at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:146)
                       at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:104)
                       at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:45)
                       at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
                       at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
                       at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
                       at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
                       at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
                       at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
                       at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)
                       at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
                       at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
                       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
                       at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
                       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
                       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
                       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
                       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
                       at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
                       at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:545)
                       at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:304)
                       at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
                       at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
                       at org.jboss.Main.boot(Main.java:209)
                       at org.jboss.Main$1.run(Main.java:547)
                       at java.lang.Thread.run(Thread.java:619)



                  2009-06-12 22:31:05,753 ERROR [org.jboss.system.server.profileservice.ProfileServiceBootstrap] (main) Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
                  
                  *** CONTEXTS IN ERROR: Name -> Error
                  
                  vfsfile:/C:/java/jboss-5.0.0.GA/server/default/deploy/seam-booking.ear/_WebBeansBootstrapBean -> java.lang.NoSuchMethodError: javax.enterprise.inject.spi.InjectionPoint.getAnnotated()Ljavax/enterprise/inject/spi/Annotated;
                  

                  • 7. Re: unable to build Seam 3 booking project
                    Arbi Sookazian Master

                    javax.enterprise.inject.spi.InjectionPoint exists in this jar: jsr299-api.jar


                    so what's the problem now?


                    I ran ant update in the webbeans-trunk\ri\jboss-as directory and copied the resulting webbeans.deployer folder to %JBOSS_HOME%\server\default\deployers folder...