28 February 2011

Run your Fusion ADF applications without navigation controls (Back button e.t.c.)

In many cases the Navigation Controls (Back button e.t.c.) can produce problems in a Fusion ADF application.

If you have built you app to use Firefox (yes some ADF Rich Faces do not behave the same under IE), you can check a great add on for Firefox called Firefox Prism. More here.

23 February 2011

SVN Change Sets

or how JDeveloper helps you group the modified files. Typical scenario when you do not yet want to commit some files





Under Comments, put the default suggestion of the Comments (a comment template) for this change set.


 Also
  • Right click on change set --> Set/Unset as Default to set/unset a change set as the default destination of the modified files
  • Right click on File --> Add to --> the change set you to add the file


21 February 2011

Oracle Security Alert for CVE-2010-4476


There is a Oracle Security Alert for CVE-2010-4476 
quoting:

Description

This Security Alert addresses security issue CVE-2010-4476 (Java Runtime Environment hangs when converting "2.2250738585072012e-308" to a binary floating-point number), which is a vulnerability in the Java Runtime Environment component of the Oracle Java SE and Java for Business products. This vulnerability allows unauthenticated network attacks ( i.e. it may be exploited over a network without the need for a username and password). Successful attack of this vulnerability can result in unauthorized ability to cause a hang or frequently repeatable crash (complete Denial of Service) of the Java Runtime Environment. Java based application and web servers are especially at risk from this vulnerability. 

which seems to occur also in JRockit.  Check Java EE Support Patterns post to see how this problem is reproduced in JRockit. 
Quoting the before mentioned post:

This post is about informing you on a new critical Oracle security alert that was released by Oracle on February 8, 2011. We will also demonstrate how it can affect your Java EE environment using a negative test case againts one of our Internet facing Webologic Portal 10.0 application using JRockit R27.5 (JDK 1.5).

20 February 2011

Run JDeveloper 11.1.1.4.0 in 64bits

Why?
Your are not going to see Low memory warning again for sure. In 32bits max mem of JDeveloper was at the most 700MB. In 64bits, it can be Gigs. It just depends on your physical RAM.

Note:
Of course you need a 64bit machine with 64bit OS (Windows XP 64bit used below) for the following tips.
(an preferreably a lot of RAM 8+ gigs and a SSD disk)

How

Installation of JDeveloper
Download and install  JDeveloper SW under C:\Oracle\Middleware

Note:
For the rest of these notes, this is considered the Middleware home. Adjust if you use a different home.
So your MIDDLEWARE_HOME=C:\Oracle\Middleware
(not necessary to set it)

Installation of 64bit JDK (only for 64bit Windoze)
Download (make sure to choose 64bit one) and installed also 64bit java. Let's say the it install it under
eg
C:\Program Files\Java\jdk1.6.0_23
So your JAVA_HOME=C:\Program Files\Java\jdk1.6.0_23
(not necessary to set it)

Note:
For the rest of these notes, this is considered the java home. Adjust if you have a different home.


Adjust JDeveloper's memory settings  
Open C:\Oracle\Middleware\jdeveloper\ide\bin\ide.conf
Set the following params.

  • AddVMOption  -Xmx6000M
  • AddVMOption  -Xms512M
Note:   
Consider that your Windows XP 64 takes at the most 512-756MB plus a gig for the rest of your apps (we give ~2gigs for system and various apps).
So, you set the value to Xmx to 6000 if you have 8 gigs of physical AM. The general rule is that the value of  Xmx is to be
             Value of Xmx = Total Physical RAM - 2gigs



Open C:\Oracle\Middleware\jdeveloper\jdev\bin\jdev.conf
Set  the following param

  • AddVMOption  -XX:MaxPermSize=1024M


Set JDeveloper to use 64bit java 
Open again C:\Oracle\Middleware\jdeveloper\jdev\bin\jdev.conf

Set  the following param
SetJavaHome C:\Program Files\Java\jdk1.6.0_23

where C:\Program Files\Java\jdk1.6.0_23 is the path to my 64 bit Java installation (your JAVA_HOME).


Configure Windows pagefile
If you get or in order not to get


I used 1.5 of my physical RAM. That's 12gigs of pagefile for 8gigs of RAM.




Increasing the memory of the embedded weblogic
This will give us the ability to have more redeployments without server restart, and do test something faster.

The only thing you need to do is to the add the following line in setDomainEnv.cmd file right after the comments in the beginning:

set USER_MEM_ARGS=-Xms64m -Xmx1024m -XX:MaxPermSize=512m

in the above example I am setting it to have 1024 and 512 perm.
This is for both systems 32bit and 64bit.
(pending to check how to set for 64bit)

The file (setDomainEnv.cmd) is located under JDeveloper system in the following folder:
C:\Documents and Settings\\Application Data\JDeveloper\system11.1.1.4.37.59.23\DefaultDomain\bin

