Google Analytics

Monday, December 28, 2015

ADF bean property value set


<af:commandButton text="Cancel" id="cbCan" partialSubmit="true"
actionListener="#{pageFlowScope.XxxBean.cancelOrderAL}"
binding="#{pageFlowScope.XxxUIBean.cbCancelOrder}"
partialTriggers="cb1"
disabled="#{!pageFlowScope.XxxBean.isCancelBtnEnable}"/>

Above code button disable logic in XxxUIBean and cbCancelOrder field is encapsulated.

public void setIsCancelBtnEnable(boolean isCancelBtnEnable) {
this.isCancelBtnEnable = isCancelBtnEnable;
}

public boolean isIsCancelBtnEnable() {
return isCancelBtnEnable;
}

Always use setter methods to set values. If we assign values directly to the field, it shows abnormal behavior (In above case one time button disable and another time button enable). Presentation

Wednesday, December 9, 2015

Infinite loop/afrLoop when deploying ADF application


Infinite loop apper when running (intergrated weblogic) the ADF application in development environment. Presentation

Solution:
Clear the browser sessions.

More Details:
http://vtkrishn.com/tag/_afrloop/

Tuesday, December 8, 2015

ADF_FACES-60098 -- RENDER_RESPONSE 6


ADF 11.1.2.4.0 I have faced below errors when run the application

ADF ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase RENDER_RESPONSE 6

he expression "#{bindings}" evaluates to "null". Now using an empty RegionModel

Solution:

When add libraries make sure to check the 'Deployed by Dfault' option. Otherwise it will not aviable in server application deployment folder to refer run time.




C:\MWH\system11.1.2.4.39.64.36.1\o.j2ee\drs\XXXApp\XXXWebApp.war\WEB-INF\lib

Monday, December 7, 2015

ADF: An unreported error occurred in Appc. No errors were reported, but the tool returned a failure result code: 1.

If error occured when deploy the ADF Application (11.1.2.4.0) put below tags in web.xml file.
 An unreported error occurred in Appc. No errors were reported, but the tool returned a failure result code: 1.


<jsp-config>
        <jsp-property-group>
            <url-pattern>*.jsff</url-pattern>
            <is-xml>true</is-xml>
        </jsp-property-group>
</jsp-config>



For mor inforemation:
http://fortunefusionminds.blogspot.com/2014/07/error-unreported-error-occurred-in-appc.html

Wednesday, December 2, 2015

ADF button action not call to bean logics

This type of issue occurs when application logic maintain disable and enable front end field which is required (any) validation applied.

When the application is runs according to the logic disabled field fire with the required validation and runtime front end can't see the validation due to disability of the input field. But validation is already fired and button action not working. Presentation

Tuesday, November 17, 2015

The loading of OPSS java security policy provider failed due to exception

ADF development mode "weblogic.security.SecurityInitializationException: The loading of OPSS java security policy provider failed due to exception" is a common issue that most of the ADF developers face.

Solutions:

1) Disable the virus guard and try. Still issue exists, consider point 2.

2) Close Jdeveloper. Rename the existing DefaultDomain. Open the Jdeveloper. Don't get previous Domain settings to new Domain. Still issue exist, consider point 3.

3) Close Jdeveloper. Find cwallet.sso file under MDW_H\DefaultDomain\config\fmwconfig and give the Admin rights to the file. Open the Jdeveloper. Still issue exists, consider point 4.

4) Close Jdeveloper. Find system-jazn-data.xml corrupted file under MDW_H\DefaultDomain\config\fmwconfig. Replace with newest system-jazn-data.xml file.

>Point 4 is worked for me. In my case jazn-data.xml file size is over 3.5 Mb and seems too big.       Jdeveloper try to merge the Application jazn-data.xml with integrated weblogic system-jazn-data.xml file. 

>If the file application jazn-data.xml file is too big  "java.io.IOException: The process cannot access the file because another process has locked a portion of the file" error occurred and after long time application deploy and run.

>Delete existing application roles to reduce the size. Then remove the application large jazn-data.xml and replace small jazn-data.xml file.

5) Every application deployment jazn-data.xml file overwrite/merge with system-jazn-data.xml file. This error can be stop by avoiding above merging process. Keep setting as below image.





More Details:
https://community.oracle.com/thread/2268436
http://fortunefusionminds.blogspot.com/2014/05/xmlstreamexception-end-document-reached.html

Tuesday, November 10, 2015

Statement cancelled, probably by transaction timing out

According to the below article, Oracle recommond normal(e.g. thin) DB driver over XA drivers. Presentation


