Wednesday, June 23, 2010

Reusing taskflows using ADF Libraries

Used version: JDeveloper

Last week I did a short presentation on “ADF Taskflow Integration” on  the german ADF Partner Community.

The presentation covers some basics on ADF task flows, ADF Library and the integration process with the focus on reuseabilty. I think it is worth to share with the english community as well;-) 


Further Information

Sunday, May 9, 2010

Type error in Installation Guide for Oracle Team Productivity Center Server!

Short post, but quite interesting to mention I think.

While going through the current installation guide of Oracle TPC Server the following line catched my eyes:

“If you are using WebLogic Server as the installation server, make sure you are using version 10.3.4.”

That’s really up to date information;) IMHO WLS 10.3.3 is the “most current” WLS version.

Further information

Friday, April 30, 2010

Monitoring Dashboard in WLS Administration Console introduced

Type: Info
Applies to: Oracle WebLogic Server: 10.3.3

Just after JDeveloper was released of course I had to give it a try;-) Somehow I am always curious about changes the Admin Console of the WLS. Since WLS is integrated it is really easy and quick to do. Just start a simple ADF Fusion Web app and open http://localhost:7101/console

The following things catched my eyes:

a) The Admin Console  is internationalized. On my laptop the login form appears in german by default now:
To change the language you just have to change the preferred language in the browser settings and reload the page.

b) On the Homepage I recognized a new entry:
This opens the so called “Monitoring Dashboard” which obviously is developed by ADF Faces RC. Cool! No activation of the diagnostic console needed! No slowly loading Applet;) Thanks!


c) the diagnostic-console can still be activated in the preferences but just in order to inform that it has been replaced by the new monitoring dashboard….and the Request Performance

d) Request performance
image At the first look the view is a bit disappointing because you will not see anything here until you “…first configure WLDF instrumentation to use the ElapsedTimeAction diagnostic action attached to "Around" diagnostic monitors. Only data from the ElapsedTimeAction action is shown on this page.” See the context help for more information. (Maybe I will blog about it in more detail in a separate post)

It would be nice if this information (to first configure a WLDF inst) would be visible as INFO or WARNING directly on the Request Performance Tab.

Sunday, April 18, 2010

ADF 11g: Be aware of the right run context

Used version: JDeveloper

Problem description

Last week I did a two days training on fusion development with Oracle ADF BC / Faces RC. Everything worked fine except the following:

While doing the “Part 2 Create a Simple User Interface” from the cue cards some of the attendees (and me too) had the effect that at runtime the control flow rule defined in the bounded task flow did not worked.


So what actually went wrong here at runtime? Why a click on the Edit Order-Button did not trigger the control flow rule? Instead of that you just stay on the browseOrders page.


After some time of investigation I recognized that I had started the application under the wrong context. To test the application I selected browseOrders.jspx in the application navigator and have chosen “Run” because normally I am using taskflows with page fragments. So in real world projects you typically won’t start the application from a bounded task flow.

But because in this example the taskflow is based on whole pages rather than page fragments, the application must be started from within the bounded taskflow. Otherwise the control flow rules won’t be working at runtime!


You can check the correct run context by examining the URL in the browser. In the wrong case the URL will be …/faces/browseOrders.jspx of course whereas running the app from taskflow the URL is …/faces/adf.task-flow?adf.tfId=orders-flow&adf.tfDoc=/WEB-INF/orders-flow.xml

Lesson learned

Don’t panic if control flow rules seem not work as expected. Check the following

  • Which type of taskflow? (bounded /unbounded, with/without page fragment)
  • Does the action attribut of the command component match the control flow outcome?
  • How the application has been started?

Sunday, March 28, 2010

First impression of Adobe Flash Builder 4

Applies to: Flash Builder image

The next version of Flex Builder has been released under “Flash Builder” some days ago and so I decided to give it a try.

The following points catched my eyes in the first couple of minutes

  1. Integration of different data services through drag n drop data binding capabilities. The following list should give you an idea of the supported data services:
    image image
    Trying out the Twitter XML API ( I could generate the data model very easy. image
  2. Data service tester is really cool and gives you quickly a “good feeling” for the used service
  3. Theme browser/selector
  4. Another great improvement seems to be done on the compiler performance. It just feels much faster although I did not try yet on a big project…
  5. Generation of event handler code (at long last!;-))
  6. Refactoring support. Although quite poor at the moment. Rename and Move. That’s it!
  7. Generate setter/getter. Here is an example
  8. surely there are more new features. But for me discovery time is over now;)


