Spring's JSF DelegatingVariableResolver cause InvocationTargetException

Hi,
in our ADF Faces application, as part of the faces-config.xml, we have the following entry:
<variable-resolver>org.springframework.web.jsf.DelegatingVariableResolver</variable-resolver>    The spring.jar file, which contains above class, resides in the WEB-INF/lib
Everything works without any problem on OC4J,JBoss,.... but, when we try to execute application on WebLogic 10.3, the following exceptions occurs:
com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED!
  Source Document: file:/D:/OracleMiddleware/jdeveloper/system/system11.1.1.0.31.51.56/o.j2ee/drs/TEE/tee/WEB-INF/faces-config.xml
  Cause: Unable to create a new instance of 'org.springframework.web.jsf.DelegatingVariableResolver': java.lang.reflect.InvocationTargetException
     at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:211)
     at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:184)
     at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:465)
     at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
     at weblogic.security.service.SecurityManager.runAs(Unknown Source)
     at weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:175)
     at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1784)
     at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:2999)
     at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1371)
     at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:468)
     at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
     at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
     at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
     at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
     at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:117)
     at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
     at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
     at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
     at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
     at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:635)
     at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
     at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:212)
     at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:16)
     at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:162)
     at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
     at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:184)
     at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:361)
     at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:51)
     at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:196)
     at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)
     at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:233)
     at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169)
     at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123)
     at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:173)
     at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89)
     at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
     at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
     at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)What can be a wrong ?

Maxence Button wrote:
=> ship all your implementations in your app (web-inf/lib). Then package into an EAR and add some FilteringClassLoaders to isolate your classes in your application.
(this one is recommended by BEA | Oracle & me :) )
Maxence,
you point me to right direction.
I just put JSF implementation files (jsf-api.jar, jsf-impl.jar) along with spring.jar (which contains my variable-resolver) in the application WEB-INF/lib, and then:
1. in the the weblogic-application.xml, I just added:
    <prefer-application-packages>
        <package-name>javax.faces.*</package-name>
        <package-name>com.sun.faces.*</package-name>
        <package-name>org.springframework.*</package-name>
    </prefer-application-packages>2. manually added one new descriptor, well-know weblogic.xml, with the following entry:
    <container-descriptor>
      <prefer-web-inf-classes>true</prefer-web-inf-classes>
   </container-descriptor>After doing so, no more InvocationTargetException nor ClassNotFoundException
Thanks again,...

