将Seam应用程序从JBoss迁移到Tomcat 6:javax.el.PropertyNotFoundException:目标无法访问,标识符'authenticator'已解析为null

时间:2011-12-01 14:17:31

标签: tomcat jboss seam el

在Tomcat上部署我的应用程序(使用JBoss Seam开发)时遇到问题。 我设法运行视图但我无法查询数据库以进行列表。

这是我尝试登录时在控制台中显示的内容

  

调用登录方法javax.el.PropertyNotFoundException时出错:   目标无法访问,标识符'身份验证器'解决了null   org.jboss.el.parser.AstValue.getTarget(AstValue.java:38)at   org.jboss.el.parser.AstValue.invoke(AstValue.java:95)at   org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)     在org.jboss.seam.core.Expressions $ 2.invoke(Expressions.java:175)at 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:57)     在   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     在java.lang.reflect.Method.invoke(Method.java:616)at   javax.security.auth.login.LoginContext.invoke(LoginContext.java:784)     在   javax.security.auth.login.LoginContext.access $ 000(LoginContext.java:203)     在   javax.security.auth.login.LoginContext中$ 5.run(LoginContext.java:721)     在   javax.security.auth.login.LoginContext中$ 5.run(LoginContext.java:719)     在java.security.AccessController.doPrivileged(Native Method)at   javax.security.auth.login.LoginContext.invokeCreatorPriv(LoginContext.java:718)     在   javax.security.auth.login.LoginContext.login(LoginContext.java:590)     在org.jboss.seam.security.Identity.authenticate(Identity.java:344)     在org.jboss.seam.security.Identity.authenticate(Identity.java:332)     在org.jboss.seam.security.Identity.login(Identity.java:259)at   sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at   sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)     在   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     在java.lang.reflect.Method.invoke(Method.java:616)at   org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:335)     在   org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:348)     在   org.jboss.el.parser.AstPropertySuffix.invoke(AstPropertySuffix.java:58)     在org.jboss.el.parser.AstValue.invoke(AstValue.java:96)at   org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)     在   com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)     在   javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)     在   com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)     在javax.faces.component.UICommand.broadcast(UICommand.java:387)at   org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:321)     在   org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:296)     在   org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:253)     在   org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:466)     在   com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)     在com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)at   com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)     在javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)at   org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)     在   org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)     在   org.jboss.seam.servlet.SeamFilter $ FilterChainImpl.doFilter(SeamFilter.java:83)     在org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)     在   org.jboss.seam.servlet.SeamFilter $ FilterChainImpl.doFilter(SeamFilter.java:69)     在   org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)     在   org.jboss.seam.servlet.SeamFilter $ FilterChainImpl.doFilter(SeamFilter.java:69)     在   org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)     在   org.jboss.seam.servlet.SeamFilter $ FilterChainImpl.doFilter(SeamFilter.java:69)     在org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)     在   org.jboss.seam.servlet.SeamFilter $ FilterChainImpl.doFilter(SeamFilter.java:69)     在   org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)     在org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)     在   org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)     在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)     在org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)     在   org.jboss.seam.servlet.SeamFilter $ FilterChainImpl.doFilter(SeamFilter.java:69)     在org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)     在   org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)     在   org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)     在   org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)     在   org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)     在   org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)     在   org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)     在   org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)     在   org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)     在   org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)     在   org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)     在   org.apache.coyote.http11.Http11Protocol $ Http11ConnectionHandler.process(Http11Protocol.java:588)     在   org.apache.tomcat.util.net.JIoEndpoint $ Worker.run(JIoEndpoint.java:489)     在java.lang.Thread.run(Thread.java:636)

这是我的components.xml文件:

<?xml version="1.0" encoding="UTF-8"?> 
<components xmlns="http://jboss.com/products/seam/components" 
  xmlns:core="http://jboss.com/products/seam/core" 
  xmlns:persistence="http://jboss.com/products/seam/persistence" 
  xmlns:drools="http://jboss.com/products/seam/drools" 
  xmlns:bpm="http://jboss.com/products/seam/bpm" 
  xmlns:security="http://jboss.com/products/seam/security" 
  xmlns:mail="http://jboss.com/products/seam/mail" 
  xmlns:web="http://jboss.com/products/seam/web" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xmlns:transaction="http://jboss.com/products/seam/transaction" 
  xsi:schemaLocation= 
  "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.2.xsd 
  http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.2.xsd 
  http://jboss.com/products/seam/drools http://jboss.com/products/seam/drools-2.2.xsd 
  http://jboss.com/products/seam/bpm http://jboss.com/products/seam/bpm-2.2.xsd 
  http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.2.xsd 
  http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-2.2.xsd 
  http://jboss.com/products/seam/web http://jboss.com/products/seam/web-2.2.xsd 
  http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.2.xsd 
  http://jboss.com/products/seam/transaction http://jboss.com/products/seam/transaction-2.2.xsd"> 

  <core:init /> 

   <core:manager concurrent-request-timeout="500"
                 conversation-timeout="120000"
                 conversation-id-parameter="cid"
                 parent-conversation-id-parameter="pid"/>

  <transaction:entity-transaction entity-manager="#{entityManager}"/>

   <!-- Make sure this URL pattern is the same as that used by the Faces Servlet -->
   <web:hot-deploy-filter url-pattern="*.seam"/>
    <persistence:entity-manager-factory name="entityManagerFactory"
                      persistence-unit-name="testp"/>

   <persistence:managed-persistence-context
        name="entityManager" auto-create="true" 
         entity-manager-factory="#{entityManagerFactory}"/>


   <security:rule-based-permission-resolver security-rules="#{securityRules}"/>

   <security:identity authenticate-method="#{authenticator.authenticate}" remember-me="true"/>

   <event type="org.jboss.seam.security.notLoggedIn">
      <action execute="#{redirect.captureCurrentView}"/>
   </event>
   <event type="org.jboss.seam.security.loginSuccessful">
      <action execute="#{redirect.returnToCapturedView}"/>
   </event>

   <mail:mail-session host="localhost" port="25"/>

   <!-- For use with jBPM pageflow or process management -->
   <!--
   <bpm:jbpm>
      <bpm:process-definitions></bpm:process-definitions>
      <bpm:pageflow-definitions></bpm:pageflow-definitions>
   </bpm:jbpm>
   -->

</components>

0 个答案:

没有答案