Still missing

  1. Context-Menu and DnD operations in the outline view of the UI
    It’s a READONLY view! No chance to move around components or bind your service data calls here. It is a pitty! Missing the flexibility I am used from the UI structure pane in JDeveloper!
  2. Easy integration of database objects. It would be great If we could connect to a database and let Flash Builder generate corresponding server components. For now we have to generate/implement through LivecycleDS/BlazeDS/graniteDS.

    Another idea could be to create ADF Business Components and expose them as Webservice by the service data object (SDO) facility! Yeeah, this could work quickly and great cause FB has good support for WebServices.

    Anyone tried this already? Comments are welcome.



It looks like Adobe has learned some lessons from Oracles JDeveloper/ADF team. Especially the data binding/service integration facilities are comparable to ADFs data controls. But there is still a lot of work to do to get such productivity ADF makes possible;)

The UI Designer+CSS editor of course feels more “smooth” than the one of JDeveloper. But there are still missing some neat features like search boxes for ui components and properties. The non-interactive ui structure view should be fill with life! I am tired of searching manually for the desired component!

Thursday, March 18, 2010

ADF: How to create method binding for action

Applies to JDeveloper


That is a really short post but shows all possibilities how to create a method binding action code in a backing bean. This is a very worthy feature if you need to invoke more than a single business service method. Currently ADF is limited to invoke just a single method declaretively/by DnD. Hopefully it will be possible in some of next JDev versions to bind a series of service methods to a command component by DnD.

a) In Design Mode: Just double-click on a command component and you will get the appropriate wizard

b) In Source Mode: Open the context menu and choose “Create Method Binding for Action”
The “Bind Action Property” Wizard will open as shown in a). Of course same Menu Action is available in Design mode too but double-clicking is more comfortable.

c) Property Inspector: No chance to generate ADF action binding code!

Just forgotten by JDeveloper developers or are there any good reasons why the above feature is not available here?

Wednesday, March 17, 2010

ADF App Internal Server Error 500

Applies to ADF and WLS 10.3.2

Problem description

1. stop datasource

2. stop app (all requests)

3. start datasource

4. start app (servicing all requests)

Call :/http://<host>:<port>/<context>


Functional ADF Application

Instead got



a)Take a look into <domain_home>/servers/<servername>/logs/<servername>.log