In recent days/weeks I'm getting multiple requests with questions of following type: I have a problem with the rollback, I'm working with weblogic 10.3.6. In my application back when I do a rollback, but at the launch of the back gives me this error - java.sql.SQLException: Statement cancelled, probably by transaction timing out and similar. People are facing this issue when they move application to production or test server, on development environment embedded WebLogic everything works fine.

But really this is not an issue at all. What happens is - WebLogic administrators define wrong data source (XA data source). Error is not reproduced on embedded WebLogic, because data source is created automatically for you in development environment. XA data source should be never user with ADF/Fusion applications because it closes all cursors upon commit. Read more here from ADF developer guide - 
41.3.7 What You May Need to Know About JDBC Data Source for Oracle WebLogic Server. [Extracted from below article]

Please refer below article:
http://andrejusb.blogspot.com/2012/05/dont-use-oracles-driver-thin-xa-to.html

ADF Application Infinite Loop

Jsession Id can be set in ADF application to avoid session conflicts. However after change in that it makes infinite loop in URL with security enabled load balanced enviornment.

Below Article explain a solution:

http://www.trumbleshoot.com/home/announcements/adfapplicationinfiniteloopinaclusteredenvironment

ADF Jsession management

If you see below error message when two different contex root ADF applications request:





It may be due to session conflict. ADF use default sessionId and need to change according to the application.

Please see below URL:
http://rohanwalia.blogspot.com/2015/05/change-default-jsession-id-name-for-adf.html




Saturday, November 7, 2015

Clean the ADF session store table PS_TXN

Please follow below url to find out more details. Presentation

http://docs.oracle.com/cd/E12839_01/web.1111/b31974/bcstatemgmt.htm#ADFFD1313

40.5.4 Cleaning Up Temporary Storage Tables

JDeveloper provides the adfbc_purge_statesnapshots.sql script to help with periodically cleaning up the application module state management table. You can find this file in the oracle_common subdirectory of your Oracle Middleware installation directory (for example,ORACLE_HOME\oracle_common\common\sql).
Persistent snapshot records can accumulate over time if the server has been shutdown in an abnormal way, such as might occur during development or due to a server failure. Running the script in SQL*Plus will create the BC4J_CLEANUP PL/SQL package. The two relevant procedures in this package are:
  • PROCEDURE Session_State(olderThan DATE)
    This procedure cleans-up application module session state storage for sessions older than a given date.
  • PROCEDURE Session_State(olderThan_minutes INTEGER)
    This procedures cleans-up application module session state storage for sessions older than a given number of minutes.
You can schedule periodic cleanup of your ADF temporary persistence storage by submitting an invocation of the appropriate procedure in this package as a database job.
You can use an anonymous PL/SQL block like the one shown in Example 40-5 to schedule the execution ofbc4j_cleanup.session_state() to run starting tomorrow at 2:00am and each day thereafter to cleanup sessions whose state is over 1 day (1440 minutes) old.


Extracted from : http://docs.oracle.com/cd/E12839_01/web.1111/b31974/bcstatemgmt.htm#ADFFD1313


Tuesday, November 3, 2015

Oracle ADF Inital Page not loading - Invalid region

Oracle ADF 11.1.2.3.0 page content not show when the page contains too many ADF components.
We can test this by deleting several components and reload the page.

Also initial page load with empty gray page when AM DB data source configuration is wrong or Data source not created in weblogic. Also this may be a reason to invalid region error.

Invalid region error occurred when duplicate component ID exist.


Oracle ADF 11.1.2.4.0 AM Impl methods sometime generate unexpected null pointers .

ADF 11.1.2.4.0 AM Impl class method execution in bean should execute proper way to avoid null pointer exception
in some times (It is obvious that if you not add the method to page def first time, there is a null pointer). This behaviour not seen in 11.1.1.3.0 and 11.1.2.3.0.

Wrong code
Map results = (Map)perationBindingM.execute();

Correct code
perationBindingM.execute();
Map results = (Map)perationBindingM.getResult();

Map results = new HashMap);
try {
operationBindingM.execute();
if((!operationBindingM.getErrors().isEmpty())) {
results.put("ERROR : " + operationBindingM.getErrors());
return results;
} else {
return operationBindingM.getResult() != null ? (Map) operationBindingM.getResult() : null;
}
} catch (Exception e) {
results.put("ERROR", "Exception : "+ e.getMessage());
e.printStackTrace();
return results;
}

Oracle ADF LOV value change listener index selection convert to Value

ADF value change listner directly access index and hard code the valued according to the DB order will make issues when data order is changed. Presentation

String valChangeIndex = valueChangeEvent.getNewValue().toString();

0 - Male
1 - Female

Use as below.

