Thursday, December 24, 2009

ADF 11: Create Application EAR for test and production deployment respectivly

Status: resolved
Oracle JDeveloper Deploy:

In this post I want to show how you can easily automate the issue mentioned in Andrejus Baranovskis post about How to do Manual Deployment for ADF 11g Application EAR with Auto Generated JDBC Descriptors.


Ok, so what actually is the issue with the Auto Generated JDBC Descriptors in the generated EAR? To understand the problem better I have made up a quick overview


You see a typical scenario of a development environment (not optimal but no that bad) On each developers machine there is JDeveloper and the Integrated WebLogic Server installed. If a developer joins a project she checks out the sourcecode, opens it Jdeveloper and is able to run the application. It order to get this working JDeveloper generates the appropriate JDBC descriptors and packages the datasource definition into the EAR which is deployed on the integrated WLS. The application runs on developers machine with zero configuration changes because ‘Auto-generate and Synchronize weblogic-jdbc.xml Descriptors During Deployment' checkbox on the Deployment page of the workspace's Application Properties dialog is activated.

On the right side you see the components on the test/nightly build server with dedicated test database! So the connection information is different from the dev system, the data source in  the WLS must be created manually or script based. For that reason the EAR must not include any datasource definitions because they are obtained from the container (WLS). The EAR is generated by the ojdeploy utility which operates mainly on the application workspace file (.jws)

The problem now is that the ‘Auto-generate and Synchronize weblogic-jdbc.xml Descriptors During Deployment' option is saved in the Application Workspaces file which resides in the SCM repository and both - the developer and Test-Server - obtain there config from a single source!


Is simple, works but maybe a bit dirty;-) Observing the application workspace file (jws) I recognized the following line

<value n="Weblogic-JDBC-Auto-Sync-Key" v="true"/>

So  switching the value to false before running ojdeploy should do the trick. I have done this with Ant. Create the following files into your workspace


as follows
autosync.true=<value n="Weblogic-JDBC-Auto-Sync-Key" v="true"/>
autosync.false=<value n="Weblogic-JDBC-Auto-Sync-Key" v="false"/>

<?xml version="1.0" encoding="windows-1252" ?>
<project name="Deploy Helper Tasks" default="usage" basedir=".">
  <property file=""/>
  <target name="usage">
    <echo>Use one of the following targets:</echo>
    <echo>1) disable-wls-jdbc-autosync - desc todo</echo>
    <echo>2) enable-wls-jdbc-autosync  - desc todo</echo>
  <target name="disable-wls-jdbc-autosync">
    <replaceregexp match="${autosync.true}"
  <target name="enable-wls-jdbc-autosync">
    <replaceregexp match="${autosync.false}"

<?xml version = '1.0' standalone = 'yes' ?>
    <parameter name="workspace" value="${workspace.path}\YourApp.jws"/>
    <parameter name="profile" value="*"/>
    <parameter name="nocompile" value="true"/>
    <parameter name="nodatasources" value="true"/>
    <parameter name="forcerewrite" value="true"/>
    <parameter name="outputfile" value="${workspace.path}/deploy/${ear.filename}"/>

@echo off

echo [INFO] Create deployment EAR for ADF fusion web application

call ant -f deploy_to_ear.ant.xml disable-wls-jdbc-autosync
call ojdeploy -buildfile deploy_to_ear.ojdeploy.xml -define workspace.path=C:\yourpath\to\workspace,ear.filename=testapp1_without_datasources.ear
call ant -f deploy_to_ear.ant.xml enable-wls-jdbc-autosync

Alternatively to run the enable-wls-jdbc-autosync target after ojdeploy has finished you could also do a revert on the .jws file if your SCM system supports it.

In my sample application the generated EAR files look as follows


Keep on automating your build process;-)

Saturday, December 12, 2009

Oracle Team Productivity Center (OTPC) – Team Server part

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


We want to use Oracles solution for Applpication Lifecycle Management (ALM) called Oracle Team Productivity Center. OTPC enables software development teams to collaborate and work productively together when developing applications using JDeveloper.

