The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.

Thursday, October 29, 2015

Oracle ADF Jdeveloper 12c Groovy Expression to Generate Sequence no longer works

Until Jdeveloper 12c for supplying primary key to your entity creation you could simply add a groovy expression in the primary key attribute's default expression like:

(new oracle.jbo.server.SequenceImpl("", adf.object.getDBTransaction())).getSequenceNumber()

However, running the same code in Jdeveloper 12 will throw following runtime exception:

General error during semantic analysis: JBO-25152: Calling the constructor for class oracle.jbo.server.SequenceImpl is not permitted.


  • Open EO in the source view.
  • Search for trustMode="untrusted"
  • Change it to trustMode="trusted"
This should work now.

Tuesday, October 27, 2015

Installing Oracle XE on Virtual Box and Accessing it on Mac OS X Yosemite

Oracle XE  is not yet supported on Mac OS X and if you are planning to do any development and required a local DB then you are pretty much out of luck to install it.

Solution?  Install Virtual Box with linux or windows machine and run oracle XE on it. Access it locally from your host os Yosemite in this case. There are two major steps in this.

  1. Installing Virtual box, guest OS and Oracle XE
  2. Configuring it to access Oracle XE from the Mac Yosemite. 

Step 1

  1.  Download latest version of virtual box
  2. For the guest OS and DB either you can individual download the images and install all that or you can use one of the Oracle prebuilt images. They will be a bit larger in size due to some more stuff but will do the job as one step solution. I used Downloads and Instructions
  3. Once you have a everything installed and the image imported you will need to make sure that you can run your XE DB in the guest OS first. Do the following:
    1. from the Applications menu click on "Oracle XE DB --> Start Oracle Database". Wait for few min.
    2. From the same place click on "Run SQL lite terminal"
    3. In the terminal type  connect / sysdba  and this should connect if DB is up and running. 
    4. by default HR schema is installed and locked. So run the following 
      1. alter user hr account unlocked identified by hr
    5. This should do the job and will ensure that it all works fine.

Step 2

  1. Click on the top right corner and enable network on your guest OS (eth0 by default)
  2. Go to Virtual box and installed image settings. Click Network tab and click on Port Forwarding.
  3. Add a new entry here marking as: Host ip: port 1522 guest ip: blank port: 1521 and do ok.
  4. This should now connect to the XE running in guest OS as  hr/hr@localhost:1522:XE (service name)
NOTE: The pre-built image I used in step 1 has the port 1521 unblocked by default. If you are manually doing the step 1 then you would need to unblock the 1521 port by guest OS firewall. You can do that following: http://www.thatjeffsmith.com/archive/2014/03/connecting-to-oracle-from-your-host-to-a-virtualbox-oel-guest/

Thursday, November 7, 2013

Fusion Concepts: Fusion Database Schemas

I authored another post at our official blog FADEVREL on explaining different Fusion Database Schemas.
You can read on this at https://blogs.oracle.com/fadevrel/entry/fusion_concepts_fusion_database_schemas

Friday, July 12, 2013

ADF How-To #1: Exposing an Existing VO Attribute in the UI

A post to describe step by step how to add a new attribute to af:table from a VO using JDeveloper design time customizations