Results 1 to 3 of 3

Thread: JSF-Spring intergration

  1. #1
    Join Date
    Apr 2005
    Posts
    9

    Default 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. #2
    Join Date
    Apr 2005
    Posts
    9

    Default

    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

  3. #3
    Join Date
    Apr 2005
    Posts
    9

    Default

    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)

Similar Threads

  1. Spring MVC Web Framework versus Struts
    By biguniverse in forum Web Flow
    Replies: 27
    Last Post: Aug 29th, 2012, 03:57 AM
  2. Replies: 5
    Last Post: Aug 9th, 2008, 05:30 AM
  3. A Spring Class Loader?
    By azzoti in forum Architecture
    Replies: 8
    Last Post: May 7th, 2005, 04:02 AM
  4. Replies: 14
    Last Post: Feb 21st, 2005, 05:41 PM
  5. Replies: 2
    Last Post: Jan 21st, 2005, 04:17 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •