Forum Stats

  • 3,826,361 Users
  • 2,260,636 Discussions
  • 7,896,916 Comments

Discussions

How do i debug "ADFc view scope" errors

DrHoneybear
DrHoneybear Member Posts: 36 Green Ribbon

Getting lots of these as we navigate through our app at run-time. Everything seems to work but it's challenging to find 'real errors' when hundreds of these logs are posted in an hour or so.

<oracle.adf.model> <SaveStateTokenListener> <afterPhase> <ADFc: ViewScope not available in this environment, cannot save State-token.> 
<oracle.adf.view> <FacesPageLifecycle> <getToken> <ADFc: ViewScope not available in this environment, cannot restore State-token.> 

I've no idea where to start debugging as I didnt write the app, a team of 5 did, it's huge, and I am an ADF/Jdeveloper N00b.


Help / advice please?

Answers

  • Timo Hahn
    Timo Hahn Senior Principal Technical Consultant - Oracle ACE Director Member, Moderator Posts: 38,457 Red Diamond

    User, tell us your exact JDev version, please!


    You get this error is you use an ADF page outside an properly setup environment. It's the page part of an unbounded taskflow?

    If yes, create an unbounded taskflow and as the page to it. This will initialize the environment and the error should be gone.


    Timo

  • DrHoneybear
    DrHoneybear Member Posts: 36 Green Ribbon

    Sorry,

    JDev 12.2.1.3.0 build JDEVADF_12.2.1.PATCHSETS_GENERIC_170820.0914.S

    I have no idea if the app has any taskflows - how do I find this out?

  • Timo Hahn
    Timo Hahn Senior Principal Technical Consultant - Oracle ACE Director Member, Moderator Posts: 38,457 Red Diamond

    Have you read some of the beginners material from the being started page I mentioned in one of your other threads?

    You need to understand some basic stuff like taskflow (bounded vs. unbounded) to follow any advice. You can look at https://docs.oracle.com/cd/E23943_01/web.1111/b31974/taskflows.htm#ADFFD1631


    Timo

  • DrHoneybear
    DrHoneybear Member Posts: 36 Green Ribbon
    edited Jun 14, 2022 10:20AM

    Yes, but the issue isn't the learning, it is navigating around this enterprise application with hundreds of modules and files. And the application appears to have started off as a faces app but then migrated to ADF but a hybrid of the two. There is no design and little knowledge retained. A team of 5 people supporting it. We are struggling but incrementally learning as we go. Cleary I read documents, manuals, I visit articles and so on, but I wouldn't be here would I if all that had revealed the answers.

    What is more, there do not appear to be any taskflows in this application. It all seems to be button/listener driven. There is no faces-config.xml, no xml files with obvious naming (i.e. flow, task-flow, task etc.,). We do have a single file called design-config.xml which is a JSF Page Flow and Configuration file but this is an ADF app?

    And, I did post this question elsewhere and the only response was "create an unbounded task flow" which I did then the app wouldn't even start due to no end of exceptions and stack traces. So I had to restore a backup of the projects and restart.

    I guess that I am asking for help to diagnose , and not to understand !

  • Timo Hahn
    Timo Hahn Senior Principal Technical Consultant - Oracle ACE Director Member, Moderator Posts: 38,457 Red Diamond

    Well, one can't go without the other. If you don't know what to look for you can't diagnose the problem. We one the other hand, only 'see' what you are telling us.

    The faces-config.xml is only one possible configuration file. The next one to look for is called adf-config.xml and it's the default unbounded taskflow used by ADF applications. The problem is, that you can create your own unbounded taskflow file with a different name. If that is the case, we never find it. You have to find it as you are the one with the sources.

    My wife is to create a new ADF application with two pages and one navigation defined between them. Then you look at the configuration file (adf-config.xml) how things are wired up. Then you search your existing application for something similar.

    Once you found this, you found the taskflow.


    Timo

  • dvohra21
    dvohra21 Member Posts: 14,573 Gold Crown

    And, I did post this question elsewhere and the only response was "create an unbounded task flow" which I did then the app wouldn't even start due to no end of exceptions and stack traces. So I had to restore a backup of the projects and restart.

    Those are the exceptions to fix, not the view scope errors.