Sunday, May 10, 2015

ADF tips

To show results for af:querycomponent when page loads set the below property
autoExecute="true".

Wednesday, December 18, 2013

Use MySQL driver for BIP

A) Download the MySQL JDBC driver and register it with the application server where 
     BI Publisher is running.

Refer below :
 'Oracle® Fusion Middleware Configuring and Managing JDBC Data Sources for Oracle WebLogic Server 11g

http://docs.oracle.com/cd/E23943_01/web.1111/e13737/third_party_drivers.htm#g1054553

Section 'JDBC Drivers Installed with WebLogic Server'

B) See the following notes:

BI Publisher 11g Unable to Connect to TeraData Using TeraData JDBC Drivers

 (Doc ID 1431757.1)

How to Connect To MySQL Databases From BI Publisher Installed by 
OEM (Oracle Enterprise Manager) (Doc ID 1455099.1).

Wednesday, December 11, 2013

Enable EmbeddedHelp-UAP in Fusion Applications

Add the permission to jazn-data.xml to enable Help toggling as given below

Find this node by searching for ".JpsAuthenticatedRoleImpl"
    <grantee>
       <principals>
            <principal>

             <class>
               oracle.security.jps.internal.core.principals.JpsAuthenticatedRoleImpl
             </class>
              <name>authenticated-role</name>
            </principal>
        </principals>
      </grantee>

 

Inside <permissions> node immediately below that grantee node, insert this node:


 <permission>
       <class>oracle.adf.controller.security.TaskFlowPermission</class>
       <name>

        /WEB-INF/oracle/apps/atk/helpPortal/uap/ui/flow/
       AtkHelpPortalUAPHelpToggleTF.xml#AtkHelpPortalUAPHelpToggleTF
       </name>
       <actions>view</actions>
 </permission>


1) Rebuild EAR
2) Redeploy to WLS

Monday, March 12, 2012

JBO-27024: Failed to validate a row with key oracle.jbo.Key

One more jbo error that took long time to figure out the cause(this time its in ADF)
javax.el.ELException: oracle.jbo.RowValException: JBO-27024: Failed to validate a row with key oracle.jbo.Key

Scenario: Adding a new row to a table which will be selected from the LOV popup.
Issue: New row didn't got added but above error is thrown once selected a value from LOV.

From the exception we didn't get any clue.
Debugging in-depth(followed/read the stack trace including the framework classes) figured out this is a deferred exception.

Cause: The real error is triggered when a new row is created and it was thrown in the later stage i.e when rendering the UI.

Fix/Where to look:
1) Check out the alternate key mentioned in the Entity Object will work for new records or not.
2) You might be using a composite key in which one of the attribute is null/invalid value.
3) Any of the validations might have gone for a toss.

Sunday, October 9, 2011

How to update LG O1 P500 from Android Froyo(2.2.1) to Gingerbread(2.3.3)

Step 1) Go to link LG Mobile Phone Support
Step 2) Download the LG Mobile Support Tool to your PC.
Step 3) Run it and double click on 'install drivers'.
Step 4) Now install drivers & LG PC Suite
Step 5) Connect your phone with USB cable and give IMEI number or model.
Step 6) Click on start Updating. Takes some time and phone will be upgraded.
Note: Phone got switched off in my case (Don't know if that was intended.
Step 7) Remove the USB connection and switch on the phone. It takes few minutes to start.
Step 8) Connect phone to PC and close the LG Mobile update Tool, if you have opted for backup it will restore the details.

Monday, January 24, 2011

Constraints of a Database table

Queries used to find the constraints are :-

a) select * from USER_CONSTRAINTS where table_name = &table_name


b) select * from all_constraints where table_name = &table_name


c) select * from all_ind_columns where table_name = &table_name

Tuesday, January 18, 2011

Singleton class in JAVA

Singleton pattern used when we want to allow only a single instance of a class can be created inside our application. Using this pattern ensures that a class only have a single instance by protecting the class creation process, by setting the class constructor into private access modifier.

To get the class instance, the singleton class can provide a method for example a getInstance() method, this will be the only method that can be accessed to get the instance.

01.package new.mypack.sample
02.
03.public class Service {
04. private static Service instance = new Service();
05.
06. private Service() {
07. }
08.
09. public static synchronized Service getInstance() {
10. return instance;
11. }
12.
13. @Override
14. protected Object clone() throws CloneNotSupportedException {
15. throw new CloneNotSupportedException("Clone is not allowed.");
16. }
17.}

There are some rules that need to be followed when we want to implement a singleton.

  1. From the example code above you can see that a singleton has a static variable to keep it sole instance.
  2. You need to set the class constructor into private access modifier. By this you will not allowed any other class to create an instance of this singleton because they have no access to the constructor.
  3. Because no other class can instantiate this singleton how can we use it? the answer is the singleton should provide a service to it users by providing some method that returns the instance, for example getInstance().
  4. When we use our singleton in a multi threaded application we need to make sure that instance creation process not resulting more that one instance, so we add a synchronized keywords to protect more than one thread access this method at the same time.
  5. It is also advisable to override the clone() method of the java.lang.Object class and throw CloneNotSupportedException so that another instance cannot be created by cloning the singleton object.