Similar Messages

  • Spring JSF DelegatingVariableResolver cause InvocationTargetException

    Hi,
    in our ADF Faces application, as part of the faces-config.xml, we have the following entry:
    <variable-resolver>org.springframework.web.jsf.DelegatingVariableResolver</variable-resolver>    The spring.jar file, which contains above class, resides in the WEB-INF/lib
    Everything works without any problem on OC4J, but, when we try to execute application on WebLogic (default JDeveloper's 11 j2ee server), the following exceptions occurs:
    com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED!
      Source Document: file:/D:/OracleMiddleware/jdeveloper/system/system11.1.1.0.31.51.56/o.j2ee/drs/TEE/tee/WEB-INF/faces-config.xml
      Cause: Unable to create a new instance of 'org.springframework.web.jsf.DelegatingVariableResolver': java.lang.reflect.InvocationTargetException
         at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:211)
         at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:184)
         at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:465)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:175)
         at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1784)
         at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:2999)
         at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1371)
         at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:468)
         at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
         at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
         at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
         at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:117)
         at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
         at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
         at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
         at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:635)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
         at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:212)
         at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:16)
         at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:162)
         at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
         at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:184)
         at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:361)
         at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:51)
         at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:196)
         at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)
         at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:233)
         at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169)
         at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123)
         at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:173)
         at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89)
         at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)What can be wrong ? Something with classpath probably (?) but do not know how to solve this....

    Hi,
    sorry for confusion, I will try to explain in more detail:
    Frank Nimphius wrote:
    Hi,
    reading between the lines - this question is JDeveloper 11 related. Build system11.1.1.0.31.51.56 is production, so you don't have OC4J as you claim. - Yes, this is JDev 11 production related. The same application (written in JDev 11 TP4 with embedded oc4j) works without any problem (on JDev 11 TP4 + oc4j ;-)
    - Now we would like to run the same application in JDev 11 production, where, as you know, WebLogic 10.3 is a application server which executes application
    And there is a problem....

  • Spring hibernate JSF 2.0 Application

    I am trying to deploy application developed using this tutorial http://www.myeclipseide.com/documentation/quickstarts/ME4STutorialScaffoldingJSF/scaffoldingjsfarticle.html to weblogic server and running into all kinds of problem with configuration issues with hiberante properties and persistence.xml files , i was wondering if anybody has links to tutorial or sample project using spring / jsf 2.0 and hibernate developed in jdeveloper
    the sample application works fine in tomcat , not sure how to configure this to weblogic server . trying to rebuild the app in jdeveloper and having problems deploying . my latest error is
    Caused By: org.hibernate.HibernateException: The chosen transaction strategy requires access to the JTA TransactionManager
    if somebody can help me with configurion parameters to connect weblogic server instalation ( ideally to the integratedweblogic server started from jdeveloper) from myeclipseide , that would help as well
    Regards

    Here is an example that concerns running JSF2.0 (it uses NetBeans but you can probably adopt it in JDeveloper as well)
    From the post:
    "You can see that the library reference in weblogic.xml corresponds to the version of the JSF 2.0 JAR that you activated in the Frameworks pane of the New Project wizard."
    <?xml version="1.0" encoding="UTF-8"?>
    <weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/90" xmlns:j2ee="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bea.com/ns/weblogic/90 http://www.bea.com/ns/weblogic/90/weblogic-web-app.xsd">
      <context-root>/WebLogicCustomer</context-root>
      <library-ref>
          <library-name>jsf</library-name>
          <specification-version>2.0</specification-version>
          <implementation-version>1.0.0.0_2-0-2</implementation-version>
          <exact-match>true</exact-match>
      </library-ref>
    </weblogic-web-app>The example uses a libary reference. The library is located: $WL_HOME/common/deployable-libraries/jsf-2.0.war

  • Installing SP 9 for WL5.1 causes InvocationTargetException...

    I'm trying to fix an issue which I suspect may have been covered by one of the
    service packs. So I've followed the instructions for installing SP 9 and have
    restarted my server only to receive the following error (included below). The
    instructions were pretty basic. I copied the sp9boot.jar and the sp9.jar into
    the weblogic lib folder and added sp9boot.jar to my java system classpath in the
    startWeblogic.cmd script and the sp9.jar to my weblogic class path and restarted
    the server only to enjoy to following error...
    (I've included the changes to the startWeblogic.cmd script at the end.)
    I'd be very grateful for any help as I am going to have to back out the SP9 upgrade
    for the moment...
    alan
    Mon Sep 10 10:41:11 PDT 2001:<I> <EJB> 0 deployed, 0 failed to deploy.
    The WebLogic Server did not start up properly.
    Exception raised: java.lang.reflect.InvocationTargetException
    java.lang.reflect.InvocationTargetException: java.lang.NoSuchMethodError
    at weblogic.utils.classloaders.GenericClassLoader.<init>(GenericClassLoader.java:142)
    at weblogic.utils.classloaders.GenericClassLoader.<init>(GenericClassLoader.java:113)
    at weblogic.utils.classloaders.GenericClassLoader.<init>(GenericClassLoader.java:105)
    at weblogic.utils.classloaders.RecursiveReloadOnModifyClassLoader.<init>(RecursiveReloadOnModifyClassLoader.java
    :59)
    at weblogic.utils.classloaders.RecursiveReloadOnModifyClassLoader$SingleSlave.<init>(RecursiveReloadOnModifyClas
    sLoader.java:154)
    at weblogic.servlet.internal.ServletContextImpl.setClassLoader(ServletContextImpl.java:1593)
    at weblogic.servlet.internal.ServletContextImpl.<init>(ServletContextImpl.java:544)
    at weblogic.t3.srvr.HttpServer.initServletContexts(HttpServer.java:559)
    at weblogic.t3.srvr.HttpServer.start(HttpServer.java:442)
    at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:1320)
    at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:832)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.Server.startServerDynamically(Server.java:99)
    at weblogic.Server.main(Server.java:65)
    at weblogic.Server.main(Server.java:55)
    java.lang.NoSuchMethodError
    at weblogic.utils.classloaders.GenericClassLoader.<init>(GenericClassLoader.java:142)
    at weblogic.utils.classloaders.GenericClassLoader.<init>(GenericClassLoader.java:113)
    at weblogic.utils.classloaders.GenericClassLoader.<init>(GenericClassLoader.java:105)
    at weblogic.utils.classloaders.RecursiveReloadOnModifyClassLoader.<init>(RecursiveReloadOnModifyClassLoader.java
    :59)
    at weblogic.utils.classloaders.RecursiveReloadOnModifyClassLoader$SingleSlave.<init>(RecursiveReloadOnModifyClas
    sLoader.java:154)
    at weblogic.servlet.internal.ServletContextImpl.setClassLoader(ServletContextImpl.java:1593)
    at weblogic.servlet.internal.ServletContextImpl.<init>(ServletContextImpl.java:544)
    at weblogic.t3.srvr.HttpServer.initServletContexts(HttpServer.java:559)
    at weblogic.t3.srvr.HttpServer.start(HttpServer.java:442)
    at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:1320)
    at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:832)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.Server.startServerDynamically(Server.java:99)
    at weblogic.Server.main(Server.java:65)
    at weblogic.Server.main(Server.java:55)
    set JAVA_CLASSPATH=.\lib\weblogic510sp9boot.jar;.\classes\boot;.\eval\cloudscape\lib\cloudscape.jar
    set WEBLOGIC_CLASSPATH=.\lib\weblogic510sp9.jar;%JAVA_HOME%\lib\classes.zip;.\license;.\classes;.\lib\weblogicaux.jar;.\myserver\serverclasses;

    Note this message:
    << Note For Windows XP Service Pack 2 Users
    The installation of Service Pack 2 for Windows XP can cause the nVidia GeForce
    FX 5200 OpenGL driver to fail. When launching faceLAB, you will see a message
    stating "nVidia OpenGL Driver Driver Components mismatch. Exit is the only
    option." To fix this, you will need to install the latest version of your
    graphics card driver (available from www.nvidia.com). >>
    Not exactly your environment, but there are obviously problems between XP ServicePack 2 and nVidia OpenGL Drivers.
    Try to download the latest driver, maybe the nvidia website gives further hints.

  • Migration from jsf 1.2  with spring to JSF 2.0

    Hi guys,
    I have a project written with JSF 1.2 and Spring IOC as bean container and i use Tomcat 6.20, now i see that a lot of people try jsf 2.0, my question is what exactly i need to move to JSF 2.0 , i did a little research and found out that i have to implement my own View scope if i use Spring , here is one implementation example http://cagataycivici.wordpress.com/2010/02/17/port-jsf-2-0s-viewscope-to-spring-3-0/.
    have anybody try this solution?
    so from where i have to start migration? is there any step by step document? the system is already in production and i have to evaluate the risks of migration.
    i use myfaces implementation with richfaces and primefaces . will old tags work under jsf 2.0 ? Please provide me with some information .

    so from where i have to start migration? is there any step by step document? the system is already in production and i have to evaluate the risks of migration.Do you actually NEED Jsf 2.0? The application is already working I presume, so it would seem a huge waste of time, money and effort to migrate it without a good reason to do so. If it isn't broken, don't fix it.
    I'd wait until a new application needs to be implemented and then make the choice to use JSF 2.0. A review of all the changes done in JSF 2.0 can be a good place to start to make the decision.

  • ?? Figure out which JSF UIComponent caused a BackingBean "get" method call?

    Hi,
    I have a little problem with using JSF UIComponents and Backing beans.
    I have an JSF Input TextField and this textField points to a backing bean attribute "Data.value" (to store the input). Code:
    <h:inputText styleClass="entryInput"
    id="textNumberOfServersInput"
    value="#{AllData.value}">
    </h:inputText>
    The Backing bean for that looks like this (just the really important stuff):
    public class AllDataBean
    String value = null;
    public String getValue()
    return value;
    public void setValue(String string)
    value = string;
    Now my problem is that, when calling the "getValue()" method I want to know which UIComponent caused that getValue() method call. I would like to know that UIComponent's ID. In the above example (textField) this id would be "textNumberOfServersInput" . HOW CAN I GET THE requesting UIComponent 's ID ?
    At the end my getValue method should look like this:
    public String getValue()
    String requestingUIComponentID = IWouldLikeToKnowThat();
    return value;
    Thanks

    Ahh, that's interesting. But any component can do a get. In other
    words, you can have several components that point to the same bean
    property. Assuming your pages are fairly static in nature, you could
    instrument them with JSTL c:set calls to manually stick an identifier
    into the namespace. Something like this:
    <h:form id="form">
    <c:set var="doAGet" scope="request" value="button" />
    <h:commandButton id="button" value="#{bean.label}" />
    <c:remove var="doAGet" scope="request" />
    <c:set var="doAGet" scope="request" value="text" />
    <h:outputText id="text" value="#{bean.label2}" />
    <c:remove var="doAGet" scope="request" />
    </h:form>
    Then, in your backing bean, you could do:
    public String getLabel() {
    FacesContext context = FacesContext.getCurrentInstance();
    String id = (String)
    context.getExternalContext().getRequestMap().get("button");
    id = "form:" + id;
    UIComponent component = context.getViewRoot().findComponent("id");
    It's clunky but it works. I'll ask the EG if they think we should add
    the ability for the get() to more easily discover the calling component,
    if any.
    Ed (EG Member)

  • How is the processing speed while using struts,spring,and JSF framework

    Hi friends,
    As per earlier technology like Servlets,I mean that there would have much more performance speed than other new technologies like JSP,struts,spring and hibernate framework.Because,in new technologies,flow of processings implicitly via MVC2 basis will probably much more time than older one.
    Total goal is only for attaining MVC2 or any other purpose?
    Please clarify my doubt?
    With Regards,
    Stalin.G

    Home grown applications have a problem in that as more and more features are added, it becomes increasingly impossible to maintain the application and enhance it. This is especially true when the original programmers leave the company. A framework provides a standard design approach that other programmers can hopefully more easily pick up.
    A lot of work has gone into creating these frameworks and they have been used in web sites that have millions of hits from users per day. They have high preformance. Of course, programmers can still write bad code in them that slows down the system. I believe anyone using these frameworks should study them well before using them (such as reading books on them).

  • Use commandLink to forward non-jsf page cause other commandLink invalidate

    Hi :
    I use commandLink to forward to non jsf page , after click the link , it worked , success to 1.jsp. Then I click another link , the other commandLink doesn't work.
    any one have the same problem ?
    JSF page:
    <h:commandLink action="#{MenuHandler.go}">
         <h:outputText value="process" />
         <f:param value="1.jsp" name="forward" />
    </h:commandLink>
    MenuHandler.java
      public static String go() {
                HttpServletRequest req = getRequest();
                String forward = req.getParameter("forward");
                getExternalContext().redirect(forward);
                FacesContext.getCurrentInstance().responseComplete();
                return "success";
      }ps:there is one <h:form/> in my jsf page and I use:
    jdk1.5.0
    jsf-1_1
    Tomcat-5.0.28

    to supplement:
    I found something strange:
    The JSF page I used is for menu purpose.
    So there is a <BASE target="mainFrame"> tag in my JSF page.
    If I mark it . Then other commandLink can work ~~
    Because the page is a menu page , so I can't mark the <BASE target="mainFrame">

  • Web application deployment failure when Mozilla Rhino 15R2 included in war file

    Hi Guys
    I'm currently attempting to deploy a web application under weblogic 6.1.
    The application makes use of Mozilla Rhino15R2, packaged in the file js.jar.
    With js.jar contained in the WEB-INF\lib directory in the war file, the
    application fails to install, the weblogic.log file has the following entry.
    ####<22-Oct-00 09:53:53 BST> <Info> <HTTP> <winnt2> <winnt2> <main> <system>
    <> <101053> <[HTTP winnt2] Loading web app: SWIFTAccessControl>
    ####<22-Oct-00 09:53:53 BST> <Info> <HTTP> <winnt2> <winnt2> <main> <system>
    <> <101059> <[winnt2] Loading SWIFTAccessControl from WAR file:
    I:\bea\wlserver6.1\.\config\mydomain\applications\.wlnotdelete\wl_comp53845.
    war>
    ####<22-Oct-00 09:53:53 BST> <Info> <HTTP> <winnt2> <winnt2> <main> <system>
    <> <101031>
    <[WebAppServletContext(6025277,SWIFTAccessControl,/SWIFTAccessControl)]
    extracting classfiles to
    I:\bea\wlserver6.1\config\mydomain\applications\.wlnotdelete\WEB-INF\_tmp_wa
    r_winnt2_winnt2_SWIFTAccessControl:>
    ####<22-Oct-00 09:53:53 BST> <Debug> <HTTP> <winnt2> <winnt2> <main>
    <system> <> <101158> <Exception thrown while loading SWIFTAccessControl:
    java.lang.IllegalArgumentException: Prefix string too short>
    java.lang.IllegalArgumentException: Prefix string too short
    ####<22-Oct-00 09:53:54 BST> <Error> <J2EE> <winnt2> <winnt2> <main>
    <system> <> <160001> <Error deploying application SWIFTAccessControl: Could
    not load SWIFTAccessControl>
    If I rebuild the war file, excluding js.jar weblogic successfull deploys the
    application and I can access the application. Question has anyone come
    across a similar problem and does any one know of a solution. I'd be most
    grateful for any help on this one.
    Regards
    Tony

    Check this thread...
    Spring's JSF DelegatingVariableResolver cause InvocationTargetException

  • Web Application Deployment Issue in SOA Domain

    I have a web application war file which when deployed in Weblogic 10.3.6 separately works fine.
    When I deploy the same in a SOA domain (_Weblogic 10.3.6 + SOA 11.1.1.6 + OSB 11.1.1.6_), it's throwing the below error.
    In both the cases I am targeting the application to the Adminserver only.
    I am deploying the below files:
    Application war file, jsf-1.2.war and jstl-1.2.war.
    Error:
    <Dec 2, 2012 4:19:59 AM IST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING>
    <Dec 2, 2012 4:19:59 AM IST> <Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode>
    <Dec 2, 2012 4:21:01 AM IST> <Warning> <netuix> <BEA-423420> <Redirect is executed in begin or refresh action. Redirect url is /console/console.portal
    ?_nfpb=true&_pageLabel=AppDeploymentsControlPage.>
    <Dec 2, 2012 4:22:15 AM IST> <Warning> <netuix> <BEA-423420> <Redirect is executed in begin or refresh action. Redirect url is /console/console.portal
    ?_nfpb=true&_pageLabel=LibraryOverviewPage&LibraryOverviewPortlethandle=com.bea.console.handles.AppDeploymentHandle%28%22com.bea%3AName%3Djsf%231.2%40
    1.2.9.0%2CType%3DLibrary%22%29.>
    <Dec 2, 2012 4:22:51 AM IST> <Warning> <HTTP> <BEA-101162> <User defined listener com.sun.faces.config.ConfigureListener failed: com.sun.faces.config.
    ConfigurationException: CONFIGURATION FAILED!
    Source Document: file:/C:/Oracle/Middleware/user_projects/domains/SOA_domain/servers/AdminServer/tmp/_WL_user/MI/nkgdo/war/WEB-INF/faces-config.xml
    Cause: Class 'org.springframework.web.jsf.DelegatingVariableResolver' is missing a runtime dependency: java.lang.NoClassDefFoundError: javax/faces/el/VariableResolver.
    com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED!
    Source Document: file:/C:/Oracle/Middleware/user_projects/domains/SOA_domain/servers/AdminServer/tmp/_WL_user/MI/nkgdo/war/WEB-INF/faces-config.xml
    Cause: Class 'org.springframework.web.jsf.DelegatingVariableResolver' is missing a runtime dependency: java.lang.NoClassDefFoundError: javax/faces/e
    l/VariableResolver
    at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:215)
    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:196)
    at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:481)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    Truncated. see log file for complete stacktrace
    Caused By: com.sun.faces.config.ConfigurationException:
    Source Document: file:/C:/Oracle/Middleware/user_projects/domains/SOA_domain/servers/AdminServer/tmp/_WL_user/MI/nkgdo/war/WEB-INF/faces-config.xml
    Cause: Class 'org.springframework.web.jsf.DelegatingVariableResolver' is missing a runtime dependency: java.lang.NoClassDefFoundError: javax/faces/e
    l/VariableResolver
    at com.sun.faces.config.processor.AbstractConfigProcessor.createInstance(AbstractConfigProcessor.java:253)
    at com.sun.faces.config.processor.ApplicationConfigProcessor.addVariableResolver(ApplicationConfigProcessor.java:481)
    at com.sun.faces.config.processor.ApplicationConfigProcessor.process(ApplicationConfigProcessor.java:239)
    at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:108)
    at com.sun.faces.config.processor.LifecycleConfigProcessor.process(LifecycleConfigProcessor.java:119)
    Truncated. see log file for complete stacktrace
    >
    <Dec 2, 2012 4:22:51 AM IST> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1354402363881' for task
    '4'. Error is: 'weblogic.application.ModuleException: '
    weblogic.application.ModuleException:
    at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1520)
    at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:484)
    at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
    at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
    Truncated. see log file for complete stacktrace
    Caused By: com.sun.faces.config.ConfigurationException:
    Source Document: file:/C:/Oracle/Middleware/user_projects/domains/SOA_domain/servers/AdminServer/tmp/_WL_user/MI/nkgdo/war/WEB-INF/faces-config.xml
    Cause: Class 'org.springframework.web.jsf.DelegatingVariableResolver' is missing a runtime dependency: java.lang.NoClassDefFoundError: javax/faces/e
    l/VariableResolver
    at com.sun.faces.config.processor.AbstractConfigProcessor.createInstance(AbstractConfigProcessor.java:253)
    at com.sun.faces.config.processor.ApplicationConfigProcessor.addVariableResolver(ApplicationConfigProcessor.java:481)
    at com.sun.faces.config.processor.ApplicationConfigProcessor.process(ApplicationConfigProcessor.java:239)
    at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:108)
    at com.sun.faces.config.processor.LifecycleConfigProcessor.process(LifecycleConfigProcessor.java:119)
    Truncated. see log file for complete stacktrace
    >
    <Dec 2, 2012 4:22:51 AM IST> <Error> <Deployer> <BEA-149202> <Encountered an exception while attempting to commit the 1 task for the application 'MI'.
    >
    <Dec 2, 2012 4:22:51 AM IST> <Warning> <Deployer> <BEA-149004> <Failures were detected while initiating deploy task for application 'MI'.>
    <Dec 2, 2012 4:22:51 AM IST> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
    weblogic.application.ModuleException: :com.sun.faces.config.ConfigurationException:
    Source Document: file:/C:/Oracle/Middleware/user_projects/domains/SOA_domain/servers/AdminServer/tmp/_WL_user/MI/nkgdo/war/WEB-INF/faces-config.xml
    Cause: Class 'org.springframework.web.jsf.DelegatingVariableResolver' is missing a runtime dependency: java.lang.NoClassDefFoundError: javax/faces/e
    l/VariableResolver
    at com.sun.faces.config.processor.AbstractConfigProcessor.createInstance(AbstractConfigProcessor.java:253)
    at com.sun.faces.config.processor.ApplicationConfigProcessor.addVariableResolver(ApplicationConfigProcessor.java:481)
    at com.sun.faces.config.processor.ApplicationConfigProcessor.process(ApplicationConfigProcessor.java:239)
    at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:108)
    at com.sun.faces.config.processor.LifecycleConfigProcessor.process(LifecycleConfigProcessor.java:119)
    Truncated. see log file for complete stacktrace
    >
    <Dec 2, 2012 4:22:51 AM IST> <Error> <Console> <BEA-240003> <Console encountered the following error weblogic.application.ModuleException: :com.sun.fa
    ces.config.ConfigurationException:
    Source Document: file:/C:/Oracle/Middleware/user_projects/domains/SOA_domain/servers/AdminServer/tmp/_WL_user/MI/nkgdo/war/WEB-INF/faces-config.xml
    Cause: Class 'org.springframework.web.jsf.DelegatingVariableResolver' is missing a runtime dependency: java.lang.NoClassDefFoundError: javax/faces/e
    l/VariableResolver
    at com.sun.faces.config.processor.AbstractConfigProcessor.createInstance(AbstractConfigProcessor.java:253)
    at com.sun.faces.config.processor.ApplicationConfigProcessor.addVariableResolver(ApplicationConfigProcessor.java:481)
    at com.sun.faces.config.processor.ApplicationConfigProcessor.process(ApplicationConfigProcessor.java:239)
    at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:108)
    at com.sun.faces.config.processor.LifecycleConfigProcessor.process(LifecycleConfigProcessor.java:119)
    at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:108)
    at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:132)
    at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:205)
    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:196)
    at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:481)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:181)
    at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1868)
    at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3154)
    at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1518)
    at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:484)
    at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
    at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
    at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
    at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:247)
    at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
    at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
    at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
    at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:671)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
    at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:212)
    at weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:44)
    at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
    at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
    at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569)
    at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:150)
    at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:116)
    at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323)
    at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:844)
    at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1253)
    at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:440)
    at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:163)
    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java
    :195)
    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:13)
    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:68)
    at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:545)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
    >

    Check this thread...
    Spring's JSF DelegatingVariableResolver cause InvocationTargetException

  • Spring-jsf: "wiring datasource"-code looks correct, yet not working...why?

    The "applicationContext.xml" appears to be correctly configured to "wire" the datasource to the bean...
    But, unfortunately, this simple app does not work...Error message reports "dataSource is required"...
    The code/configuration I'm using reflects -- to the best of my knowledge -- the examples I've seen in books and online...
    Its apparent that I am misunderstanding some fundamental concept....
    Any help pointing out the critical flaw would be much appreciated!
    Thanks in advance!
    jw
    applicationContext.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
    <beans>
    <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
    <property name="driverClassName"><value>oracle.jdbc.OracleDriver</value></property>
    <property name="url"><value>jdbc:oracle:thin:@localhost:1521:ORCL</value></property>
    <property name="username"><value>scott</value></property>
    <property name="password"><value>tiger</value></property>
    </bean>
    <bean id="jsp1Bean" class="testjsf01.Jsp1Bean">
    <property name="dataSource"><ref bean="dataSource"/></property>
    </bean>
    </beans>
    Jsp1Bean class:
    package testjsf01;
    import org.springframework.jdbc.core.*;
    import org.springframework.jdbc.core.support.JdbcDaoSupport;
    import org.springframework.jdbc.datasource.DriverManagerDataSource;
    import org.springframework.beans.factory.xml.XmlBeanFactory;
    import org.springframework.core.io.*;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import javax.sql.DataSource;
    import java.util.ArrayList;
    import javax.faces.model.DataModel;
    import javax.faces.model.ListDataModel;
    public class Jsp1Bean extends JdbcDaoSupport
    private JdbcTemplate template;
    private DriverManagerDataSource dataSource;
    public Jsp1Bean ()
    public void setDataSource (DriverManagerDataSource dataSource)
    this.dataSource = dataSource;
    public DataModel getDataModel1() throws Exception
    final ArrayList outList = new ArrayList();
    template = new JdbcTemplate(dataSource);
    class RowCallbackHandlerImpl implements RowCallbackHandler
    public void processRow(ResultSet rs) throws SQLException
    ArrayList sublist = new ArrayList();
    sublist.add(rs.getString(1));
    sublist.add(rs.getString(2));
    sublist.add(rs.getString(3));
    outList.add(sublist);
    template.query("select a.empno, a.ename, a.job from scott.emp a", new RowCallbackHandlerImpl());
    return new ListDataModel(outList);
    web.xml:
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    <context-param>
    <param-name>com.sun.faces.verifyObjects</param-name>
    <param-value>true</param-value>
    </context-param>
    <context-param>
    <param-name>com.sun.faces.validateXml</param-name>
    <param-value>true</param-value>
    </context-param>
    <context-param>
    <param-name>javax.faces.CONFIG_FILES</param-name>
    <param-value>/WEB-INF/faces-config.xml</param-value>
    </context-param>
    <context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>client</param-value>
    </context-param>
    <listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>
    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.faces</url-pattern>
    </servlet-mapping>
    <session-config>
    <session-timeout>30</session-timeout>
    </session-config>
    <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
    <taglib>
    <taglib-uri>/spring</taglib-uri>
    <taglib-location>/WEB-INF/tlds/spring.tld</taglib-location>
    </taglib>
    </web-app>
    faces-context.xml:
    <?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN" "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
    <faces-config>
    <application>
    <variable-resolver>org.springframework.web.jsf.DelegatingVariableResolver</variable-resolver>
    </application>
    <managed-bean>
    <managed-bean-name>jsp1Bean</managed-bean-name>
    <managed-bean-class>testjsf01.Jsp1Bean</managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    </faces-config>
    Error messages:
    Mar 17, 2006 1:08:10 PM org.apache.catalina.core.StandardWrapperValve invoke
    SEVERE: Servlet.service() for servlet Faces Servlet threw exception
    javax.faces.el.EvaluationException: javax.faces.el.EvaluationException: Error getting property 'dataModel1' from bean of type testjsf01.Jsp1Bean: java.lang.IllegalArgumentException: dataSource is required
    at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:206)
    at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:154)
    at javax.faces.component.UIData.getValue(UIData.java:527)
    at javax.faces.component.UIData.getDataModel(UIData.java:856)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
    at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
    at java.lang.Thread.run(Thread.java:595)
    Caused by: javax.faces.el.EvaluationException: Error getting property 'dataModel1' from bean of type testjsf01.Jsp1Bean: java.lang.IllegalArgumentException: dataSource is required
    at com.sun.faces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:89)

    Ok, I got this fixed. Turns out it didn't like being inside a <rich:columnGroup>. Removed that and it's working.

  • Getting error in simple Jsf-Spring Integration

    Hi,
    I am getting error in setting class attribute through Spring when I am integrating spring1.2 and jsf 1.1. Alone JSF is working fine.
    The error I am getting is
    Class org.springframework.web.jsf.DelegatingVariableResolver is no javax.faces.el.VariableResolverI m using JSF1.1, Spring 1.2 and jdk 1.4
    How I did is I added a class First.java initialized by application.xml as follows
    <beans>
         <bean id="first" class="com.tst.beans.First" >
         <property name="name">
              <value type="java.lang.String">abc</value>
         </property></bean>
    </beans>I have added Delegating Variable resolver and other stuff in faces-config.xml as follows
        <application>
    <variable-resolver>org.springframework.web.jsf.DelegatingVariableResolver</variable-resolver>
          <locale-config>
            <default-locale>en</default-locale>
          </locale-config>
          <message-bundle>com.Messages</message-bundle>
        </application>
         <navigation-rule>
              <from-view-id>/third.jsp</from-view-id>
         </navigation-rule>
         <managed-bean>
              <managed-bean-name>secBean</managed-bean-name>
            <managed-bean-class>com.tst.beans.SecBean</managed-bean-class>
              <managed-bean-scope>session</managed-bean-scope>
              <managed-property>
                   <property-name>ft</property-name>
                   <value>#{first}</value>
              </managed-property>
         </managed-bean>In web.xml I did the following change for Spring
      <context-param>
        <param-name>javax.faces.CONFIG_FILES</param-name>
        <param-value>/WEB-INF/faces-config.xml</param-value>
      </context-param>
          <!--Loads Spring application context upon application startup.-->
      <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>/WEB-INF/applicationContext.xml</param-value>
    </context-param>
      <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
      </servlet>
           <servlet>
                 <servlet-name>SpringContextServlet</servlet-name>
                    <servlet-class>org.springframework.web.context.ContextLoaderServlet</servlet-class>      
                <load-on-startup>1</load-on-startup>
         </servlet>
      I added this first class in backing bean as a property. My faces-config.xml code is
              <managed-bean>
              <managed-bean-name>EducInfo</managed-bean-name>
              <managed-bean-class>
                   com.view.beans.StudentEducInfo
              </managed-bean-class>
                    <managed-property>
                   <property-name>ft</property-name>
                   <value>#{first}</value>
              </managed-property>and in JSP page, I called the managed property as
    <h:outputText value="#{secBean.ft.name}" ></h:outputText>Any pointers? Any workaround would also be highly appreciated
    Regards,
    Arsalan

    There is a working apache example in the SVN...might be worth taking a look at that.

  • JSF/Spring integration - managed-property problem

    I am using JSF 1.1_01 (MyFaces 1.1), Spring 1.2, Ajax4Jsf.
    The JSF application has h:selectOneMenu .
    On change event of h:selectOneMenu sets "selectedValue" into backing bean as shown below:
    page.jsp
    <h:selectOneMenu value="#{test.selectedDevice}" >
    <f:selectItem itemValue="0" itemLabel="--New--"/>
    <f:selectItem itemValue="1" itemLabel="WorkStation"/>
    <f:selectItem itemValue="2" itemLabel="Router"/>
    <f:selectItem itemValue="3" itemLabel="Switch"/>
    <ajax:support action="#{test.loadDevice}" event="onchange" reRender="t2,t3,t4,t5"/>
    </h:selectOneMenu>
    TestBean.java (Backing Bean)
    public String getSelectedDevice() {
    logger.info(" *** In getSelectedDevice *** ");
    if (selectedDevice == null) {
    selectedDevice = "0"; // This will be the default selected item.
    return selectedDevice;
    public void setSelectedDevice(String selectedDevice) {
    logger.info(" *** In setSelectedDevice *** ");
    this.selectedDevice = selectedDevice;
    Here are the configuration file snippets for integrating JSF Spring
    web.xml
    <listener>
    <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
    </listener>
    <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>/WEB-INF/applicationContext.xml</param-value>
    </context-param>
    faces-config.xml
    <application>
    <variable-resolver>org.springframework.web.jsf.DelegatingVariableResolver</variable-resolver>
    </application>
    <managed-bean>
    <managed-bean-name>test</managed-bean-name>
    <managed-bean-class>test.TestBean</managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
    <managed-property>
    <property-name>deviceManager</property-name>
    <property-class> test.DeviceTypeManager </property-class>
    <value>#{deviceManager}</value>
    </managed-property>
    </managed-bean>
    The above code results in the following error
    javax.faces.FacesException: Cannot get value for expression '#{test.selectedDevice}'
    The error occurs only if i include <managed-property> inside the <managed-bean> in faces-config.xml.
    The moment i remove <managed-property> from face-config.xml the error disappears & page gets rendered properly.
    The purpose in having <managed-property> inside managed-bean is to call Spring's Manager class (i.e. deviceManager) from JSF application
    Any pointers/suggestions in resolving the error will be highly appreciated
    Regards
    Bansi

    The TestBean have a property for DeviceManager along with setter/getter methods as shown below. Sorry for not including in earlier posting
    TestBean.java (Backing Bean)
    private DeviceTypeManager deviceManager;
    public DeviceTypeManager getDeviceManager() {
         return deviceManager;
    public void setDeviceManager(DeviceTypeManager deviceManager) {
         this.deviceManager = deviceManager;
    Here are the two scenarios
    Scenario 1 : without <managed-property> the code works fine
    Scenario 2 : with <managed-property> the code results in following error
    javax.faces.FacesException: Cannot get value for expression '#{test.selectedDevice}'
    Scenario 1 has only JSF whereas Scenario 2 has JSF-Spring integration
    The Scenario 1 works absolutely fine as the expression '#{test.selectedDevice}' gets its value from setter/getter method in the backing bean(TestBean.java) . This is expected behaviour & wondering why it doesn't work similarly in Scenario 2 instead it complains
    Cannot get value for expression '#{test.selectedDevice}'
    I am willing to upload the war file. Any pointers/suggestions in resolving the error will be highly appreciated
    Regards
    Bansi

  • JSF/Tiles/Spring Integration Problem

    Hi,
    I have a JSF based web application, which uses Struts Tiles framework through the view-handler "org.apache.myfaces.tomahawk.application.jsp.JspTi lesViewHandlerImpl". Now I am trying to integrate this with the Spring framework by making use of the variable-resolver "org.springframework.web.jsf.DelegatingVariableRes olver". With this, when I try to access a page, (whose backing bean gets injected with Spring beans) I get the following exception:
    javax.faces.el.EvaluationException: Expression Error: Named Object: 'userSession' 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.ApplicationAssociate.cre ateAndMaybeStoreManagedBeans(ApplicationAssociate. java:253)
    at com.sun.faces.el.VariableResolverImpl.resolveVaria ble(VariableResolverImpl.java:79)
    at org.springframework.web.jsf.DelegatingVariableReso lver.resolveVariable(DelegatingVariableResolver.ja va:108)
    at com.sun.faces.el.impl.NamedValue.evaluate(NamedVal ue.java:125)
    at com.sun.faces.el.impl.ComplexValue.evaluate(Comple xValue.java:146)
    at com.sun.faces.el.impl.ExpressionEvaluatorImpl.eval uate(ExpressionEvaluatorImpl.java:244)
    at com.sun.faces.el.ValueBindingImpl.getValue(ValueBi ndingImpl.java:173)
    at com.sun.faces.el.ValueBindingImpl.getValue(ValueBi ndingImpl.java:154)
    at javax.faces.component.UIOutput.getValue(UIOutput.j ava:147)
    at com.sun.faces.renderkit.html_basic.HtmlBasicInputR enderer.getValue(HtmlBasicInputRenderer.java:82)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRender er.getCurrentValue(HtmlBasicRenderer.java:191)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRender er.encodeEnd(HtmlBasicRenderer.java:169)
    at javax.faces.component.UIComponentBase.encodeEnd(UI ComponentBase.java:712)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRender er.encodeRecursive(HtmlBasicRenderer.java:443)
    at com.sun.faces.renderkit.html_basic.GridRenderer.en codeChildren(GridRenderer.java:233)
    at javax.faces.component.UIComponentBase.encodeChildr en(UIComponentBase.java:693)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRender er.encodeRecursive(HtmlBasicRenderer.java:435)
    at com.sun.faces.renderkit.html_basic.GridRenderer.en codeChildren(GridRenderer.java:233)
    at javax.faces.component.UIComponentBase.encodeChildr en(UIComponentBase.java:693)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRender er.encodeRecursive(HtmlBasicRenderer.java:435)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRender er.encodeRecursive(HtmlBasicRenderer.java:440)
    at com.sun.faces.renderkit.html_basic.GridRenderer.en codeChildren(GridRenderer.java:233)
    at javax.faces.component.UIComponentBase.encodeChildr en(UIComponentBase.java:693)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRender er.encodeRecursive(HtmlBasicRenderer.java:435)
    at com.sun.faces.renderkit.html_basic.GridRenderer.en codeChildren(GridRenderer.java:233)
    at javax.faces.component.UIComponentBase.encodeChildr en(UIComponentBase.java:693)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRender er.encodeRecursive(HtmlBasicRenderer.java:435)
    at com.sun.faces.renderkit.html_basic.GridRenderer.en codeChildren(GridRenderer.java:233)
    at javax.faces.component.UIComponentBase.encodeChildr en(UIComponentBase.java:693)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRender er.encodeRecursive(HtmlBasicRenderer.java:435)
    at com.sun.faces.renderkit.html_basic.GridRenderer.en codeChildren(GridRenderer.java:233)
    at javax.faces.component.UIComponentBase.encodeChildr en(UIComponentBase.java:693)
    at javax.faces.webapp.UIComponentTag.encodeChildren(U IComponentTag.java:600)
    at javax.faces.webapp.UIComponentTag.doEndTag(UICompo nentTag.java:537)
    at com.sun.faces.taglib.html_basic.PanelGridTag.doEnd Tag(PanelGridTag.java:460)
    at org.apache.jsp.WEB_002dINF.layout.jsf_002dlayout_j sp._jspx_meth_h_panelGrid_0(jsf_002dlayout_jsp.jav a:269)
    at org.apache.jsp.WEB_002dINF.layout.jsf_002dlayout_j sp._jspx_meth_h_form_0(jsf_002dlayout_jsp.java:222 )
    at org.apache.jsp.WEB_002dINF.layout.jsf_002dlayout_j sp._jspx_meth_f_view_0(jsf_002dlayout_jsp.java:188 )
    at org.apache.jsp.WEB_002dINF.layout.jsf_002dlayout_j sp._jspService(jsf_002dlayout_jsp.java:99)
    at org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:97)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:810)
    at org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:332)
    at org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:314)
    at org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:264)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:810)
    I could get the application work with JSF and Spring, without Tiles.
    Appreciate any help in this regard.
    Thanks

    I'm assuming that since you are using JSF and Tiles, you are not using Spring's web framework. In that case, the integration of Spring with JSF is relatively trivial and you can neglect it for now. You might want to try the link below, if you are feeling lucky:
    http://www.google.com/search?q=myfaces+tiles

  • DelegatingVariableResolver not resolving Spring beans

    I'm developing an application using ADF UI + Spring using Jdveloper11g and deploying it to Weblogic 10.3. I'm creating beans in Spring and injecting them into ADF as managed beans(via faces-config.xml). My faces-config.xml looks like:
    -------------snip-----------------------
    <?xml version="1.0" encoding="windows-1252"?>
    <faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee">
    <application>
    <default-render-kit-id>oracle.adf.rich</default-render-kit-id>
    <variable-resolver>org.springframework.web.jsf.DelegatingVariableResolver</variable-resolver>
    </application>
    <managed-bean>
    <managed-bean-name>engineAspect</managed-bean-name>
    <managed-bean-class>com.x.EngineAspect</managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
    <managed-property>
    <property-name>engineAspect</property-name>
    <value>#{engineAspect}</value>
    </managed-property>
    </managed-bean>
    </faces-config>
    -------------snip-----------------------
    I'm using a backing bean to call a method on the engineAspect bean when some action happens in the UI. But, the line System.out.println(engineAspect); in the backing bean always prints a null. The backing bean has getter and setter for this field. Yet, the bean is not resolved from Spring. Any ideas what may be missing from the configuration?

    Miku wrote:
    I have a situation where I need to use spring beans from an EJB 3.0 MDB. The project does not have any webapps or anything,
    it will be only a MessageBean facade that needs to call spring beans. It is meant to be a service, that can be called by usign a single EJB message. Why not make it a real service? Spring's contract first web services are a very nice way to go. It hides the fact that you're using a message-driven component for processing, too.
    %

Maybe you are looking for