June 4, 2009

"Oracle Java Development Community" on "My Oracle Support"

The Oracle Java Development Community has been set up in "My Oracle Support".

In "My Oracle Support", click "Community" to access "My Oracle Support Community".
The "Java Development" link is available under "Middleware".

We'll be glad to meet you there :)

May 27, 2009

Warning "Transient state added to StateManager. State may not be serialized."

We get a lot of questions about the following warnings displayed when running ADF Faces pages including a DVT graph component:

25-May-2009 3:22:02 PM oracle.adf.share.http.HttpSessionStateManagerImpl putState
WARNING: Transient state added to StateManager. State may not be serialized.
State id: data.view_graph1_pagePageDef.graph1__cubicDefinition
25-May-2009 3:22:03 PM oracle.adf.share.http.HttpSessionStateManagerImpl putState
WARNING: Transient state added to StateManager. State may not be serialized.
State id: data.view_graph1_pagePageDef.graph1__dataModel

We discussed the issue with our development team and here was their feedback:

The Graph puts persistent state objects on the StateManager, these objects are Serializable. In addition the Graph also puts transient state objects on the StateManager, these objects are not Serializable.
Note that Graph does not depend on these transient objects always being available on the StateManager, it only uses them for performance if they are there. These transient objects can be recreated from the persistent objects which will always be available.

In other words, you can ignore this warning.

December 23, 2008

Dialog Not Opening In A Popup Window In JDev 11g

We get a lot of questions at Oracle Support about the dialogs not opening in a separate, dialog window in JDeveloper 11g.

For example, suppose you specified the following:

faces-config.xml

<?xml version="1.0" encoding="windows-1252"?>
<faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee">
  <application>
    <default-render-kit-id>oracle.adf.rich</default-render-kit-id>
  </application>
  <navigation-rule>
    <navigation-case>
      <from-outcome>dialog:popup</from-outcome>
      <to-view-id>/popup.jspx</to-view-id>
    </navigation-case>
  </navigation-rule>
</faces-config>


yourMainPage.jspx
<?xml version='1.0' encoding='windows-1252'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
  <jsp:directive.page contentType="text/html;charset=windows-1252"/>
  <f:view>
    <af:document>
      <af:form>
        <af:commandButton useWindow="true" action="dialog:popup" text="Open Popup"/>
      </af:form>
    </af:document>
  </f:view>
</jsp:root>

Note the following properties:
useWindow="true" action="dialog:popup"
that should open the page as a popup dialog.


This worked correctly in JDeveloper 10g
In JDeveloper 11g however, it opens popup.jspx in the same browser window as yourMainPage.jspx, and not in a dialog window.

The reason is that you used faces-config.xml to configure your navigation rule, instead of adfc-config.xml.
From the "Oracle® Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework",
Chapter 17 Creating Complex Task Flows,
topic "17.7 Running an ADF Bounded Task Flow as a Modal Dialog"

If your application uses ADF Controller features (for example, ADF task flows), specifying dialog: syntax in navigation rules within faces-config.xml is not supported.
However, you can use the dialog: syntax in the control flow rules that you specify in the adfc-config.xml file.

So you should specify the flow in adfc-config.xml:

adfc-config.xml

<?xml version="1.0" encoding="windows-1252" ?>
<adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.2">
  <view id="main">
    <page>/main.jspx</page>
  </view>
  <view id="popup">
    <page>/popup.jspx</page>
  </view>
  <control-flow-rule>
    <from-activity-id>*</from-activity-id>
    <control-flow-case>
      <from-outcome>dialog:popup</from-outcome>
      <to-activity-id>popup</to-activity-id>
    </control-flow-case>
  </control-flow-rule>
</adfc-config>

See also "A.3 Configuration in faces-config.xml"
Typically, you would configure the following in then faces-config.xml file:

  • Application resources such as message bundles and supported locales

  • Page-to-page navigation rules

  • Custom validators and converters

  • Managed beans for holding and processing data, handling UI events, and performing business logic

Note:
If your application uses the ADF Controller, these items are configured in the adfc-config.xml file. For more information, see the "Getting Started With Task Flows" chapter of the Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework.

December 11, 2008

JDeveloper 11.1.1.0.1 (Build 5188) is now available

JDeveloper 11.1.1.0.1 (Build 5188) is now available on OTN.

It is a maintenance release including only bug fixes.
There are no new features.

Release Notes are available [Here]
The bug fix list is available [Here]

October 7, 2008

JDeveloper 11.1.1.0.0 is out

JDeveloper 11.1.1.0.0 (Build 5156) is now in production and can be downloaded from OTN.

Release Notes are available [Here].
See also the FAQ [Here]

JDeveloper Documentation page has been updated with the documentation for the 11g release.

Enjoy !

July 29, 2008

JDeveloper 10.1.3.4 is out

JDeveloper 10.1.3.4 (Build 4270) is now in production and can be downloaded from OTN.

It is a maintenance release including only bug fixes.
There are no new features.

