Friday, May 09, 2014

Reset/Recreate Jdeveloper Integrated Weblogic server

JDeveloper integrated Weblogic server is an indispensable tool when we develop our ADF applications but quite often it stops working properly without any rational reasons. It's useful in these cases to reset it and let Jdeveloper to rebuild and re-configure it.
To do that you just need to stop Jdeveloper and delete DefaultDomain.

DefaultDomain is located inside jdeveloper configuration folder, you can locate the right folder from Jdeveloper menu looking at:

Help --> About -->Properties
under the property name: ide.system.dir



The first time you Run your ADF application, JDev will re-create Weblogic Domain and will ask you to prompt Weblogic configuration details.

Sunday, November 03, 2013

Overriding Yum "User-Agent" header

Last week I spent many hours figuring out why I couldn't use YUM successfully in my company network any more. Every YUM command I tried to run I always got the error:

[Errno 14] HTTP Error 503: Service Unavailable
Trying other mirror.

All the mirrors URL were working fine throughout an internet browser like Firefox or Chrome and I was pretty sure any proxy hadn't been implemented in the network, the only reason could be the Firewall.
Googling I found a possible reason could be that the Firewall was blocking specific "User-Agent" header, or more in general, blocking all the connection without a valid "User-Agent" header.
Digging deeper I discovered that YUM "User-Agent" header is managed in the file 

 /usr/lib/python2.6/site-packages/yum/yumRepo.py

said that, I just modified this line from:

'user_agent': default_grabber.opts.user_agent,

to:

 'user_agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:10.0.5) Gecko/20120605 Firefox/10.0.5',

Et voilĂ , YUM is now working fine again!
Of course you can get the trick using any valid browser "User-Agent" header.

Remember to do the trick again every time you update YUM it self.

I don't know if this is the best workaround, but it worked for me and my network configuration.

Hope you find it useful

Emilio


Tuning Oracle Webcenter editing web.xml

As part of you know, there are many parameters in web.xml that have an important impact on performance for Webcenter Portal applications ( Spaces and CustomPortal).

This is the list of the parameters are considered to improve performance:


Parameters
Value
org.apache.myfaces.trinidad.CLIENT_STATE_MAX_TOKENS
3
org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION
FALSE
org.apache.myfaces.trinidad.DISABLE_CONTENT_COMPRESSION
FALSE
oracle.adf.view.rich.pprNavigation.OPTIONS
onWithForcePPR
org.apache.myfaces.trinidad.COMPRESS_VIEW_STATE
on
oracle.adf.view.rich.versionString.HIDDEN
TRUE
org.apache.myfaces.trinidad.DEBUG_JAVASCRIPT
FALSE
javax.faces.STATE_SAVING_METHOD
client
oracle.adf.view.rich.libraryPartitioning.ENABLED
TRUE
org.apache.myfaces.trinidad.resource.DEBUG
FALSE
oracle.adf.view.rich.ASSERT_ENABLED
FALSE
org.apache.myfaces.trinidad.CACHE_VIEW_ROOT
TRUE


Steps to edit web.xml file

  1. Navigate to your Oracle WebCenter Portal home directory, usually something like /u01/app/oracle/product/fmw/Oracle_WC1
  2. Open the Spaces EAR file:
  3. mkdir -p /tmp/my_ear
  4. cd /tmp/my_ear
  5. jar -xvf $WEBCENTER_HOME/archives/applications/webcenter.ear
  6. mkdir war
  7. cd war
  8. jar -xvf ../spaces.war
  9. Edit WEB-INF/web.xml and save the changes.
  10. Create a modified .EAR file with the required web.xml properties.
  11. cd /tmp/my_ear/war
  12. jar -cvf ../spaces.war *
  13. cd ..
  14. rm -rf war
  15. jar -cvf ../webcenter.ear *
  16. Backup $WEBCENTER_HOME/archives/applications/webcenter.ear
  17. Copy /tmp/webcenter.ear to $WEBCENTER_HOME/archives/applications/webcenter.ear.
  18. In case of cluster environment repeat step 1-17 on all the nodes.
  19. Restart all  WC_Spaces managed servers.

At startup, the newer application is automatically deployed with the modified web.xml.
Future WebCenter Spaces patches will overwrite this configuration change, so you must remember to repeat such configuration changes after patching, that is, you must obtain the latest webcenter.ear file and repeat these steps.
Hope you find this useful,
Emilio

Tuesday, September 25, 2012

Free version of Oracle ADF - ADF Essentials

Great news from Oracle today, the Ellison's Company announced a completely free version of Oracle ADF, the Java Development Framework.
This ADF version is named Oracle ADF Essentials and with it you are able to develop and deploy applications that include ADF Business Components, ADF Controller, ADF Binding and ADF Faces Rich Client Components without licensing costs.
You can deploy your ADF Essentials applications on no-cost Oracle Glassfish application server.

Follow few useful links about this new:

Dive into ADF
OTN Page
Shay Shmeltzer's Weblog - Deploying Oracle ADF Essentials Applications to Glassfish

Bye bye