Spring 尝试在JSF 1.2中加载应用程序上下文时出现NullPointerException

Spring 尝试在JSF 1.2中加载应用程序上下文时出现NullPointerException,spring,jsf,jsf-1.2,Spring,Jsf,Jsf 1.2,迁移到jsf 1.2时尝试加载应用程序上下文时出现空指针异常 下面是堆栈跟踪 [ERROR] [com.sun.faces.lifecycle.InvokeApplicationPhase] [] - # {CustomerSearchBean.searchCustomers}: javax.faces.el.EvaluationException: java.lang.NullPointerException javax.faces.FacesException

迁移到jsf 1.2时尝试加载应用程序上下文时出现空指针异常

下面是堆栈跟踪

    [ERROR] [com.sun.faces.lifecycle.InvokeApplicationPhase] [] - #   {CustomerSearchBean.searchCustomers}: javax.faces.el.EvaluationException: 
     java.lang.NullPointerException
    javax.faces.FacesException: #{CustomerSearchBean.searchCustomers}: javax.faces.el.EvaluationException: java.lang.NullPointerException
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:78)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)

    ... 29 more
 Caused by: java.lang.NullPointerException
at com.tms.cdqi.presentation.jsf.bean.customerprofile.CustomerSearchBean.searchCustomers(CustomerSearchBean.java:134)
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 com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
下面是FacesXML

 <managed-bean>
    <description>This bean is used for customer profile</description>
    <managed-bean-name>CustomerSearchBean</managed-bean-name>
    <managed-bean-class>com.tms.cdqi.presentation.jsf.bean.customerprofile.CustomerSearchBean</managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
    <managed-property>
        <property-name>commandInvoker</property-name>
        <value>#{commandInvoker}</value>
    </managed-property>
    <managed-property>
        <property-name>applicationContextFactory</property-name>
        <value>#{cdqiApplicationContextFactory}</value>
    </managed-property>

</managed-bean>

@tiny你能告诉我你的建议吗?嗯,看起来像是
这个。getApplicationContextFactory()
为空。尝试进一步调查这一点。这个方法做什么?@sleske它将调用faces配置文件中的托管bean和属性值,然后加载应用程序contextWell中的bean,然后找出它返回null的原因。我们无法为您调试。@sleske只是想知道您是否知道jsf 1.2如何在托管bean上工作。
       <beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns="http://www.springframework.org/schema/beans"
  xsi:schemaLocation="
            http://www.springframework.org/schema/beans
     http://www.springframework.org/schema/beans/spring-beans.xsd">

<bean id="cdqiApplicationContextFactory"
    class="com.tms.cdqi.framework.context.CDQIApplicationContextFactoryImpl" />
    The application context  where null pointer is occurring

    CDQIApplicationContext context = this.getApplicationContextFactory()
            .getApplicationContext();