Announcement Announcement Module
Collapse
No announcement yet.
JSF-Spring intergration Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • JSF-Spring intergration

    Hi All,
    I am using IBM RAD 6 for building my JSF. I would like to use Spring to integrate with. Based on the following document http://static.springframework.org/sp...riableresolver
    and http://forum.springframework.org/vie...&highlight=jsf , I have the following setup.

    In faces-config.xml
    <application>
    <variable-resolver>org.springframework.web.jsf.DelegatingVar iableResolver</variable-resolver>
    </application>

    In web.xml
    <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>/WEB-INF/applicationContext.xml</param-value>
    </context-param>
    <listener-class>org.springframework.web.context.ContextLoade rListener</listener-class>
    </listener>

    In addition I have upgrades my RAD 6 to include fixpack.
    However, I get the following error:

    java.lang.NullPointerException: Argument Error: One or more parameters are null. VariableResolver null at com.sun.faces.application.ApplicationImpl.setVaria bleResolver(ApplicationImpl.java:434)
    at com.ibm.ws.jsf.configuration.FacesConfigParser.ini tializeApplication(FacesConfigParser.java:868)
    at com.ibm.ws.jsf.configuration.FacesConfigParser.ini tializeConfiguration(FacesConfigParser.java:334)

    Any ideas would be appreciated. TIA.

  • #2
    Resolved by error with the null exception. The spring.jar has to reside in the WEB-INF/lib folder.

    However, moved on to another error...

    thanks

    Comment


    • #3
      Hi, I am getting the following problem with my RAD JSF/Spring.
      0000002f jsf E com.sun.faces.application.ApplicationImpl createAndMaybeStoreManagedBeans Expression Error: Named Object: 'calculator' not found.


      My setup is as follows:
      <faces-config>

      <managed-bean>
      <managed-bean-name>pc_Calculator</managed-bean-name>
      <managed-bean-class>pagecode.Calculator</managed-bean-class>
      <managed-bean-scope>request</managed-bean-scope>
      <managed-property>
      <property-name>delegate</property-name>
      <value>#{calculator}</value>
      </managed-property>
      </managed-bean>

      applicationContext.xml file contains:
      <bean id="calculator" class="com.acme.example.businessdelegate.Calculato rDelegate">
      </bean>

      Calculator.java file contains:
      public void setDelegate(CalculatorDelegate delegate) {
      this.delegate = delegate;
      }

      TIA.

      The rest of the error stack.
      0000002f jsf E com.sun.faces.application.ApplicationImpl createAndMaybeStoreManagedBeans Expression Error: Named Object: 'calculator' not found.
      javax.faces.el.EvaluationException: Expression Error: Named Object: 'calculator' not found.
      at com.sun.faces.config.ManagedBeanFactory.getScopeFo rSingleExpression(ManagedBeanFactory.java:998)
      at com.sun.faces.config.ManagedBeanFactory.hasValidLi fespan(ManagedBeanFactory.java:931)
      at com.sun.faces.config.ManagedBeanFactory.evaluateVa lueBindingGet(ManagedBeanFactory.java:892)
      at com.sun.faces.config.ManagedBeanFactory.setPropert iesIntoBean(ManagedBeanFactory.java:553)
      at com.sun.faces.config.ManagedBeanFactory.newInstanc e(ManagedBeanFactory.java:234)
      at com.sun.faces.application.ApplicationImpl.createAn dMaybeStoreManagedBeans(ApplicationImpl.java:903)
      at com.sun.faces.el.VariableResolverImpl.resolveVaria ble(VariableResolverImpl.java:84)
      at com.ibm.faces.databind.SelectItemsVarResolver.reso lveVariable(SelectItemsVarResolver.java:40)
      at org.springframework.web.jsf.DelegatingVariableReso lver.resolveVariable(DelegatingVariableResolver.ja va:103)

      Comment

      Working...
      X