For more, check Note 3: How to find where your  JDeveloper's system dir is located? on Change JDeveloper's system directory (system11.1.1.x.x.xx.xx).



Special thanx to Mike (adfbugs.blogspot.com)

Dig more:

15 February 2011

Define default editor for each file type

Set the editor that JDeveloper will open a file
Tools--> Preferences




SVN comment template


Each commit should have the appropriate comments as a good developing practise.
In order not to write again and again the same comments we can use SVN comment templates

So when we are about to commit a source for the 1st time
Click comment templates
and Add
 here set you template


You can have of course more than 1 template and moreover JDeveloper keeps history of the previous comments. Just click the down arrow next to the comment.

Check if your Weblogic domain is in Production mode

There are 2 types of weblogic domains:
  • Production domain
  • Non-production domain or  Development domain


To check the type of your domain:
  • Open console (http:\\hostname:port\console  eg http://127.0.0.1:7101/console/)
  • Click your domain (first node in Domain Structure panel)
  • Check setting of Production mode

Pre-Built Developer Virtual Machines

The easiest way to check some Oracle solutions like
  • Java Development 
  • Database App Development 
  • SOA & BPM Development 
  • Oracle WebLogic Server 
  • Oracle WebCenter Portal Framework 11g  
  • Oracle Solaris Express 11 
  • Oracle Solaris 10 9/10 
  • Enterprise PHP Development
an more is by using on of the ready to use Pre-Built Developer VMs


Dig:

14 February 2011

Change JDeveloper's system directory (system11.1.1.x.x.xx.xx)

Last updated: 20/2/2011

In the case of JDeveloper 11.1.1.4.0 the system dir is named: system11.1.1.4.37.59.23.

Its default path is:
C:\Documents and Settings\username\Application Data\JDeveloper\

Unfortunately this is a really long path (windows have a limit on the max file path), which additionally contains spaces.

So if you want to change it, eg put it under C:\JDeveloper where  mywork  is,
you can set the environment variable:
JDEV_USER_DIR =C:\JDeveloper




Note1: Where it is defined that this env var changes the JDeveloper's system dir?
The property file that defines this environment variable is
C:\Oracle\Middleware\jdeveloper\jdev\bin\jdev.boot
there you ll find
#
# The ide.user.dir.var specifies the name of the environment variable
# that points to the root directory for user files.  The system and
# mywork directories will be created there.  If not defined, the IDE
# product will use its base directory as the user directory.
#
ide.user.dir.var = JDEV_USER_HOME,JDEV_USER_DIR


Note2: What is  JDeveloper's system dir is all about?
This directory  is the place where
  • JDeveloper stores all of its settings
  • The DefaultDomain of the embedded weblogic is located and so the places the the running Fusion app is deployed
  • and generally all of the settings of a running JDeveloper are stored
So if your JDeveloper does not open you can go this dir and delete forcing it JDeveloper to recreate.


Note 3: How to find where your  JDeveloper's system dir is located?
When embedded WLS starts (that is when you run your  fusion web app from JDeveloper) you can see in the console the  location of your system.
eg. The console when app starts and in bold the system path


** Using port 7101 ***
C:\Documents and Settings\username\Application Data\JDeveloper\system11.1.1.3.37.56.60\DefaultDomain\bin\startWebLogic.cmd
[waiting for the server to complete its initialization...]
.



10 February 2011

TROUBLESHOOTING: "Windows - Virtual Memory Minimum Too Low" when running JDeveloper in 11.1.1.4.0 in 64 bits

Last update: 12/2/2011
If  while running JDeveloper in 11.1.1.4.0 in 64 bits, you get


then increase the pagefile settings of your windows machine. The pagefile setting are in
My Computer--> Properties --> Advanced --> Settings --> Advanced --> (Virtual Memory) Change --> Virtual Memory


I used 1.5 of my physical RAM.


For more check TROUBLESHOOTING: Windows - Virtual Memory Minimum Too Low.

Note: In no way is this a problem of the new JDeveloper, which is actually working awesomely in 64bit, but just a tuning on your windows operating system.

09 February 2011

Auto Code HighLight

A feature that I used to love in Eclispe (enabled by Default), can also be enabled in JDeveloper :)

It automatically highlights all occurances of the variable you have clicked on.




Dig:

07 February 2011

TROUBLESHOOTING: log4j SMTPAppender does not send mail from an ADF application

Problem 
If you use SMTPAppender of log4j to send mail upon log event from an ADF Fusion application and you cannot get the mail...

Solution
...then probably you  have not add JavaMail's jars as lib dependencies to your Project.


The error is thrown actually but you ll never see it when running for example the app module. If you run in a simple java class (see the link below for a tester one) you ll you get the exception complaining for the missing class.

Dig more:



You might also like:

Related Posts Plugin for WordPress, Blogger...
There was an error in this gadget