Tuesday, September 25, 2012

ADF Essentials - Quick Technical Review

Finally we have express ADF edition - ADF Essentials, free to use even for production deployment. It includes most of the important ADF features, except ADF Security (this can be implemented with standard Java security). We were discussing idea of express ADF edition on ACE Directors briefings already two years back and Sten Vesterli was one of the strongest advocates for ADF Essentials.

There is lots of hype about free ADF edition, but only time will show how successful it will be. Currently most of the Oracle customers already have WebLogic licenses, so it makes more sense to use full ADF version and avoid sometimes painful ADF setup, configuration and runtime performance monitoring for serious production systems. On the other hand, lighter ADF edition also makes its own sense - we can have much more ADF deployments across enterprise with lower cost.

This post is just a quick review for ADF Essentials on Glassfish. I will do proper performance test soon to compare ADF performance on WebLogic vs. Glassfish. So far, it seems like runtime ADF performance on Glassfish is pretty good, may be because lighter server. I will need to verify how good it scales and how well it works under stress load.

Download sample application for this post - adfessentialstest.zip. This application contains two JDeveloper applications - one main application, another ADF library. I would like to test if ADF region imported from ADF library works. Sample application was deployed to Glassfish server based on instructions from Shay Schmeltzer - Deploying Oracle ADF Essentials Applications to Glassfish.

Main application is up and running on Glassfish server:

There is ADF Library JAR file included into Main application, it contains ADF region:

Main application contains single page with two tabs, imported region is in second tab. First tab contains Master-Detail implementation:

Application is pretty simple, but first thing I noticed WAR deployment archive size - around 60 MB, lots of ADF libraries are packaged into WAR. No wonder Glassfish server goes out of memory after couple of redeployments. ADF Essentials are deployed into Glassfish domain LIB folder, in addition different ADF libraries are included into WAR package as well. In order to decrease WAR size a bit, we can enable compression option (it allows to decrease WAR size by around 15 MB in this case):

Compressed WAR size is 44 MB:

List of ADF libraries in deployment WAR file:

ADF runtime performance on Glassfish was quite good, it looked to me even a bit faster comparing to WebLogic - but I could verify this only after JMeter stress test. Master-Detail data was loading pretty fast:

ADF region imported from ADF library didnt work for me - empty block is rendered:

Region error is reported in Glassfish log:

Important: I have tested the same application on WebLogic server with full ADF - the same imported ADF region from ADF library was rendering correctly. ADF library support formally is available in ADF Essentials, this means we are hitting some bug here.

This proves that there are runtime differences between ADF application running on full ADF and on ADF Essentials. If application runs on full ADF, it doesn't mean it will run on ADF Essentials, it will require additional testing.

UPDATE 26/09/2012: ADF region imported from ADF library works. I did one more redeployment for the main application on Glassfish server - suddenly it works now. I can see ADF region rendered from ADF library:

Probably some parameter was not registered correctly during initial deployment.


mohamedbnh said...

I have just import your application test in my jdev but when i deploy the ViewController to a war the size of file is 5mo i would like to know which librarie choosen in the profile of deploy WEB-INF/lib Contributors, because i have test many time to deploy a fusion project to glassfish but always there is a problem.
And thank you.

Andrejus Baranovskis said...

Sounds like you are deploying on ViewController level, you should deploy from Application deployment archive instead (EAR). Select Glassfish deployment profile.


mohamedbnh said...

I have deploy the application but i got this error :

Unable to add application
POST http://localhost:4848/management/domain/applications/application returned a response status of 403

can you explain me what does mean this error.

Andrejus Baranovskis said...

This is wrong URL, it must include application context path, /faces and main page.


mohamedbnh said...

Sorry but i get this error when i deploy my application from jdev to glassfish, and i have test this url


on my browser and no problem, please can you give me explication and thank you.

Andrejus Baranovskis said...

This means deployment fails, you should check error in Glassfish log.


Anonymous said...

Hi Andrejus,

have you already tried to deploy adf faces demo application (rcf-dvt-demo.war) to Glassfish?

I tried this but without success.
Details see https://forums.oracle.com/forums/message.jspa?messageID=10640574#10640574


Andrejus Baranovskis said...

Nope - I didnt tried that one. However I tired FOD Demo app - it was not working.

Was throwing errors related to EJB, because they have ADF BC exposed as Web Services (this is not supported).

I saw you are getting error related to DVT Managed Beans, it might be this is trying to invoke some ADF Essentials not supported feature.

You should extract that XML and check what it defines.


Anonymous said...

Hi Andrejus,
have you tried to deploy an application that contains declarative components to Glass Fish.
we have tried the same on Tom cat with no success, so i was wondering if it has the same problem on Glass Fish or not

raman deep said...


