8 Replies Latest reply on Apr 29, 2011 5:43 AM by Hendy Irawan

    Seam Persistence Module Exception

    Aaron Anderson Newbie
      I am attempting to use the Seam 3.0.0.Beta1 persistence module with Weld-se 1.1.0.Beta2 to provide JPA entity manager injection for my standalone Java SE app. I am not using a beans.xml file as I prefer to manually expose classes to CDI via my own extension. Whenever I try to start weld with the persistence module in the classpath I get the following exception:

      org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [Synchronizations] with qualifiers [@Default] at injection point [[field] @Inject private org.jboss.seam.persistence.transaction.DefaultSeamTransaction.synchronizations]
              at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:284)
              at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:134)
              at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:153)
              at org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:356)
              at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:342)
              at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:383)
              at org.jboss.weld.environment.se.Weld.initialize(Weld.java:89)

      I tried to manually add the SeSynchronizations class as an annotated type in my own extension but this did not help. Any ideas?

      Thanks!
        • 1. Re: Seam Persistence Module Exception
          Stuart Douglas Master

          Can you show the code you used when adding SeSynchronizations?

          • 2. Re: Seam Persistence Module Exception
            Aaron Anderson Newbie

            Sure,


            public void beforeBeanDiscovery(@Observes BeforeBeanDiscovery bbd, BeanManager bm) {
                      bbd.addAnnotatedType(bm.createAnnotatedType(org.jboss.seam.persistence.transaction.SeSynchronizations.class));
            }


            According to the documentation I need to have seam-xml-config in the classpath but since I am not using a beans.xml file this extension fails to load. Perhaps this is my problem.

            • 3. Re: Seam Persistence Module Exception
              Stuart Douglas Master

              SeSynchronizations is annotated @Veto, so the AnnotatedType you create also has @Veto and will be prevented from being installed.

              • 4. Re: Seam Persistence Module Exception
                Coen Damen Novice

                I'm having the exact same problem.


                Using JBoss AS 6.0.0.20101110-CR1, Weld and Seam-persistence-3.0.0.Beta2.


                I can't deploy the application. I have a maven project with the Weld app as a WAR and other Maven modules as libs in an EAR structure.


                Is this problem solved yet?


                Thanks,
                Coem



                9:38:51,951 INFO  [org.jboss.seam.config.xml.bootstrap.XmlConfigExtension] Reading XML file: vfs:/D:/Apps/jboss-6.0.0.20101110-CR1/server/default/deploy/seam3demo.ear/lib/seam
                demo-persistence-0.0.1-SNAPSHOT.jar/META-INF/beans.xml
                9:38:51,963 INFO  [org.jboss.seam.config.xml.bootstrap.XmlConfigExtension] Reading XML file: vfs:/D:/Apps/jboss-6.0.0.20101110-CR1/server/default/deploy/seam3demo.ear/lib/seam
                persistence-impl-3.0.0.Beta2.jar/META-INF/beans.xml
                9:38:51,966 INFO  [org.jboss.seam.config.xml.bootstrap.XmlConfigExtension] Reading XML file: vfs:/D:/Apps/jboss-6.0.0.20101110-CR1/server/default/deployers/resteasy.deployer/r
                steasy-cdi-2.1-beta-1.jar/META-INF/beans.xml
                9:38:53,432 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error installing to Start: name=vfs:///D:/Apps/jboss-6.0.0.20101110-CR1/server/default/deploy/
                eam3demo.ear_WeldBootstrapBean state=Create: org.jboss.weld.exceptions.DeploymentException: WELD-001409 Ambiguous dependencies for type [Synchronizations] with qualifiers [@De
                ault] at injection point [[field] @Inject private org.jboss.seam.persistence.transaction.DefaultSeamTransaction.synchronizations]. Possible dependencies [[Managed Bean [class
                rg.jboss.seam.persistence.transaction.SeSynchronizations] with qualifiers [@Any @Default], Managed Bean [class org.jboss.seam.persistence.transaction.SeSynchronizations] with
                ualifiers [@Any @Default], Session bean [class org.jboss.seam.persistence.transaction.EjbSynchronizations with qualifiers [@Any @Default]; local interfaces are [LocalEjbSynchr
                nizations], Managed Bean [class org.jboss.seam.persistence.transaction.EjbSynchronizations] with qualifiers [@Any @Default]]]
                       at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:288) [:6.0.0.20101110-CR1]
                       at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:134) [:6.0.0.20101110-CR1]
                       at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:153) [:6.0.0.20101110-CR1]
                       at org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:356) [:6.0.0.20101110-CR1]
                       at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:342) [:6.0.0.20101110-CR1]
                       at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:383) [:6.0.0.20101110-CR1]
                       at org.jboss.weld.integration.deployer.env.helpers.BootstrapBean.boot(BootstrapBean.java:92) [:6.0.0.20101110-CR1]
                       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_23]
                       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_23]
                       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_23]
                       at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_23]
                       at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:60) [jboss-reflect.jar:2.2.0.Alpha9]
                       at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:168) [jboss-reflect.jar:2.2.0.Alpha9]
                       at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66) [jboss-reflect.jar:2.2.0.Alpha9]
                       at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:257) [jboss-kernel.jar:2.2.0.Al
                ha10]
                       at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47) [jboss-kernel.jar:2.2.0.Alpha10]
                       at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:125) [jboss-kernel.jar:2.2.0.Alpha10]
                       at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:72) [jboss-kernel.jar:2.2.0.Alpha10]
                       at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:202) [jboss-kernel.jar:2.2.0.Alpha10]
                       at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54) [jboss-kernel.jar:2.2.0.Alpha10]
                       at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42) [jboss-kernel.jar:2.2.0.Alpha10]
                       at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62) [jboss-dependency.jar:2.2.0.Alpha10]
                       at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71) [jboss-dependency.jar:2.2.0.Alpha10]
                       at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51) [jboss-dependency.jar:2.2.0.Alpha10]
                       at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.Alpha10]
                       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.Alpha10]
                       at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.Alpha10]
                       at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.Alpha10]
                       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.Alpha10]
                       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.Alpha10]
                       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939) [jboss-dependency.jar:2.2.0.Alpha10]
                       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654) [jboss-dependency.jar:2.2.0.Alpha10]
                       at org.jboss.deployers.plugins.deployers.DeployersImpl.change(DeployersImpl.java:1983) [:2.2.0.Alpha8]
                       at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:1076) [:2.2.0.Alpha8]
                       at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:679) [:2.2.0.Alpha8]
                       at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.process(MainDeployerPlugin.java:106) [:6.0.0.20101110-CR1]
                       at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.process(ProfileControllerContext.java:130) [:0.1.0.Alpha1]
                       at org.jboss.profileservice.dependency.ProfileDeployAction.deploy(ProfileDeployAction.java:148) [:0.1.0.Alpha1]
                       at org.jboss.profileservice.dependency.ProfileDeployAction.installActionInternal(ProfileDeployAction.java:94) [:0.1.0.Alpha1]
                       at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54) [jboss-kernel.jar:2.2.0.Alpha10]
                       at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42) [jboss-kernel.jar:2.2.0.Alpha10]
                       at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62) [jboss-dependency.jar:2.2.0.Alpha10]
                       at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71) [jboss-dependency.jar:2.2.0.Alpha10]
                       at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51) [jboss-dependency.jar:2.2.0.Alpha10]
                       at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.Alpha10]
                       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.Alpha10]
                       at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.Alpha10]
                       at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.Alpha10]
                       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.Alpha10]
                       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.Alpha10]
                       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939) [jboss-dependency.jar:2.2.0.Alpha10]
                       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654) [jboss-dependency.jar:2.2.0.Alpha10]
                       at org.jboss.profileservice.dependency.ProfileServiceController.activate(ProfileServiceController.java:188) [:0.1.0.Alpha1]
                       at org.jboss.profileservice.AbstractProfileService.activateProfile(AbstractProfileService.java:170) [:0.1.0.Alpha1]
                       at org.jboss.profileservice.bootstrap.AbstractProfileServiceBootstrap.activate(AbstractProfileServiceBootstrap.java:117) [:0.1.0.Alpha1]
                       at org.jboss.profileservice.resolver.BasicResolverFactory$ProfileResolverFacade.deploy(BasicResolverFactory.java:89) [:0.1.0.Alpha1]
                       at org.jboss.profileservice.bootstrap.AbstractProfileServiceBootstrap.start(AbstractProfileServiceBootstrap.java:97) [:0.1.0.Alpha1]
                       at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:130) [:6.0.0.20101110-CR1]
                       at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:56) [:6.0.0.20101110-CR1]
                       at org.jboss.bootstrap.impl.base.server.AbstractServer.startBootstraps(AbstractServer.java:827) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-5]
                       at org.jboss.bootstrap.impl.base.server.AbstractServer$StartServerTask.run(AbstractServer.java:417) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-5]
                       at java.lang.Thread.run(Thread.java:662) [:1.6.0_23]



                • 5. Re: Seam Persistence Module Exception
                  Jason Porter Master

                  Please try with JBoss 6.0.0.Final and report back if you are still having problems.

                  • 6. Re: Seam Persistence Module Exception
                    Aaron Siri Newbie

                    I'm seeing the same problem in Glassfish 3.1 b37.

                    • 7. Re: Seam Persistence Module Exception
                      Coen Damen Novice

                      With JBoss 6.0.0.Final the same problem.