Apex and Charts

In Application Express 2.2 and previous releases is it possible to build a Chart with the use of the SVG Viewer technology of Adobe. A time ago Adobe has decided to discontinue support for Adobe SVG Viewer starting from January 1, 2008. They even plan to remove Adobe SVG Viewer from the Adobe.com download area on January 1, 2009, and redistribution by third parties is not allowed by the license.

Consequently the end of building a SVG Chart in Apex is near. The Apex development team came out with another solution for building charts, the Flash Chart.

Flash is known for his rich animations. With the use of Flash, you will be able to have full control in the design of your chart. The developer’s creativity can be maximized. Despite the more possibilities, it will not be more difficult to create a chart in an application. The Flash Charts in Apex are set the same way SVG Charts were set. The chart definition will also consist of several query series and its attributes can easily be set in the chart attributes. When you want a more advanced chart with rich animation, you can update the source of the chart in its region.

If you can not wait until Apex 3.0, you can use the XML Charts developed by Denes Kubicek. These charts also use the Flash technology. The difference with Apex 3.0 Flash Charts is that the charts are setup with the use of database objects. Denes created a way to define charts more generically. The chart’s definition will be setup from the database. The chart settings are kept in a database table as well as the chart layout is hold as several templates in another table. With a request from the application to a procedure in the database package, the chart definition will be set and sent back to the application.

The XML charts of Denes Kubicek, have certainly their advantages. It isn’t necessary to define separate series. All the chart values will be sent by one SQL query. It is also possible to debug the chart definition. The XML that is used to setup the chart could be loaded in a predefined Oracle directory.

Because the XML charts have most of the advantages of Apex 3.0 Flash charts and because it is much more generic I recommend you to go for this method when you have to create several charts in a specific layout. It will also be easier to define one template layout that is used for more than one chart.
When you only have to create one simple chart, I recommend to not choosing for an XML chart. An Apex 3.0 Flash chart will be better in this case because it is easily built in the Apex tool and the database schema doesn’t have to be extended with three objects just for creating one chart.

For more information about XML Charts, have a look at Denes’ sample application:
http://htmldb.oracle.com/pls/otn/f?p=31517:74

The charts represented in some examples:

SVG Chart

Flash Chart

XML Chart

Reporting in Apex 3.0

In the next Application Express release, PDF reporting will be included. No more external tools are needed because the reporting will be built in the Apex tool.

There are several formats to report from the Apex tool. PDF, HTML, Excel as well as Word will be supported. The reporting can be setup from two different places.

It is possible to print out the report region result with the use of a link under the report. The second place to implement a pint-out can be done with the use of a button, list item or other navigation item. The item calls to a general defined report definition.

For defining a print-out link under the report, Apex introduces a third, new navigation tab. This tab is positioned next to the Report Attributes tab in the Report’s tab-set. The tab is named Print Attributes. Here you can define the label of the link and other attributes like font colors and alignments. By default all columns will be printed, but they can be limited to a specific output.


The implementation of a general defined report is set in the Shared Components of the application, more specifically in the Report Queries of the application. A Report Query is the definition of a report. The report data will be retrieved from a SQL query result. The query can consist of bind variables, these are items that are known in the session, for example application items or page items.


The report layout is based on a predefined Report Layout. It is possible to choose for the default general layout or you can choose to create your own layout.

When you choose to create you own layout, you need to use the Oracle XML Publisher Template Builder for MS Word. With this tool, you can make a template that can be used to show the report output.

As the name speaks for itself, XML Publisher makes use of XML files. So we need a XML file before we can start defining our custom layout. Apex gives the possibility to download a print of the query result in a XML file. With the data of the XML file, you can create a RTF file in the XML Publisher Desktop tool.


The layout(s) of the report is separated from the definition of the report. The RTF files or XSL-FO files can be uploaded in the Report Layouts of the application. This can also be found below the Shared Components of your application. After the report template is uploaded the report query definition need to refer to your custom layout.

Finally when the report query definition is complete, you need to implement a call to the definition on one of your pages. Add the end of the report query wizard, an URL is put together.

By example:
f?p=&APP_ID.:0:&SESSION.:PRINT_REPORT=MyReport

What’s remarkable about this URL is that the request is send to page zero and a new parameter is known in the URL structure. The parameter’s name is PRINT_REPORT and it‘s value in this case is MyReport which refers to the name of my report query.

That URL will be used to integrate the report into your page(s). You will use the URL as a target for buttons, list items or other navigation items.