OTPC consist of several component from which we will cover the server side ones in this blog post. That are the Team Server which is connected to databased repository and some specific ALM connectors. Currently there are implementations for

  • JIRA (since
  • MS Project Server (since
  • Bugzilla (new in

The following figures gives an overview of the involved components:


The Team Server component is a WAR exposing some WebServices which are cosumed by the JDeveloper TPC Extension counterpart. The deployement is currently supported either on a WebLogic Server or Apache Tomcat.

Quick Outline of this post

  1. Download OTPC Server Component
  2. Create Database Schema for OTPC
  3. Install  OTPC Server Component on WebLogic Server 10.3.2
  4. Install JDeveloper OTPC extension
  5. Test the OTPC connection.

Download Products

  Oracle® Team Productivity Center Server Component + Connectors
Download from OTN

Create database schema


login as: oracle
oracle@'s password:
Last login: Mon Aug  3 21:47:45 2009 from

[oracle@telde ~]$

[oracle@telde ~]$ . ./

Aktuelle Oracle Umgebung:

Oracle-Home: /u01/app/oracle/product/11.1.0/db_1

Oracle-SID:  orcl

[oracle@telde ~]$ sqlplus / as sysdba

SQL*Plus: Release - Production on Thu Nov 5 07:40:04 2009

Copyright (c) 1982, 2008, Oracle.  All rights reserved.

Connected to:

Oracle Database 11g Enterprise Edition Release - Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> create user ofm_tpc identified by ofm_tpc;

User created.

SQL> grant connect, resource to ofm_tpc;

Grant succeeded.

SQL> connect ofm_tpc/ofm_tpc;


SQL> disconnect;

Disconnected from Oracle Database 11g Enterprise Edition Release - Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> exit;

[oracle@telde ~]$

Install OTPC Server Component

Client Start Xming!
WinSCP Copy downloaded tpcinstaller.jar to /u01/product/oracle/middleware/11.1.1/tpc
Putty / set java env

Login as oracle

[oracle@telde ~]$ . ./


Aktuelle Oracle Umgebung:

$WLS_DOMAIN:               fusion_domain

$WLS_DOMAIN_HOME(=$DH): /u01/app/oracle/product/

$MW_HOME:                  /u01/app/oracle/product/

$JAVA_HOME:                /u01/app/oracle/product/

[oracle@telde ~]$ java -version

java version "1.6.0_14"

Java(TM) SE Runtime Environment (build 1.6.0_14-b08)

BEA JRockit(R) (build R27.6.5-32_o-121899-1.6.0_14-20091001-2113-linux-ia32, compiled mode)

[oracle@telde ~]$ cd /u01/product/oracle/middleware/11.1.1/tpc/ [oracle@telde tpc]$ java -jar tpcinstaller.jar

Installer image
Choose: Next

Input JDBC: jdbc:oracle:thin:@database.telde.local:1521:orcl
Input Username: ofm_tpc
Input Password: ofm_tpc
Choose: Next

Select: Server
Select: Connectors
Choose: Next
Input: /u01/app/oracle/product/
Choose: Next

Choose File Name: <whatever connector you want to additionally be installed>
Choose: Next

Input Username: tpcadmin
Input Password: welcome1
Input Confirm Password: welcome1
Choose: Next
View Summary, Verify your made selections!
Choose: Finish
Installation in progress image
Choose: Close
Putty/Start WebLogic

Start the WebLogic server

[oracle@telde tmp]$cd $DOMAIN_HOME

[oracle@telde fusion_domain]./


[EL Info]: 2009-11-05 07:47:00.511--ServerSession(41694633)--zip:/u01/app/oracle/product/!/-otpc login successful

Browser/Verify OTPC is running image

Upgrade notes

Test the connection to OTPC from JDeveloper


Start and Use Help>Check for updates to install the team productivity center extension, plus required client connectors.

Select the Team Navigator tab or Open it by menu (View>Team>Team Navigator)
Click: Connect To Team Server

Input Team Server: telde.local
Input Port: 7001
Input Username: tpcadmin
Input Passwort: welcome1
Choose: Connect
JDeveloper/Team Administration Now you can reach the Team Administration as follows
Now you are able to create user, assign team repositories and so on...


  • Calling the Test Server Page (<host>:<port>/otpc) you just get a simple message “Oracle Team Productivity Center” Request to Oracle: Please display some more information: Version, active connectors, etc.....!!! At the moment this does not look enterprise production ready!! Sorry. It looks like a prototyp so far……
  • Do I really have to create all the users into the OTPC repository by hand? Can’t I connect to an LDAP-Server? This also looks not enterprise production ready. Sorry.

Further Information

Monday, December 7, 2009

DOAG09: Deployment of ADF fusion web applications on Oracle WebLogic Server 11g


This year at DAOG 2009 (the german oracle user group) I had the chance to give a presentation on the interesting topic “deployment of adf applications on Oracle WebLogic Server 11g”.image

From my point of view it is interesting because there are some issues you need to consinder when deploying your adf fusion web app to a standalone WebLogic Server in your Test oder Production environment. It is not always as easy as deploying just to the local integrated WebLogic Server.


The following points are covered

  • Installation WebLogic Server 11g
  • Configuration WebLogic Domain for ADF11g/10g
  • Introduction of various deployment options: Jdev Remote, Console/EM, Ant, WLST
  • Deployment guide for needed artefacts: datasource, meta data service repository, security configuration
  • Overview deployment & needed configuration changes in clustered environment
  • Some best practices, some WLST fragments

Download: Deployment von ADF-Applikationen auf den Oracle WebLogic Server 11g

Language: only in german

Monday, November 23, 2009

ADF: Query-By-Example table filter bug

Status: open
Applies to JDeveloper:,

Today I tried if the Bug (discussed in is still reproducible.
And sadly to say: “Yes the bug still exists!”
The behaviour changed a bit but the table filtering feature still does not working as expected if used INSIDE PAGE FRAGMENT/TASKFLOW.
So take a look at the viewlet where I shortly explain the buggy behaviour.

Download Testcase:

Related resources

Sunday, November 22, 2009

TELDE - What's that?

If you are wondering what telde is all about then I would like to give a hint on a presentation my collegue Ulrich gave at DOAG 2009 : ADF 11g rich client development best practices . We are using TELDE for development, testing and so on...while developing Apps on the oracle stack (currently ADF11g/JDeveleloper/WebLogic/Oracle Enterprise Linux). So TELDE stands for

TEam Linux Development Environment

It consists of the following components right now:

Oracle Enterprise Linux 5.3

Oracle Database

Oracle WebLogic Server 11g

Oracle JDeveloper 11.1.1.x

Oracle Team Productivity Center

Hudson Continuous Integration Server 


SVN Server

running on VMWare.

So if you are interested in setting up such an environment, look at

Monday, November 16, 2009

WLS: Monitoring Oracle JRockit JVM with JRockit Mission Control remotely

Status: resolved
JRockit Mission Control: 3.1.2
WebLogic: 10.3.2

Use case

You have the need to remotely monitor and profile the JRockit JVM(s) of Oracle WebLogic Server.


  1. Install JRockit Mission Control on the client
  2. Configure WebLogic Server Domain with JRockit JVM
  3. Configure JRockit Management Server


 Oracle® WebLogic Server
Download from OTN
 Oracle® JRockit Mission Control 
Download from OTN 

How to

Login as oracle
on telde.local
[oracle@telde ~]$ cd middleware/user_projects/domains/base_domain/ [oracle@telde base_domain]$ vi
Putty/viAdd the following java Options before starting the WLS instance:


${DOMAIN_HOME}/bin/ $*

Save file and Close vi.
PuttyStart WLS

[oracle@telde base_domain]$ ./
Notice the starting of the management server

[JRockit] Management server started on port 7091, ssl=false, authenticate=false.

ClientStart JRockit Mission Control
JRMCCreate a new connection
Enter Host
Enter Port
Click: Test connection
=> Status keeps “Unable to connect”
Click: Finish

Starting the console on the newly created connection you might receive the following exception:

Could not open Management Console for telde.local. Connection refused to host:; nested exception is: Connection refused: connect Connection refused to host:; nested exception is: Connection refused: connect

So how to fix?

PuttyStop WLS
Add -Djava.rmi.server.hostname=<remotehost> to the java options so that it looks like


JAVA_OPTIONS="-Djava.rmi.server.hostname=telde.local -Xmanagement:ssl=false,authenticate=false,port=7091"

${DOMAIN_HOME}/bin/ $*

Save file and exit vi.

PuttyStart WLS once again

[oracle@telde base_domain]$ ./
JRMCNow try to test connection again.
Result should be
JRMCStart the console and monitor CPU, Mem, seak for memory leaks, etc.


java.rmi.server.hostname (1.1 and later)

The value of this property represents the host name string that should be associated with remote stubs for locally created remote objects, in order to allow clients to invoke methods on the remote object. In 1.1.7 and later, the default value of this property is the IP address of the local host, in "dotted-quad" format.

Tuesday, October 27, 2009

ADF: Export Collection ActionListener issue

Status: work in progress
WebLogic: 10.3.1


Create simple Fusion Web Application as follows:

  1. Create readonly VO in the Business Layer on a table with > 20,000 records and expose it through an AM
  2. Create simple JSPX in the ViewController project
  3. Generate readonly table on a PanelCollection by drag and drop from the data control palette
  4. Create a command button with ExportCollectionActionListener (type="excelHTML" and exportId="<id of the table component>")
    <af:panelCollection id="pc1">
    <f:facet name="menus"/>
    <f:facet name="toolbar">
    <af:toolbar id="t2" flex="1">
    <af:commandToolbarButton text="Test here: Excel Export"
    <af:exportCollectionActionListener type="excelHTML"
    <f:facet name="statusbar"/>
    <af:table id="t1" ....

Now observe the memory consumption of the WLS

  1. Run the web application
  2. View the Memory consumtion of WLS process: ca 400MB
  3. Click the export to Excel button.
  4. View the Memory consumtion of WLS process: ca 740MB
  5. Undeploy the application
  6. View the Memory consumtion of WLS process: ca 740MB
  1. A single export of 20,000 records consumes ca. 340MB
  2. It seems there is a memory leak because the memory consumption remains after undeployment.
  3. Same result on Windows XP and Oracle Enterprise Linux 5.3(32bit)

So why the export functionality consumes so much RAM?
Is there a memory leak? How to workaround?


Still in cooperation with Oracle Support… will be updated here.


In order to be more flexible and powerful it would be great to be able to implement own Exporter implementations, e.g.

<af:exportCollectionActionListener type="excelHTML" exportedId="t1"

or even better (like custom conveter concept)

<af:exportCollectionActionListener type="excelHTML" exportedId="t1" exporterId="myExporter" />

and in adfc-config.xml:

<exporter id="myExporter" class=""/>

Sunday, August 2, 2009

ADF: Text resource issue

Status: Resolved
WebLogic: 10.3.1

Last week I came accross a cool blog about ADF BUGS FACTS. The author inspired me to write myself about similiar experiences with ADF11/JDeveloper. So today I will describe a bug concerning the i18n capabilities in ADF11.

First I have to mention tha the support for i18n text resources improved very well with JDev11 but there is a case when things do not work correctly. So in the case your ViewController project name contains a dash. things do not work anymore as expected. So in our company we have following convention to name our applications/projects.


With that convention your not able to work with the “select text resource” feature on ADF Faces Pages, because invalid code is generated. So here is the example

jdev11_i18n_bug-1024x640Because the ViewController project is called myapp-ui you get the following buggy code



Solution is to remove the dash in c:set and of course all EL references.

<c:set var="myappuiBundle"


<af:outputText value="#{myappuiBundle.MY_APPLICATION_TITLE}" id="ot1"/>

After this fix the text resource is resolved correctly


Things learned

Don’t: use dashes (-) in project names! This may cause trouble in development of fusion web applications.

Related posts

Page Fragment Design view is messed up when using resource bundle

Comment from Milkbird: Thanks for your reference Andreas. I think this is realy usefull, since someone could loose a lot of time to find out what is wrong and how to fix it.