Caused By: java.lang.ClassCastException: oracle.adf.controller.internal.binding.DCTaskFlowBinding cannot be cast to oracle.adf.controller.internal.binding.DCTaskFlowBinding

       at oracle.adf.controller.internal.binding.DCTaskFlowBindingDef.initializeExecutableBinding(

       at oracle.adf.model.binding.DCBindingContainerDef.createExecutables(

       at oracle.adf.model.binding.DCBindingContainerDef.initializeBindingContainer(

       at oracle.adf.model.binding.DCBindingContainerDef.createBindingContainer(

       at oracle.adf.model.binding.DCBindingContainerReference.createBindingContainer(

       at oracle.adf.model.binding.DCBindingContainerReference.getBindingContainer(

       at oracle.adf.model.BindingContext.get(



Never seen that before! Where does all those .appmergegen hidden folders coming from?


a) Googling. => not much information on this:(

b) rm -rf .appmergegen*

Test again

1. stop datasource

2. stop app

3. start datasource

4. start app

Call http://<host>:<port>/<context>

=> Application works as expected! But after a few more  redeployments the internal error (500) occurs again.

Further research

a) Find out where all those .appmergegen hidden folders coming from? It seems that this leads in the end to a class loading problem.

b) How to make sure, the application will not fall into this situation again?

Any comments are greatly appreciated....

Tuesday, March 2, 2010

Generate ant build file from project issue

Occured in JDeveloper Version:

Problem description

Trying to generate ant build file from project issues the following exception in Jdeveloper


    at oracle.jdeveloper.builder.SourceModel.generateDefaultFileName(
    at oracle.jdevimpl.ant.wizard.GenerateBuildfileModel.initializeFromContext(


The appropriate project directory is not listed under the Project properties>Project content>Resources.


Just open the project properties and add the project folder under project content>Resources


After doing so the creation of the ant project build file works as expected!

Friday, February 12, 2010

FAQ: Why should I use Oracle ADF for application development?

Examining JDeveloper Version:

As the fusion developer guide states Oracle ADF is

"An end-to-end application framework that builds on Java Platform, Enterprise Edition standards and open-source technologies to simplify and accelerate implementing service-oriented applications."

So what does this mean and what are the benefits from my personal point of view? I will try to give an satisfactorily answer.

  1. At its core ADF couples loosly different technologies by its ADF binding layer and exposes business services uniformly through data controls for the frontend developer. The following business services in the backend and user interface frontends are supported:
    From the architectural point of view further technologies can be integrated through custom data control implementations, e.g JSON Data Control, XML Data Control, etc.
  2. No matter which type of backend technology you want to use (POJO, EJB3/JPA, ADF BC (based on DB tables or service data objects), WebService, Placeholder) the declarative ui development through data controls abstracts from the underlying technical details.
  3. Write ONCE your business service and use it for API provisioning (Web service, REST) and UI (Web, Mobile, Desktop, Office)
  4. With ADF it is easy to expose your Software as a Service (SaaS). Whether as ADF Taskflow with tight integration capabilities in Oracle WebCenter or through JSF portlet bridge as standard based JSR 168 Portlets. In analogy to service registries I think there will be someday an easy to use Taskflow registry (better than resource catalog;-) from which you can compose your application -> Improved WebCenter.
  5. Abstract and easily "canonicalify" your data model through Service Data Objects (SDO). That way you can reuse business components across diffrent departments and abstract from the underlying persistence store.
  6. Integrate your application into a SOA by firing events from your business components, invoke BPEL processes or create Human Workflows
  7. Easily push data to the client by Oracles Active Data Service technology.
  8. Based on JSF standards as the front end developer you don't have to care about which specific rendering technologies to use. As an example take a look at DVT (visualization) components. The usage of the components remains always the same, but the output can be configured: PNG or Flash. Someday HTML5 or JavaFX or whatever might be rendered. As Application Developer you just will get those features by updating to a new ADF Version without the need to know how the underlying rendering technology works.
  9. Personalization: With ADF it is easy to let the application users customize the ui for their needs. Those runtime customizations are persisted across the session through Meta Data Services (MDS). Beyond this it is possible to create seeded customizations for different sites or industries.
  10. Declaratively bind security constraints to application roles. Depending on infrastructure just map the enterprise roles (users, groups) to the application roles. Furthermore: if deployment is planned on the Oracle WebLogic Server it is really easy to integrate with almost any authentication provider: OID, OpenLDAP, ActiveDirectory, etc....

As the name suggests ADF simply was invented for exactly what you want to do: application development;-)

If you do not have any of the above requirements and prefer coding instead of dragging and dropping then you are well of with a more lightweight framework. In the Java world take a look at

  1. Playframework
  2. Grails

Those frameworks are really cool and make a lot of fun to develop with - or should I say "to play with".

Of course there are some reasons for: "Why I should NOT use ADF for application development"

  1. JDevelopers performance and stability is really poor in comparison to every other well Java IDE.
  2. Integrated WebLogic server takes 3 minutes to startup. With every new release it seems that the startup time increases.

Further information

Monday, January 18, 2010

ADF 11g: Define default UI for MDS user customization

JDeveloper Version:


In this post I want to show how you can enhance the built-in feature “user customization accross sessions using MDS”. If you just activate this feature an define the default UserCC-class to be used, you typically will face the problem that for the first time the end users access your web application they will see the UI, layout, etc. as designed by the developer. Very often default values will be used so at the end someone might end up with fine tuning advises  like “Please expand this column by 5px and put column x in front of the others….” and so on. And in the end you will still be not sure if your layout meet the exact idea of the manager.

What managers actually want is, to define e.g. the width of columns, etc on their own and let that setting be the default for all the other end users. With ADF11g that requirement can be achieved with only a few lines of code + configuration.

How to do

Create a custom Customization Class like the following


import javax.faces.context.FacesContext;

import oracle.adf.share.config.UserCC;

import oracle.mds.core.MetadataObject;
import oracle.mds.core.RestrictedSession;

public class DefaultUserCC extends UserCC {

  private static final String DEFAULT_CC_VALUE_USERNAME =

  public DefaultUserCC() {

   * Overrides the UserCC
   * @param sess
   * @param mo
   * @return
  public String[] getValue(RestrictedSession sess, MetadataObject mo) {

    String[] value = super.getValue(sess, mo);
    if (value == null) {
      return null;

    FacesContext context = FacesContext.getCurrentInstance();
    String valueUsername =
    if (valueUsername == null) {
      return value;

    return new String[] { valueUsername };


and register it in your adf-config.xml file at the following position


It is important, to register the DefaultUserCC-class before UserCC class since that’s the precendence which will be evaluated by the MDS runtime.

Now edit the web.xml and add the following parameter to define the user whose mds runtime customization will be used as default customization for users that have not customized their UI yet.


With that configuration sking will be able to define the default UI  for all the other users.

Further reading

Customizing Applications with MDS

Monday, January 11, 2010

JDeveloper 11g: Know the IDEs coding features to get more productive

JDeveloper Version:


There are a couple of useful IDE features that may not be so obvious because those are not always accessible by the menu but only through shortcuts. So in this post I just want to show some of the cool features that makes one more productive while developing.

Tag-Documentation (Press Ctrl-D on a Tag)


Javadoc-Documentation (Press Ctrl-D on a class or method in java source code)


Javadoc-Documentation (Press Alt and Mouse Over on a class or method in java source code)


Quick Source View (Shift+ Mouse Over Sourcefiles in Application navigator)


Quick View in Sourcecode Mode (Ctrl+Mouse Over on right indicator bar) 0001@1800_1800-412664a6be23a67f

This also works for Java Sourcecode of course:


Block Coloring (new in JDev


Quick Preview in Taskflow (Shift+Mouse Over view-activity)


Quick file switch (Strg+TAB)


Go to Java Type (Ctrl+-)


Alternatively use the search box in the top right corner of the IDE


to quickly find the file you are looking for. In most cases you will be faster than searching manually in the application navigator.

Quick Outline/Method navigation (Ctrl+Shift+O)


Customize and explore

And of course you can customize your IDE shortcuts under Preferences>Shortcut keys


And of course it is good place to explorer new CodeEditor features.


There are still some features I am missing. used from e.g. Eclipse. This is

  • Ctrl+D: Delete current line
  • Alt+Arrow Up/Down: Move current line/block up down. This is really cool once you get used to it!

Friday, January 8, 2010

JDeveloper 11: Incomplete ViewObject information after IDE restart

Status: open
JDeveloper Version:


Last time I often face the following issue:

  1. Have a ViewObject-Definition file in Overview mode openedimage
  2. Close JDeveloper.
  3. Restart JDeveloper
  4. Not every time but somtimes the ViewObject-Definition file seems to be incomplete!
  5. Sometimes information shows up, but the two Overview tabs are confusing…
  6. Any explanations for that behaviour?


First keep cool;-), your ViewObject-Definition content is still there! It just does not show up correctly in Overview Mode. Close the file and reopen it.


Seeems like the two overview tabs show up everytime.

Saturday, January 2, 2010

Oracle TPC: Possible upgrade issue from to

Status: resolved
Oracle Team Productivity Center:
Oracle WebLogic Server: 10.3.2
Environment: TELDE

First of all I wish all my readers out there a HAPPY AND SUCCESSFUL NEW YEAR 2010!

In a previous post I have blogged about setting up (a clean) Oracle Team Productivity Center Server. In this post I want to share my experience if you upgrade an existing OTPC database repository to but want to install the otpc.war on a clean WLS 10.3.2 domain.


Client Start Xming
Putty Login as oracle
{setup your environment}
[oracle@telde ~]$ cd /u01/product/oracle/middleware/11.1.1/tpc/ [oracle@telde tpc]$ java -jar tpcinstaller.jar
Installer 1.Provide the database connection properties to the existing OTPC repository
2.Choose the autodeploy directory of a clean WLS 10.3.2 domain
3.Start installation
  You will encounter the following error

So how to solve the installation error if you want to install on a clean WLS 10.3.2 domain?


Putty Login as oracle
{setup your environment}

OK so now we need to manually install the otpc.war into weblogic domain.

1) We first verify that it is included in the tpcinstaller:

[oracle@telde tmp]$ jar -vft tpcinstaller.jar | grep otpc
16485122 Fri Oct 30 01:33:40 CET 2009 lib/otpc.war

2) Now we extract it and copy otpc.war to the domain home/autodeploy

[oracle@telde tmp]$ jar -xf tpcinstaller.jar lib/otpc.war
[oracle@telde tmp]$ cp -p lib/otpc.war $DOMAIN_HOME/autodeploy

3)Run the tpcinstaller once again!!!!

4)Start the WebLogic server

[oracle@telde tmp]$cd $DH
[oracle@telde fusion_domain]./


Background information

During installation of OTPC the otcp.war is modified so that it contains the correct database connection information.

[oracle@telde autodeploy]$ cd /u01/app/oracle/product/
[oracle@telde autodeploy]$ ls -l
total 24252
-rw-r--r-- 1 oracle oinstall  8309132 Nov  5 07:43 otpc.war
-rw-r--r-- 1 oracle oinstall 16485122 Oct 30 01:33 otpc.war-1257402576730
-rw-r----- 1 oracle oinstall     2131 Nov  4 02:07 readme.txt

Those connection properties are stored in persistence.xml which itself is contained in _wl_cls_gen.jar file.


So if you encounter connection problems persistence.xml in the exploded app directory is the file you should first look to verify the connection properties.