Category Archives: troubleshooting

How to in Jdeveloper ADF Tutorials- Solve No JDBC Connection Error


If you happen to get the JDBC Connection error when you run the Application Module then make sure to check the adf-config.xml property jbo.SQLBuilder which should point to the correct database.

Also check the jbo.sql92.driverclass property for the AM Configuration to refer the class relevant to the DB

ADF Application Troubleshooting Flowchart – Explained


Initial Stage

Debugging the Issue:

Debugging the problem is the important step in finding the problem in ADF Application. If you are able to debug the application flow then there is a possible chance of pointing out the problem in the first place. Debugging help us to understand where and when the problem arises.

In ADF Application you can debug the issue by placing the breakpoints in Java class file and also in Task Flows. To know more about debugging follow this link

If we are able to identify the problem and fix it then its good. otherwise note down the problem and move to next step

Look for Errors:

After debugging the issues we are sure that the outcome will result in

  • What is the problem?
  • Where is the problem occurring?
  • When is the problem occurring?

Most of the time we have the exception thrown to the user or in the console. Its easy foe advanced user to identify theĀ  cause of the issue when the exception or the error is thrown. Also the exceptions that occur will be self explanatory but its hard for newbie to spot the root cause.

Its always advised to find the exception or error for the clear understanding of the problem. So we have to find a way to get these exceptions thrown. These are the qualified places to look for errors and exceptions

  • JDeveloper Console – For integrated server
  • Weblogic Console – if its a standalone deployment

This link will help you to find the errors and also some standard practice to look for exceptions by preparing the application to log the application events using a Logger file.

After seeing the Exceptions

Search for Errors online

By this time you would have got the exception or the error in your hand. So don’t waste time start searching for the error in

  • To Search in Google efficiently follow this link
  • OTN Forum link is here
  • Documentation (11.1.1.6) link is here
  • Oracle Support link is here

Eg. If this is the error that you are getting


oracle.adf.controller.internal.AdfcIllegalStateException: oracle.adf.controller.ControllerException: ADFC-12003: The page flow scope stack is empty.
 at oracle.adfinternal.controller.state.PageFlowStackEntry.getPageFlowScope(PageFlowStackEntry.java:271)
 at oracle.adfinternal.controller.state.ViewPortContextImpl.getCurrentStateInstance(ViewPortContextImpl.java:594)
 at oracle.adfinternal.controller.state.RequestState.setCurrentViewPortContext(RequestState.java:200)
 at oracle.adfinternal.controller.state.ControllerState.setRequestState(ControllerState.java:948)
 at oracle.adfinternal.controller.state.ControllerState.synchronizeStatePart1(ControllerState.java:360)
 at oracle.adfinternal.controller.application.SyncNavigationStateListener.beforePhase(SyncNavigationStateListener.java:127)
 at oracle.adfinternal.controller.lifecycle.ADFLifecycleImpl$PagePhaseListenerWrapper.beforePhase(ADFLifecycleImpl.java:551)
 at oracle.adfinternal.controller.lifecycle.LifecycleImpl.internalDispatchBeforeEvent(LifecycleImpl.java:100)
 at oracle.adfinternal.controller.lifecycle.LifecycleImpl.dispatchBeforePagePhaseEvent(LifecycleImpl.java:147)
 at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener$PhaseInvokerImpl.dispatchBeforePagePhaseEvent(ADFPhaseListener.java:112)
 at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener.beforePhase(ADFPhaseListener.java:59)
 ...

Options to search

  1. oracle.adf.controller.internal.AdfcIllegalStateException (common search term)
  2. oracle.adf.controller.ControllerException (common search term)
  3. ADFC-12003: The page flow scope stack is empty (common search term)
  4. ADFC-12003Ā  – you are widening the scope of the search if the above search term is not helping you
  5. oracle.adfinternal.controller.state.PageFlowStackEntry.getPageFlowScope – this will help you to identify when this problem arises
  6. PageFlowStackEntry.java:271 – strike the hammer at the point

