10 Replies Latest reply on Sep 3, 2011 12:34 AM by shane.bryzak
      • 1. Re: Seam 3 in Tomcat 7
        piklos

        Since i am using tomcat 7 with seam 3 for couple of months i would only recomnd to use myfaces instead of mojarra. And only newer version of myfaces too (say 2.10 or higher) if you want to keep your hair on your head :).


        Cheers.

        • 2. Re: Seam 3 in Tomcat 7
          hantsy

          I hope there are more getting started guides available like this...


          As u described in the post from the link, it maybe work well...


          I also posted many problems when I used Seam 3 in tomcat 6/7 before, especially after I added the rest and security modules...


          I also added the problems as issues in the related module project...


          But strangely is that the security team did not want to fix the TransactionIntecepter duplicated configuration error...

          • 3. Re: Seam 3 in Tomcat 7
            shane.bryzak

            hantsy bai wrote on Sep 02, 2011 06:41:

            But strangely is that the security team did not want to fix the TransactionIntecepter duplicated configuration error...


            I assume you're talking about My Link?  At first glance this doesn't appear to be a bug, you seem to have both the seam-security and seam-security-impl jars included in your application, which is wrong.  You need to either use seam-security (which bundles both the api and impl), or alternatively include seam-security-api and seam-security-impl.

            • 4. Re: Seam 3 in Tomcat 7
              shane.bryzak
              • 5. Re: Seam 3 in Tomcat 7
                hantsy

                Shane Bryzak wrote on Sep 02, 2011 06:51:


                I assume you're talking about My Link?  At first glance this doesn't appear to be a bug, you seem to have both the seam-security and seam-security-impl jars included in your application, which is wrong.  You need to either use seam-security (which bundles both the api and impl), or alternatively include seam-security-api and seam-security-impl.


                From my exception posted there, u must know /seam-security-external also includes a TransactionInterceptor configuration.

                • 6. Re: Seam 3 in Tomcat 7
                  shane.bryzak

                  hantsy bai wrote on Sep 02, 2011 07:16:


                  From my exception posted there, u must know /seam-security-external also includes a TransactionInterceptor configuration.


                  No, seam-security-external only configures DialoguedInterceptor:


                  https://github.com/seam/security/blob/develop/external/src/main/resources/META-INF/beans.xml

                  • 7. Re: Seam 3 in Tomcat 7
                    hantsy

                    My before application was based on Seam security 3.0.0.Final.

                    • 8. Re: Seam 3 in Tomcat 7
                      shane.bryzak

                      It hasn't changed since 3.0.0.Final.  Here's the tag in GitHub:


                      https://github.com/seam/security/blob/3.0.0.Final/external/src/main/resources/META-INF/beans.xml


                      Also, your very own stack trace posted in the JIRA issue confirms this - I've added some carriage returns to make it more readable:



                      org.jboss.weld.exceptions.DeploymentException: WELD-001416 Enabled interceptor class
                      
                      [<class>org.jboss.seam.security.external.dialogues.DialoguedInterceptor</class> 
                      in jar:file:/E:/Users/hantsy/.m2/repository/org/jboss/seam/security/seam-security-external/3.0.0.Final/seam-security-external-3.0.0.Final.jar!/META-INF/beans.xml@11, 
                      
                      <class>org.jboss.seam.transaction.TransactionInterceptor</class> in jar:file:/E:/Users/hantsy/.m2/repository/org/jboss/seam/security/seam-security/3.
                      0.0.Final/seam-security-3.0.0.Final.jar!/META-INF/beans.xml@8, 
                      
                      <class>org.jboss.seam.rest.validation.ValidationInterceptor</class> in file:/E:/MyWorks/bifincan/bifincan-web/target/classes/META-INF/beans.xml@8, 
                      
                      <class>org.jboss.seam.transaction.TransactionInterceptor</class> in jar:file:/E:/Users/hantsy/.m2/repository/org/jboss/seam/security/seam-security-impl/3.0.0.Final/seam-security-impl-3.0.0.Final.jar!/META-INF/beans.xml@8] specified twice




                      You really need to try what I suggested earlier to see if it fixes the issue.

                      • 9. Re: Seam 3 in Tomcat 7
                        hantsy

                        yeah, maybe it is my mistake, I am sorry.
                        But why I can not define a TransactionIntercepter in my application...why Seam 3 security must define TransactionIntercepter...
                        My original problem may be caused by this, later I changed the configuration again and again.


                        Regards

                        • 10. Re: Seam 3 in Tomcat 7
                          shane.bryzak

                          You most certainly should be able to enable TransactionInterceptor for your application.  The first paragraph of section 9.4 of the CDI spec makes this clear:



                          By default, a bean archive has no enabled interceptors bound via interceptor bindings. An interceptor must be explicitly
                          enabled by listing its class under the <interceptors> element of the beans.xml file of the bean archive.

                          If this isn't working for you, then it could possibly be a bug in Weld.