What happens when the navigation item is pressed?

  1. The parameter PRINT_REPORT refers to the defined report query MyReport.
  2. The XML document will be generated with the returned data from the SQL Query.
  3. The XML file will be used by XML Publisher to load the data in the chosen report layout.
  4. The layout will be formatted in the right report format.
  5. A download window disappears at the client to open or save the file.

Have a look at some examples:
http://apex.oracle.com/pls/apex30/f?p=2381

XML Publisher won’t start up anymore … !!!???

A month or two ago, I installed Oracle XML Publisher on my notebook. In order to run XMLP you need to run the “Oracle XML Publisher Enterprise start” (OC4J) via the Start Menu first. Next, you can run XMLP in your internet browser.

First it worked fine, but one day, XML Publisher wouldn’t start up anymore… and apparently the cause was the OC4J that failed to get up and running, as starting the OC4J start-up script resulted in the following error:

2006-12-04 09:47:57.453 ERROR Failed to set the internal configuration of the OC 4J JMS Server with: XMLJMSServerConfig[file:/C:/oracle/product/10.1.0/db_1/oc4j/ j2ee/home/config/jms.xml]

As my knowledge of Java is very limited, and there was nothing else I could think of that would solve my problem, I decided to simply re-install XMLP and … it worked again. But after a while, the old problem came back … Only did re-installing the software not work this time …

I went to look in the OC4J log files, and found that apparently my IP-address had shifted. Via the command ipconfig, I figured out that the IP-address causing the OC4J not to start, corresponded to my Wireless Network Connection… I disabled the WNC, and … EUREKA! It worked fine again. At least: I was able to start XMLP again, and fortunately I had my LAN-cable plugged in, so that I could access the database and continue with what I was doing.

But still, I kept wondering what went wrong, and why it went wrong and what if I really need that wireless connection to be enabled, while using XMLP?

Recently, I found an answer:


“You have encountered a “safety feature”
within the lightweight (pure java) OC4J Java Messaging System (JMS)
implementation. The OC4J Java Messaging System creates a lock file to constrain
access to a specific persistent message store to the single OC4J instance that
created it.”

“The persistence lock file captures
information about the OC4J instance that owns or previously owned the
persistence store and this information includes the IP address of the owning
oc4j instance. During startup if the OC4J Java Messaging System (JMS) discovers
that a persistence store it has been configured to use has a lock file that it
doesn’t own it will abort the startup procedure to avoid data corruption.“


Opening, for instance the jms.state.lock file shows the following:


F10.1.54.115:/C:/oracle/product/10.1.0/db_1/oc4j/j2ee/home/persistence/


… where the IP-address at the beginning of the line is – coincidence or not … – my Wireless Network Connection!!! So, a change had taken place at the network level since I last started an OC4J instance, causing the OC4J not to start anymore.

The start-up problem can be resolved via the following steps:

  • Ensure that there is no running OC4J instance that is accessing the persistence store
  • Navigate to the “persistence” directory for the OC4J instance that fails to start
  • Remove the “.lock” files

When starting the XMLP OC4J instance, the *.lock files will be created again, but your OC4J will start without any problem, as they will contain the correct IP-address.


Reset Oracle Single Sign-On password

As of Oracle Portal Release 10.1.4, there’s a standard procedure to allow users to reset their password.

In order to get this thing working, users will have to provide a “Password Reset Hint” and an “Answer to Password Reset Hint” in their profile. This can be achieved through http://infra_host/oiddas/ui/oracle/ldap/das/mypage/ChgPwdMyPage.

When this information is submitted to the LDAP server, users can use http://infra_host/oiddas/ui/oracle/ldap/DASStep1ResetPwd to reset their password.

Oracle Web Service Manager

Another environment we should get familiar with…

The Oracle Web Service Manger will enable you to implement security without modifications to the existing Web Services, it will as a matter of fact create a gateway through which you access existing services.

Every service you register to the gateway will be made available through a new service URL and you can modify the security, logging or content validation of the service by using the Oracle Web Service Manger. You can, for instance, change the way a request is handled by adding additional steps to the request processing.

By default a request “pipeline” (that’s how the different steps in the processing are called) will write log information to the database. This pipeline can be extended without coding by adding different pipeline steps. During the workshop we added steps to extract credentials from the HTTP Request (or SOAP envelope), authenticate to a LDAP Directory and authorize using service roles which are defined in the LDAP Directory.

All of this was configured and tested within 5 minutes!!

I’m looking forward to the production release of Oracle Web Service Manager because sometimes we had to “stop and start all services” to work around some strange behaviour…