Note: If you want to find issues similar to this in otn then give like ā€˜ADFC-12003 + OTN’

Analysis Stage

You will come to this stage if you are not success with the above approach to identify the issue.

Are you trying some new Feature?

Is this a Connection Problem?

  • Check the connection, and make sure if you are able to connect to the DB properly.
  • Make sure that you have configured the Data Source properly.
  • Is the Databindings.cpx points to the correct application module configuration

Is it a common Java Issue?

  • Class path issue – Check if the libraries are there in the class path and if you have added the libraries to the project.
  • Did you add the correct libraries to the project
  • make sure that you ‘Deploy by Default‘ the libaries that you add
  • Common Exceptions – NullPointerException, ArithmeticException, NumberFormatingException etc
  • If these errors are shown inside the framework then check if you are doing what is expected and you are sure to check how it works.

Is this a common JEE Issue?

  • Deployment issue – this can be related to configurations in web.xml, weblogic.xml or weblogic-application.xml. Check if this can be solved using the parameters, filters or servlet mapping in web.xml
  • Session related issue – This can be again related to web.xml and session handling
  • Transaction issue – configurations related to adfc-config.xml

Configuration Issue?

  • All configuration parameters are here

Page Refresh Issue?

  • Check iterator refresh condition property
  • Check the changeeventpolicy in iterator
  • is the partialsubmit or the autosubmit is working as expected
  • cross check with the immediate property
  • Check the partial triggers property

Security Issue?

  • May be related to jazn-data.xml, is the system-data.xml getting updated with the User and Roles
  • the configurations are done in web.xml, weblogic.xml
  • Check security settings in weblogic server.
  • Check security setting for the folders also, sometimes the server needs full permission for some updates. This may also cause some problem

Intermittent Issue?

  • This may be related to Clustering. Cross check with clustering of ADF Application
  • adf-config.xml has some property for clustering. check that

Memory Issue?

  • Increase the Heap size for the application and try
  • make your application more performance to overcome any memory issues

Data Issue?

  • Check if the DB data is proper
  • Run the query in the back end to make sure that you get the proper result

Change not reflecting?

  • Do a clean build and try to run again. make sure you generate the classes again
  • remove drs folder in system folder or remove the DefaultDomain folder or remove the complete system folder and try from scratch

Not sure about the problem?

  • Cross check our logic,never assume that your logic is correct, try to alter the logic ,ask your peer to review the logic (others will have an extra eye on the problem and the approach)
  • Read the Documentation again to check how the component works and make sure that you completely understand it

Note: Most of the issues listed above are common issues, you will get all related issues when you search online or in Oracle Forums. I believe that Only 5% of the issues can be considered as never experienced by others. So most of the issues that the user experience will be already discussed in the future. So do search the Oracle forums or Google to get your issues solved.

Submission Stage

Post a Forum Question

  • This stage is like you are asking for help from the experts who has some expertise in the area.
  • Wait for the answers, if you are not getting an answer ask for it again one or two times
  • If someone post for your question then try to validate that. Don’t ignore if someone who is not an expert replied to our post. Its better to try all possible ways.
  • If you get an answer, try that and update the post about your findings even if the issue is fixed. This will help some other person who is facing similar issue like you

Raise for help from Oracle

If you have tried all possible options above then you have to wait for Oracle to help you.

  • Raise an SR

Nic tool to keep multiple terminal sessions – Pedorosa


Recently I got to know this tool from my colleague to keep track of multiple terminal sessions under a single view.

For example, imagine you are working on multiple server session and you want to keep track of the session or the server running. search for the log files, tailing log outputs then we will open n number of putty terminals to connect to the server or telnet multiple windows. But how will this be organized under one single window?

That where the software Pedorasa come into picture.

The screenshot of the sample is

you can download this free tool from here

af:selectonechoice not getting updated


Today i had an interesting problem at work. The issue is that the user selects the value from a selectonechoice and moves to the next page and when he returns back to the same old page the selectonechoice is not updated with the value that is selected previously.