public void aaaVCL(ValueChangeEvent valueChangeEvent) {
String indexValue = null;
if (valueChangeEvent == null || valueChangeEvent.getNewValue() == null) {
indexValue = "0";
} else {
indexValue = valueChangeEvent.getNewValue().toString();
}

String indexValueData =
(String)aaaUtils.evaluateEL("#{bindings.aaaVVO.items['" +
 indexValue + "'].label}");
}

public static Object evaluateEL (String el) {
FacesContext facesContext = FacesContext.getCurrentInstance();
ELContext elContext = facesContext.getELContext();
ExpressionFactory expressionFactory =
facesContext.getApplication().getExpressionFactory();
ValueExpression exp =
expressionFactory.createValueExpression(elContext, el,
Object.class);
return exp.getValue(elContext);
}

Tuesday, October 27, 2015

Why ADF application shows data without executing the VOs when page load

Problem

>>ADF application initial page loading in development enviornment not show any query results and this is the expected behaviour.

ADF version : 11.1.2.4.0

>>However in production enviornment with the load it shows unwated data results in the initial page load.

Solution
In the tuning section of the VO set no rows check box.



Note: This should be enable according to your requirment and only to required VOs. Check any source codes that reseting VOs wthis now rows option.

Additional info:

Monday, October 26, 2015

Find User count and Session Count of the DB



SELECT se.machine, count(1)
FROM v$open_cursor oc, v$session se
WHERE oc.sid = se.sid
GROUP BY se.machine
HAVING COUNT(1) > 2
Order By Count(1) Desc

ADF Performance Tuning

Very usefull web resources for ADF Application /Weblogic Server and datasource tuning


Oracl General 
http://www.oracle.com/technetwork/developer-tools/jdev/index-097578.html

Oracle Fusion Middleware Performance and Tuning Guide
https://docs.oracle.com/cd/E25178_01/core.1111/e10108.pdf

ADF Performance Tuning
https://blogs.oracle.com/groundside/resource/presentations/Mills_ADFPerformance.pdf
1.  Enable DB pooling
2. Increase AM instance Idle Instance Timeout
3. Increase or set to -1, AM instance Time to Live


Leak connection and Reduce Time to Live

Passivation and Activation

ADF Stress Testing
http://www.oracle.com/technetwork/developer-tools/adf/learnmore/adfloadstresstesting-354067.pdf

ADF Logging
https://blogs.oracle.com/groundside/entry/adventures_in_logging_index


Weblogic Database connection configurations
http://xmlandmore.blogspot.com/2012/10/dynamically-sizing-jdbc-connection-pool.html

Thursday, September 24, 2015

ADF error message appears without field name

Senario:




Before:

 <af:panelLabelAndMessage  id="plam13">
               <af:inputText  id="it14"
                          columns="25"          
                          required="true"
                          autoSubmit="true">
              </af:inputText>
 </af:panelLabelAndMessage>

After:

 <af:panelLabelAndMessage label="Promoter ID" id="plam13">
            <af:inputText  id="it14"
                          columns="25"          
                          required="true"
                          autoSubmit="true"
                          label="Promoter ID"
                          simple="true">
            </af:inputText>
 </af:panelLabelAndMessage>












ADF LOV reset the values.

ADF Lov valu can be reset as below (Lov default value set to null) . Presentation

UI component
 

<af:selectOneChoice value="#{bindings.BILLING_CITY.inputValue}"
                              label="#{bindings.BILLING_CITY.label}"
                              shortDesc="#{bindings.BILLING_CITY.hints.tooltip}"
                              id="BILLING_CITY1Id" autoSubmit="true"
                              binding="#{pageFlowScope.xxxBean.billingPostalCode}"
                              showRequired="true">
            <f:selectItems value="#{bindings.BILLING_CITY.items}"
                           id="selectItems1"/>
</af:selectOneChoice>

Bean

setEL("#{bindings.BILLING_CITY.inputValue}",null);


public static void setEL(String el, Object val) {
        FacesContext facesContext = FacesContext.getCurrentInstance();
        ELContext elContext = facesContext.getELContext();
        ExpressionFactory expressionFactory =
            facesContext.getApplication().getExpressionFactory();
        ValueExpression exp =
            expressionFactory.createValueExpression(elContext, el,
                                                    Object.class);

        exp.setValue(elContext, val);
    }

Monday, April 6, 2015

Fix msg=ORA-01882: timezone region not found

This issue occur when Table access via DB link.



First try below link:
http://subu-jdeveloper11gadf.blogspot.in/2012/03/about-occurences-of-timezone-not-found.html

If the first link not support try below:

Add AddVMOption -Duser.timezone=UTC+05:30 to the "jdev.conf" file in oracle installation root>\Middleware\jdeveloper\jdev\bin. Time zone should be region spesific.

Please refer blow link:
http://stackoverflow.com/questions/9156379/ora-01882-timezone-region-not-found