You can find the list of bugs fixed in this release [Here].

June 20, 2008

Automatic Updates in Windows XP


I really hate these Automatic Updates in Windows.
I'm not against the Automatic Updates themselves, but the dialog that follows, and that only gives you 2 options:
Restart Now and Restart Later:
AutomaticUpdateDialog:

Why to complain? It gives you the opportunity to dismiss the dialog by clicking the "Restart Later" button.
That's true, but for 5 minutes only. After this grace period, the dialog is back, thumbing its nose at you....
And after a few "Restart Later", you finally give up and restart the machine.


So far, I was stopping the "Automatic Update" service when the dialog was popping up.
However, a support engineer from our Java tech. team came up with a better solution he found on a blog:
you can disable the auto-restart for the Automatic Updates installations.
See more information on this blog: "XP Automatic Update Nagging"

June 18, 2008

Firefox 3


In case you haven't heard about it yet....

... Firefox 3 is available for download, with the intention to set the record for the most software downloaded in 24 hours.

The initial announcement was

Download Day is here!
Set a Guinness World Record
Enjoy a Better Web

Sounds like a good deal, right? All you have to do to help us set the record for the most software downloaded in 24 hours is get Firefox 3 now
it's that easy. We are not asking you to swallow a sword or to balance 30 spoons on your face, although that would be kind of awesome.

Please download Firefox 3 by 17:00 UTC on June 18, 2008. That's 10:00 a.m. in Mountain View, 1:00 p.m. in Toronto, 2:00 p.m. in Rio de Janeiro, 7:00 p.m. in Paris, Madrid, Berlin, Rome and Warsaw, 9:00 p.m. in Moscow, and June 19, 2008 at 1:00 a.m. in Beijing and 2:00 a.m. in Tokyo.

but now, I see the deadline slipped a bit by 1 hour and 16 minutes:

Firefox3Download:


Waouw - days of 25 hours and 16 minutes - I want these :-)

June 17, 2008

How To Delete An Entire Workspace Or Project?


A customer asked me how to delete an entire Workspace from JDeveloper 10.1.3.
He had selected his workspace and then selected the menu "File" -> "Erase From Disk"
The corresponding JWS file was removed, but not its content (Projects).

That's indeed the way the "Erase From Disk" works:
it only deletes the selected object from the OS;

in case of a Workspace or a Project, you delete the corresponding JWS file or JPR file only.
JDeveloper doesn't delete their content recursively.


...

If you delete an application or a project, only the .jws or .jpr file is actually deleted. The

elements contained within the application or project remain on disk. To delete them from disk

through JDeveloper, you must do so explicitly.

So, you have to delete the content of the Workspace or Project manually after you selected "Erase From Disk" in JDeveloper.

June 9, 2008

Buttons Generated As Standard Html Buttons In ADF Faces On Linux


Problem

This question comes regularly in the OTN forums.

You have developed your application on a Windows system and defined your own skin (css), including some customizations for the buttons f.ex.:
.AFButtonServerText:alias
{
    color:black;
    background-color: #D2DEED;
    font-weight:bold;
    font-family: Arial, Helvetica;
    font-size: 11px;
}

.AFButtonServerTextDisabled:alias
{
    color:#AAAAAA;
    font-family:Arial, Helvetica;
    font-size: 11px;
    font-weight: normal;
}

When you run the application in the Embedded OC4J on Windows, the page renders correctly, with the buttons generated as "image buttons":
ADFButton:

However, the same application deployed on iAS on your Linux machine shows the buttons as standard HTML buttons:
StandardButton: .

You use the following Java Option in iAS on Linux:
   -Djava.awt.headless=true
as recommended in the JDeveloper online help, "About ADF Faces Supported Platforms".

So, what's the problem ?

Cause

The font "Arial" is not available on your Operating System.

The ADF Faces buttons are normally generated as GIF files by the Java's AWT graphics library.
When the Java API doesn't have access to the specified font, it generates the button as a standard HTML button.

Solution

Either install the missing font on your Linux system (the Java API will use it to generate the image buttons) or use another font.

The best choice to avoid the problem when deploying the application on different platform is to specify a logical font (Dialog, SansSerif, ...), that's mapped to an existing physical font on your OS.
You can find the list of the mapping in <iAS_Home>\jdk\jre\lib\font.properties
NB: this name may differ depending on the OS

F.ex. the "SansSerif" logical font is mapped to the "Lucida Sans" physical font:
sansserif.plain.latin-1=-b&h-lucidasans-medium-r-normal-sans-*-%d-*-*-p-*-iso8859-1
and the Lucida font is always installed as part of the JDK (in ...\jre\lib\fonts).
So you are sure with this solution that the buttons will always be generated as image buttons, whatever the OS you are deploying to.


NB: though it was written for UIX, most of the information contained in the chapter "18. Image Generation in ADF UIX" of the "Oracle ADF UIX Developer's Guide" is still valid for ADF Faces.