the selectonechoice is not bounded to any of the bindings and we manually create the list using the managed bean. here is the base snippet which resembles the problem


selectOneChoice simple="true" value="#{Bean.list.itemNo}" id="soc1" unselectedLabel="Please Select">
 selectItems value="#{Bean.listItems}"/>
 </af:selectOneChoice>

while debugging the value the value is all available but somehow the value is not shown in the selectonechoice. The value is again moves to the “Please Select” option specified in the unselectedLabel when the user moves back to the original page.

couple of things i tried which failed
1)binding to the bean and getting the value

2) having the value as “#{Bean.list[‘itemNo’]}”

finally I got to see the following warning in the log saying

13-Jul-2011 20:27:54 oracle.adfinternal.view.faces.renderkit.core.xhtml.SimpleSelectOneRenderer _getSelectedIndex
WARNING: Could not find selected item matching value "1" in CoreSelectOneChoice[UIXEditableFacesBeanImpl, id=soc1]

This warning gave me a hint to think the problem in a different way and leads to the solution

Actually the list that we are manipulating assigns the value on the fly like


....

List<SelectItem> items = new Arraylist();

...

//inside the method

items.add(new SelectItem(code.getItemlabel(), code.getItemValue()));

....
 

the above code has to rewritten as shown to solve the above mentioned issue


//inside the method

SelectItem item = new SelectIem();

item.setLabel(code.getItemlabel());

item.setValue(code.getItemValue()); //here the value should be an Integer value
//if the value is a String then this has to be like
//item.setValue(Integer.parseInt(code.getItemValue()));
items.add(item);

....
 

oracle.jbo.InvalidOwnerException


oracle.jbo.InvalidOwnerException: JBO-25030: Failed to find or invalidate
owning entity: detail entity Emp, row key oracle.jbo.Key[-5 ].
at oracle.jbo.server.EntityImpl.internalCreate(EntityImpl.java:1048)
at oracle.jbo.server.EntityImpl.create(EntityImpl.java:811)

if you the above exception whn u create master /detail table then do the following

  1. Cascade Update Key Attributes” in association should be checked
  2. In viewRowImpl add
@Override
public void setNewRowState(byte state) {
 if (state != Row.STATUS_INITIALIZED || getNewRowState() != Row.STATUS_NEW) {
 super.setNewRowState(state);
 }
}

oracle.jbo.InvalidOperException: JBO-25011


if you get the following error when you setĀ Access Mode“=”Range Paging” to avoid all theĀ records to be fetched and cached in ADF BC

oracle.jbo.InvalidOperException: JBO-25011: Rowset _LOCAL_VIEW_USAGE_model_EmployeesView_DepartmentsView1_0 is forward only

The “ListRangeSize” property of the List of Value is always set to “-1” Ā contradicting that

  • you are using the “Range Paging” “Access Mode”, you fetches a limited number of records for the View Object
  • you are using the “ListRangeSize” = -1 fetches ALL the records for the List Of Values

so to avoid the above error increase theĀ ListRangeSize property

oracle.jbo.InvalidAttrKindException


If you happen to get the following error while migrating from Jdeveloper 10g to 11g

