3 Replies Latest reply on Jul 16, 2007 12:44 AM by Sridhar Vennela

    Seam Security

    scott duke Novice

      I am attempting to implement the seam security into a new project I created. I am using JBoss 4.0.5.GA and the Seam 1.2.0.PATCH. When I start JBoss, everything seems fine. However, when I try to access my home page, I receive the following error:

      2007-03-08 21:30:09,125 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.events
      2007-03-08 21:30:09,125 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.postSetVariable.securityRules
      2007-03-08 21:30:09,187 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/portfolio2]] Session event listener threw exception
      org.jboss.seam.InstantiationException: Could not instantiate Seam component: org.jboss.seam.security.identity
      at org.jboss.seam.Component.newInstance(Component.java:1708)
      at org.jboss.seam.contexts.Lifecycle.startup(Lifecycle.java:165)
      at org.jboss.seam.contexts.Lifecycle.beginSession(Lifecycle.java:225)
      at org.jboss.seam.servlet.SeamListener.sessionCreated(SeamListener.java:41)
      at org.apache.catalina.session.StandardSession.tellNew(StandardSession.java:384)
      at org.apache.catalina.session.StandardSession.setId(StandardSession.java:356)
      at org.apache.catalina.session.ManagerBase.createSession(ManagerBase.java:824)
      at org.apache.catalina.session.StandardManager.createSession(StandardManager.java:290)
      at org.apache.catalina.connector.Request.doGetSession(Request.java:2223)
      at org.apache.catalina.connector.Request.getSession(Request.java:2024)
      at org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:831)
      at org.apache.myfaces.context.servlet.ServletExternalContextImpl.getSession(ServletExternalContextImpl.java:197)
      at org.jboss.seam.contexts.ContextAdaptor.getSession(ContextAdaptor.java:42)
      at org.jboss.seam.contexts.Lifecycle.beginRequest(Lifecycle.java:42)
      at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:53)
      at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersBefore(PhaseListenerManager.java:70)
      at org.apache.myfaces.lifecycle.LifecycleImpl.restoreView(LifecycleImpl.java:103)
      at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:66)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
      at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
      at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
      at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
      at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
      at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
      at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
      at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
      at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
      at java.lang.Thread.run(Thread.java:595)
      Caused by: javax.faces.el.EvaluationException: Cannot get value for expression '#{securityRules}'
      at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:402)
      at org.jboss.seam.core.Expressions$1.getValue(Expressions.java:57)
      at org.jboss.seam.Component$ELInitialValue.getValue(Component.java:2045)
      at org.jboss.seam.Component.initialize(Component.java:1136)
      at org.jboss.seam.Component.instantiateJavaBean(Component.java:1096)
      at org.jboss.seam.Component.instantiate(Component.java:1056)
      at org.jboss.seam.Component.newInstance(Component.java:1704)
      ... 48 more
      Caused by: java.lang.IllegalStateException: could not locate rule file: /META-INF/security-rules.drl
      at org.jboss.seam.drools.RuleBase.compileRuleBase(RuleBase.java:49)
      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:585)
      at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
      at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:121)
      at org.jboss.seam.Component.callComponentMethod(Component.java:1802)
      at org.jboss.seam.Component.callCreateMethod(Component.java:1725)
      at org.jboss.seam.Component.newInstance(Component.java:1714)
      at org.jboss.seam.Component.getInstance(Component.java:1611)
      at org.jboss.seam.Component.getInstance(Component.java:1578)
      at org.jboss.seam.jsf.SeamVariableResolver.resolveVariable(SeamVariableResolver.java:53)
      at org.apache.myfaces.config.LastVariableResolverInChain.resolveVariable(LastVariableResolverInChain.java:42)
      at org.apache.myfaces.el.ValueBindingImpl$ELVariableResolver.resolveVariable(ValueBindingImpl.java:574)
      at org.apache.commons.el.NamedValue.evaluate(NamedValue.java:124)
      at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:383)
      ... 54 more

      I tried searching to see if someone has come across this problem, but haven't found anything. Does anyone have any idea as to how to resolve this?