1 Reply Latest reply on Sep 29, 2009 12:27 PM by Anil Saldanha

    Problem of Seam Application Using JBoss Identity

    Sean Wu Newbie

      Hi all,

      I try to run a seam/identity sso demo, but failed.
      JBoss AS 5.1.GA
      Seam 2.2.0.GA
      I follow the JBoss Identity's instruction and just switch to CRUD demo generated by seam-gen.
      When I go to a page with login required, it is redirected to idp-sig-no-val and I input "sales/sales" and click login. It shows a seam error page/debug page with errors:

      2009-09-23 17:45:03,550 INFO [org.apache.coyote.http11.Http11Protocol] (main) Starting Coyote HTTP/1.1 on http-127.0.0.1-8080
      2009-09-23 17:45:03,566 INFO [org.apache.coyote.ajp.AjpProtocol] (main) Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
      2009-09-23 17:45:03,581 INFO [org.jboss.bootstrap.microcontainer.ServerImpl] (main) JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221053)] Started in 1m:33s:703ms
      2009-09-23 17:49:19,753 INFO [STDOUT] (http-127.0.0.1-8080-1) Hibernate:
       select
       top ? company0_.id as id0_,
       company0_.location as location0_,
       company0_.name as name0_,
       company0_.type as type0_,
       company0_.version as version0_
       from
       Company company0_
      2009-09-23 17:49:32,456 WARN [org.jboss.seam.security.jaas.SeamLoginModule] (http-127.0.0.1-8080-1) Error invoking login method
      javax.el.ELException: java.lang.IllegalArgumentException: could not set field value: authenticator.identity
       at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:339)
       at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:348)
       at org.jboss.el.parser.AstPropertySuffix.invoke(AstPropertySuffix.java:58)
       at org.jboss.el.parser.AstValue.invoke(AstValue.java:96)
       at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
       at org.jboss.seam.core.Expressions$2.invoke(Expressions.java:175)
       at org.jboss.seam.security.jaas.SeamLoginModule.login(SeamLoginModule.java:109)
       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 javax.security.auth.login.LoginContext.invoke(LoginContext.java:769)
       at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
       at javax.security.auth.login.LoginContext$5.run(LoginContext.java:706)
       at java.security.AccessController.doPrivileged(Native Method)
       at javax.security.auth.login.LoginContext.invokeCreatorPriv(LoginContext.java:703)
       at javax.security.auth.login.LoginContext.login(LoginContext.java:575)
       at org.jboss.seam.security.Identity.authenticate(Identity.java:344)
       at org.jboss.seam.security.Identity.authenticate(Identity.java:332)
       at org.jboss.identity.seam.federation.SamlAuthenticationFilter$1.process(SamlAuthenticationFilter.java:239)
       at org.jboss.seam.servlet.ContextualHttpServletRequest.run(ContextualHttpServletRequest.java:53)
       at org.jboss.identity.seam.federation.SamlAuthenticationFilter.authenticate(SamlAuthenticationFilter.java:231)
       at org.jboss.identity.seam.federation.SamlAuthenticationFilter.loginUser(SamlAuthenticationFilter.java:218)
       at org.jboss.identity.seam.federation.SamlAuthenticationFilter.doFilter(SamlAuthenticationFilter.java:183)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
       at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
       at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
       at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
       at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
       at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
       at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
       at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)
       at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)
       at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
       at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
       at org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
       at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
       at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
       at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
       at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
       at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
       at java.lang.Thread.run(Thread.java:619)
      Caused by: java.lang.IllegalArgumentException: could not set field value: authenticator.identity
       at org.jboss.seam.Component.setFieldValue(Component.java:1927)
       at org.jboss.seam.Component.access$600(Component.java:126)
       at org.jboss.seam.Component$BijectedField.set(Component.java:2940)
       at org.jboss.seam.Component.injectAttributes(Component.java:1736)
       at org.jboss.seam.Component.inject(Component.java:1554)
       at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:61)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
       at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
       at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
       at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185)
       at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103)
       at com.mydomain.app3.action.Authenticator2_$$_javassist_seam_4.authenticate(Authenticator2_$$_javassist_seam_4.java)
       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.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:335)
       ... 64 more
      Caused by: java.lang.IllegalArgumentException: Could not set field value by reflection: Authenticator2.identity on: com.mydomain.app3.action.Authenticator2 with value: class org.jboss.identity.seam.federation.SamlIdentity
       at org.jboss.seam.util.Reflections.set(Reflections.java:86)
       at org.jboss.seam.Component.setFieldValue(Component.java:1923)
       ... 81 more
      Caused by: java.lang.IllegalArgumentException: Can not set org.jboss.identity.seam.federation.SamlIdentity field com.mydomain.app3.action.Authenticator2.identity to org.jboss.identity.seam.federation.SamlIdentity
       at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:146)
       at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:150)
       at sun.reflect.UnsafeObjectFieldAccessorImpl.set(UnsafeObjectFieldAccessorImpl.java:63)
       at java.lang.reflect.Field.set(Field.java:657)
       at org.jboss.seam.util.Reflections.set(Reflections.java:71)
       ... 82 more
      

      Can somebody help? Thanks.