</p>
<p>oracle.jbo.InvalidAttrKindException: JBO-27034: Invalid kind for attributeĀ &lt;a href=&quot;http://oracle.jbo.invalidattrkindexception/&quot;&gt;&lt;Attribute&lt;/a&gt; Name&gt; from the corresponding superclass attribute.<br />
at oracle.jbo.server.AttributeDefImpl.setBaseDefObject(AttributeDefImpl.java:688)<br />
at oracle.jbo.server.ViewAttributeDefImpl.setBaseDefObject(ViewAttributeDefImpl.java:311)<br />
at oracle.jbo.server.ViewDefImpl.resolveAttrs(ViewDefImpl.java:6537)<br />
at oracle.jbo.server.ViewDefImpl.resolveDefInternal(ViewDefImpl.java:5606)<br />
at oracle.jbo.server.ViewDefImpl.loadFromXML(ViewDefImpl.java:3856)<br />
at oracle.jbo.server.ViewDefImpl.loadFromXML(ViewDefImpl.java:3360)<br />
at oracle.jbo.server.ViewDefImpl.loadFromXML(ViewDefImpl.java:3308)<br />
at oracle.jbo.server.MetaObjectManager.loadFromXML(MetaObjectManager.java:527)<br />
at oracle.jbo.mom.DefinitionManager.loadLazyDefinitionObject(DefinitionManager.java:956)<br />
at oracle.jbo.mom.DefinitionManager.findDefinitionObject(DefinitionManager.java:482)<br />
at oracle.jbo.mom.DefinitionManager.findDefinitionObject(DefinitionManager.java:414)<br />
at oracle.jbo.mom.DefinitionManager.findDefinitionObject(DefinitionManager.java:396)<br />
at oracle.jbo.server.MetaObjectManager.findMetaObject(MetaObjectManager.java:749)<br />
at oracle.jbo.server.ViewDefImpl.findDefObject(ViewDefImpl.java:680)<br />
at oracle.jbo.server.ViewLinkDefImpl.resolveReferences(ViewLinkDefImpl.java:889)<br />
at oracle.jbo.server.ViewLinkDefImpl.findDefObject(ViewLinkDefImpl.java:129)<br />
at oracle.jbo.server.ViewDefImpl.resolveViewLinkAccessorAttribute(ViewDefImpl.java:7471)<br />
at oracle.jbo.server.ViewDefImpl.processViewLinkAccessors(ViewDefImpl.java:7653)<br />
at oracle.jbo.server.ViewDefImpl.processAccessors(ViewDefImpl.java:7462)<br />
at oracle.jbo.server.ViewDefImpl.getAttributeDefImpls(ViewDefImpl.java:733)<br />
at oracle.jbo.server.ViewObjectImpl.initViewAttributeDefImpls(ViewObjectImpl.java:8355)<br />
at oracle.jbo.server.ViewObjectImpl.getAttributeCount(ViewObjectImpl.java:6241)<br />
at oracle.jbo.server.ViewRowSetImpl.ensureStorage(ViewRowSetImpl.java:6520)<br />
at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:1061)<br />
at oracle.jbo.server.ViewRowSetImpl.executeQueryForMasters(ViewRowSetImpl.java:1299)<br />
at oracle.jbo.server.ViewRowSetImpl.executeQueryForMode(ViewRowSetImpl.java:1217)<br />
at oracle.jbo.server.ViewRowSetImpl.executeQuery(ViewRowSetImpl.java:1211)<br />
at oracle.jbo.server.ViewObjectImpl.executeQuery(ViewObjectImpl.java:6097)</p>
<p>

means there is a problem in your data model

  • one of your View Objects extends aĀ superclass View Object,
  • you extend one of the View Object attributes,
  • you define a different type for the extended attribute in the Base and the Superclass VO,Ā ex. Persistent versus Calculated/Transient kind

oracle.jbo.InvalidObjNameException: JBO-25005


oracle.jbo.InvalidObjNameException: JBO-25005: Object name oracle_jbo_uicli_binding_JUIteratorBinding_281 of type Iterator Binding Definition is invalid.
 

the issue is with the filter order in the web.xml as explained in the bug 9880967

the correct order of the JspFilter and ApplSessionFilter in the web.xml is as follows

 <filter-mapping>
 <filter-name>JpsFilter</filter-name>
 <servlet-name>Faces Servlet</servlet-name>
 <dispatcher>FORWARD</dispatcher>
 <dispatcher>REQUEST</dispatcher>
 <dispatcher>INCLUDE</dispatcher>
 </filter-mapping>
 <filter-mapping>
 <filter-name>ApplSessionFilter</filter-name>
 <servlet-name>Faces Servlet</servlet-name>
 <dispatcher>FORWARD</dispatcher>
 <dispatcher>REQUEST</dispatcher>
 </filter-mapping>