September 21, 2009

ClassNotFound: How To Find The Missing Library


There are numerous ADF libraries and it may cause you problems to resolve a ClassNotFound exception.
To help you in finding the missing library, there is a small search utility in the "Add Library" and the "Manage Libraries" dialogs as shown in the next figure:

ManageLibrariesSearchClassName.png


You can reduce the number of libraries shown, or search for a library by entering a string. You can enter

  • the exact class name,
  • a fully qualified name,
  • a partial class or package name, using * as a wildcard anywhere in the string

.

September 17, 2009

Encoding of ADF Faces Pages


I got several issues this week that had the same root cause though the symptoms were completely different.

The problem is related to the page encoding of the ADF Faces JSPX.
ADF Faces supports 'utf-8' only.
However, by default, the editor creates the pages with the 'windows-1252' encoding:
Windows1252.png

This leads to problems like:

  • accented characters transformed to code representation during the Submit - see the discussion "Character encoding problem in ADF 11 app" in the OTN Forum
  • Error: "The value is not a number" when using groupingUsed="true" with specific locale (French f.ex.)
  • ...

To avoid these issues, you can edit your pages and change 'windows-1252' by 'utf-8'.
For the new pages, you can change the default to 'utf-8':

  1. select menu "Tools" -> "Preferences..."
  2. click "Environment"
  3. select "UTF-8" in the "Encoding" list.


Encoding.png


The new pages will be created correctly now.
Note that as from JDeveloper 11.1.1.2.0 onwards, JDeveloper will use the encoding 'utf-8' (whatever the default encoding is) when ADF Faces technology is used.

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 :-)