SOA Suite

Today, I attended a workshop at Oracle to get a first glimp of the SOA Suite 10.1.3.1. We used the “Developer Preview” of JDeveloper 10.1.3.1 to develop a few simple Web Services. The software is not yet available on Oracle Technet, but it will be…soon….

The installation of Oracle SOA Suite is very simple, run the installer and click “next”, “next”, “next”, … “finish”. By default, it installs an Oracle Lite database to store the metadata together with an Oracle Application Server 10.1.3.1. which provides a number of applications:

  • Oracle Web Services Manager
  • Oracle Business Rules Author
  • Oracle Enterprise Service Bus
  • Oracle BPEL Process Manager Controll
  • Oracle Application Server Controll

One nice thing is that the Oracle Application Server is configured for Single Sign-On and it uses jazn-data.xml. This limits the amount of memory needed for the installation because you don’t need to install Oracle Internet Directory! For those of you who want to simulate the production environment, Oracle Application Server Controll enables you to change the security provider to Oracle Identity Manager, a 3rd Party LDAP Server (with standard support for Active Directory and Sun Directory Server) or use a custom JAAS security class to integrate with other LDAP Servers.

Now lets focus on what we tested tested today.

We used the JDeveloper wizards to generate and deploy a Web Service based on a Java class, and a Web Service based on a PL/SQL Stored Procedure. Nothing exciting because we already saw that working in previous JDeveloper releases.

We used Oracle Application Server Controll (formerly known as Enterprise Manager) to test the generated Web Services. No need to learn the URL’s to the deployed Web Service by heart, just navigate to the “Test Service” link and fill in the HTML form that’s generated by OracleAS. There’s even a possibility to stress test the service by entering the number of simultaneous threads, number of loops and the delay in ms.

The more demanding developers can:

  • configure Web Service Auditing
  • configure port level reliability features to guaranty response delivery and eliminate duplicate requests
  • enable authentication mechanisms like username/password, certificate or SAML authentication
  • sign SOAP messages to ensure integrity
  • encrypt the SOAP message to ensure confidentiality

really nice stuff, and we didn’t use the Oracle Web Services Manager yet!!

Off course, in real life, not all Web Services are deployed to an Oracle Application Server. That’s where Oracle Web Services Manager comes into the picture.

But I’ll come back on that tomorrow….

Oracle Identity Management Suite

Within the near future Oracle will release it’s new Identity Management Suite 10g, version 10.1.4, incorporating the entire stack of new security products. Xellerate, CoreID, OctetString, etc. Spooky !!

For a detailed explanation of all the new and exciting products and features I gladly refer to this website.

Now … being a good consultant, I can not wait until the fully integrated suite finally arrives.

Oracle recently released a new version of Xellerate - i.e. Oracle Identity Manager (OIM) -, it’s newly bought provisioning platform which will probably replace the ODIP functionality – Oracle Directory Integration Platform – currently available within the Oracle Application Server stack as part of the Oracle Internet Directory (OID).

To get familiar with this new product, within the next weeks, I would like to do a setup with the following requirements:

  • use our Microsoft Active Directory as the source user repository
  • provision, through OIM, the OID of our Oracle Portal website
  • provision, through OIM, the userbase of our knowledge base, writtin within HTMLDB/Apex and hosted on an Oracle 10g Database

(to be continued)

Oracle Drive


A few months ago, I bumped into an interesting beta product named Oracle Drive. Meanwhile the production release is available and I started experimenting with it.

This piece of software enables you to map a WebDav folder as a “normal” network drive on your desktop.

Why is this so interesting?
Well, these WebDav Folders are implemented using an Oracle Portal Page Group. Windows Explorer can be used for manipulating documents and folders, while the right-mouse-button-menu redirects the user to Oracle Portal for administration tasks like:

  1. Configuring version support
  2. Granting/Revoking access rights
  3. Locking documents/Folders
  4. Setting additional document properties

Every document you access, will be cached for offline use on your desktop machine. No more hassle with memory sticks or other storage devices, just take your laptop with you and continue to work on the “network share”. The changes you made will be synchronized to the WebDav folder when you go online again. Off course, you can select documents to be Always Available Offline, independent of the state of your local cache.

Next to all these “Content Management Features”, Oracle Drive can be configured to backup the files on your local harddisk. This backup can be scheduled and copies your files to a WebDav folder.

All documents are stored in the database and can be backed-up up using the standard Oracle procedures.

The software can be downloaded from Oracle Technet and configuration of Oracle Drive is explained in this white paper.