I have to deploy ADF application on glassfisg server that uses bean data control(consuming web server proxy). I am able to sucessfully deploy it on glassfisg but while running it gives java.lang.ClassCastException: oracle.jbo.mom.DefinitionContextAgeable cannot be cast to oracle.jbo.mom.DefinitionContext error. Can you please suggest how to sucessfully deploy this application?

Aurimas Lacitis said...


I deployed application according to Shay Schmeltzer's instruction succesfully, but when I run
application (localhost:8080/gfadftest) I get HTTP Status 404 error.
There some warnings in glassfish log:
[#|2013-01-22T23:31:31.985+0200|INFO|glassfish3.1.2|oracle.adf.share.config.ADFConfigFactory|_ThreadID=21;_ThreadName=Thread-2;|Calling ADF Config instance implementation: class oracle.adf.share.config.ADFConfigImpl.releaseResources()|#]

[#|2013-01-22T23:31:31.986+0200|INFO|glassfish3.1.2|oracle.adf.share.config.ADFConfigFactory|_ThreadID=21;_ThreadName=Thread-2;|Calling ADF Config instance implementation: class oracle.adf.share.config.ADFConfigImpl.releaseResources()|#]


What might be the reason?

Thank You.

Andrejus Baranovskis said...

I think everything is correct.

You need to append correct path to URL:



fakhri kharrat said...

hi Andrejus,
thanks for the post,

when i run your application an error appears :
oracle.jbo.NoDefException: JBO-29114 ADFContext is not setup to process messages for this exception. Use the exception stack trace and error code to investigate the root

what can be the origin of the error

Bikram Saikia said...

Hi Raman Deep,

Did you find a solution? I am also facing the same issue.


Andrejus Baranovskis said...

This means Glassfish is not configured correctly to run ADF, or you are missing JDBC connection declaration.


Girish Washikar said...

I was able to successfully deploy the app.

I have to create a JDBC resource with name "jdbc/HrDS" in GlassFish Server. (This resource is used by CommonSampleLib and GlassFishTestApp apps). which points to JDBC Connection Pool for HR Schema in XE database.

- Girish

Andrejus Baranovskis said...

Cool. This was my previous suggestion as well.

Thanks for update.


Marc Arbour said...

Hi Andrejus.

I have the same error as Raman has: java.lang.ClassCastException: oracle.jbo.mom.DefinitionContextAgeable cannot be cast to oracle.jbo.mom.DefinitionContext error.

I triple checked my jdbc connection and they are corret. My glassfish server otherwise run adf applications fine but the one I am trying to run.

Do you have any suggestion as to what could be wrong?

Marc Arbour said...

I have found the solution to my problem.

It is posted here: https://community.oracle.com/message/12607236#12607236

Best regards


Andrejus Baranovskis said...

Thanks for update !


Alexandru Matei said...

Isn't there a way to share more jar files instead of bundling them into the EAR file ?

ViewController WAR is 83 MB and the size of the lib folder for the Application is 31 MB.
Therefore the EAR file is about 114 MB

Isn't there any way to share more .jar fils into the Glassfish lib folder instead of packing them each time in the EAR file?

Alexandru Matei said...

Hello Andrejus,

Could you try to deploy your sample web application to GlassFish 4?

I tried and I get the error below

[2014-09-08T16:17:30.264+0300] [glassfish 4.0] [INFO] [] [org.glassfish.admingui] [tid: _ThreadID=127 _ThreadName=admin-listener(8)] [timeMillis: 1410182250264] [levelValue: 800] [[
Exception Occurred :Error occurred during deployment: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: org/jvnet/hk2/component/Habitat.

Depoyment on GlassFish 4 should be possible since this article works for OEPE.


Thank you!

Andrejus Baranovskis said...

I will do it, will put on my TODO list.


Shreesha Bhat said...

To resolve below error while deploying ADF application to Glassfish 4.1 server we need to comment few statements in web.xml and glassfish-web.xml,

Exception Occurred :Error occurred during deployment: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: org/jvnet/hk2/component/Habitat

Please comment or remove below code from web.xml,




and below code from glassfish-web.xml


Application working for me after doing this.

Anonymous said...

Please send me your web.xml and glassfish-web.xml sample.
Did you try ADF 12.2.1 on Glassfish 4?

Andrejus Baranovskis said...

Hi, You can find web.xml inside sample app. No, didnt tried 12.2.1 on Glassfish.


Java Man said...

hi Andrejus

what the situation of using adf 12c with glassfish is there bugs or difference of performance with WL
which oracle mention formal that glassfish is supported option

'Which Servers can I deploy Oracle ADF Essentials on?
Deploying Oracle ADF Essentials applications is supported on
Oracle WebLogic and GlassFish..'