Monday, November 11, 2013

Oracle Endeca Information Discovery (OEID) 3.1 quick install

As you may know, Oracle Endeca Information Discovery OEID was released November 7th, I decided to download the product and go through the installation. The great news is that the installation process has been greatly improved compared to OEID 3.0. With OEID 3.1, the overall installation can be scripted using an “orchestration script” to install and configure
o Weblogic 10.3.6
o Oracle ADF runtime
o Endeca Server 7.6
o Endeca Studio 3.1
o Endeca Provisioning
The purpose of this post is to document at a high level the steps while I am going through the installation using the provided orchestration script. My OS is Microsoft Windows Server 2008 R2. This post will cover the software staging, scripts modifications and install. A future post will cover the OEID Integrator installation and sample data load and new features.
The software package is available from Oracle Software Delivery Cloud. 
1) Download the following media packages:
Oracle Endeca Server (7.6.0) media pack folder
- V40519-01: Oracle Endeca Server (7.6)
- V40521-01: Oracle Endeca Server (7.6) Sample data
- V29856-01: Oracle Weblogic 10.3.6
- V29673-01: Oracle ADF Runtime 11g Patch set 5
Oracle Endeca Information Discovery Studio (3.1.0)
- V40547
You’ll notice also the media pack V40522-01 (IKM SQL to Endeca Server for integrating with ODI) which is pretty exciting.
JDK version 6 is also a pre-requisite for the OEID 3.1 installation, I will be using JDK1.6.0_43.
2)  Create a folder that will hold the installation scripts and the binary installation files, for example C:\stage
3)  Unzip V40547—>—>eidOrch into c:\stage
The eidOrch folder contains 2 subfolders:
- installers: actual software binaries for Endeca Studio and Endeca Provisioning
- orchScripts: orchestration script for Endeca Studio and Endeca Provisoning
4) Unzip V40519-01 into C:\stage to get
5) Unzip and move the resulting subfolder “windows” to
6) Rename the folder that you just moved ES_windows_OC
7) Move the file to c:\stage\eidOrch\installers
8) Rename V29673-01 to, that’s the name expected by the installation script and move it to C:\stage\eidOrch\installers. Note that you can download from OTN.
9) Unzip the V29856-01 media pack, this is the Weblogic 10.3.6 jar file and move it to c:\stage\eidOrch\installers
10) Folder structure before installation

11) Run_EID_install.bat is the main script, it will call the following scripts
- eidOrch\orchScripts\ES_Windows_OC\run_endeca_server_install.bat (Weblogic, ADF runtime, Endeca server installation)
- eidOrch\orchScripts\Studio_windows_OC\run_endecastudio_install.batm(Endeca studio installation)
- eidOrch\orchScripts\PS_windows_OC\run_endecaprovisioning_install.bat (Endeca Provisioning)
The installations scripts will get the predefined configuration parameters from property files :
- eidOrch\orchScripts\config_EID_windows.prop
- eidOrch\orchScripts\ES_Windows_OC\config_win.prop
- eidOrch\orchScripts\Studio_windows_OC\config_Studio_win.prop
- eidOrch\orchScripts\PS_windows_OC\config_PS_win.prop
Following are screenshots property files, note that JAVA_HOME, ORACLE_HOME and INSTALLER_LOCATION are the main parameters that have to be adjusted based on your local settings. 
You also have the option to set additional parameters such as START_MODE, USE_SSL etc… One notable parameter for the Endeca_Server, Endeca_Studio and Endeca Provisioning product property files is INSTALL_MODE. This parameters specifies whether we’re performing an install only or an install followed by configuration. There are additional values to specify that there is an existing middleware installation. Refer to the documentation for more details. Note that this install will be NON-SSL, if using SSL ports, there are additional setting to be changed on the property files.

Open a DOS command prompt as Administrator and cd into c:\oracle\eidOrch\orchScripts\
Then launch the main orchestration script:
run_EID_install config_EID_windows.prop --temp-directory c:\temp
and watch the installation in progress. You will be prompted to enter parameters such Admin usernames/passwords (you can potentially modify the scripts to automate this step).
Caution:  if you're using a disk drive (for the temporary directory) that is different from the one that holds your scripts, the installation script will fail. In my case I had to modify the installation scripts as follows: search for the line
cd %TMPFOLDER%\bin
enter a new line below it with
This has to be done for run_endecaprovisioning_install.bat, run_endecastudio_install.bat and the endecaserver_install.bat

At the end, you’ll have the Endeca Server, Endeca Studio, Endeca Provisioning fully installed/configured and up and running in no time!
A much smoother install process for OEID 3.1 indeed!
p.s OEID software is now available for download on OTN

update: Several users are experiencing an issue when they try to invoke web services to import data (OES-000169: Could not connect to Endeca Server at 10:7001). The work around is to make sure that the Windows hosts has an entry with IP address, machine name.domain example: endeca


Monday, February 4, 2013

Creating BIP Gantt Charts using JFreeChart (cont.)

In my previous post I showed the majors steps for creating a simple Gantt Chart in BI-Publisher using the JFreeCharts API. The purpose of this post is to provide the technical details of the implementation. 
We first need to download the following JAR files:
· jfreechart-1.0.4.jar
· jcommon-1.0.8.jar
· Commons-code-1.5.jar
Extension code:
Create a Jdeveloper generic application
Application Name: GanttChart

Click Next to create a project:
Project Name: bip

Add a new Java class to the bip project 


I’ve created a Java class that will be packaged as a jar file and copied to the Weblogic folder. The purpose of this file is to:
1) Read in the XML from the BI-Publisher data model:
2) Organize XML data in the format expected by the JFreeChart API
3) Plot the Gantt Chart using the API
4) Return the generated image
5) BI-Publisher renders the image on the report
Update the code in Jdeveloper with the following is the code listing: this is a very crude code intended for testing only
/* ======================================
* JFreeChart : a free Java chart library
* ======================================
* Project Info:
* Project Lead: David Gilbert (;
* (C) Copyright 2000-2003, by Object Refinery Limited and Contributors.
* This library is free software; you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Foundation;
* either version 2.1 of the License, or (at your option) any later version.
* This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public License along with this
* library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307, USA.
package oracle.bip.extensions;
import java.awt.image.BufferedImage;
import java.sql.SQLException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.apache.commons.codec.binary.Base64;
import javax.sql.rowset.serial.SerialException;
import javax.xml.parsers.ParserConfigurationException;
import org.jfree.chart.ChartFactory;
import org.jfree.chart.ChartPanel;
import org.jfree.chart.ChartRenderingInfo;
import org.jfree.chart.ChartUtilities;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.entity.StandardEntityCollection;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;
public class bipExt {
public static String createGantt(NodeList bipXML, String taskName,
String taskStartDate,
String taskEndDate, String title) throws IOException,
ParserConfigurationException, SQLException, SAXException,
ParseException, NullPointerException {
final TaskSeries s1 = new TaskSeries("GANTT");
//Read in the start dates, end dates, task names as lists
ArrayList<String> startDate = new ArrayList<String>();
ArrayList<String> endDate = new ArrayList<String>();
ArrayList<String> taskname = new ArrayList<String>();
// First parameter list is the list of task start dates
for (int i = 0; i < bipXML.getLength(); i++) {
Node node = bipXML.item(i);
if (node.getNodeType() == Node.ELEMENT_NODE) {
Element element = (Element)node;
NodeList nodelist = element.getElementsByTagName(taskStartDate);
Element element1 = (Element)nodelist.item(0);
NodeList startDateNode = element1.getChildNodes();
String c1=startDateNode.item(0).getNodeValue().toString();
// Extract the canonical dates
startDate.add( c1.substring(0, 9));
// Second parameter list is the list of task end dates
for (int i = 0; i < bipXML.getLength(); i++) {
Node node = bipXML.item(i);
if (node.getNodeType() == Node.ELEMENT_NODE) {
Element element = (Element)node;
NodeList nodelist = element.getElementsByTagName(taskEndDate);
Element element1 = (Element)nodelist.item(0);
NodeList endDateNode = element1.getChildNodes();
String c2=endDateNode.item(0).getNodeValue().toString();
// Extract the canonical dates
endDate.add(c2.substring(0, 9));
// First parameter list is the list of task labels
for (int i = 0; i < bipXML.getLength(); i++) {
Node node = bipXML.item(i);
if (node.getNodeType() == Node.ELEMENT_NODE) {
Element element = (Element)node;
NodeList nodelist = element.getElementsByTagName(taskName);
Element element1 = (Element)nodelist.item(0);
NodeList labelNode = element1.getChildNodes();
String label = labelNode.item(0).getNodeValue();
BufferedImage chartImage;
bipExt gantt = new bipExt();
// Create the dataset expected by JFreeChart for the Gantt Chart Type
IntervalCategoryDataset dataset =
gantt.createDataset(startDate, endDate, taskname);
// Create the JFreeChart
final JFreeChart chart = ChartFactory.createGanttChart(
chart.setBackgroundPaint(new GradientPaint(0, 0, Color.white, 1000, 0,;
// Render the Chart as an image
final ChartPanel chartPanel = new ChartPanel(chart);
int width=450;
int height=270;
chartPanel.setPreferredSize(new java.awt.Dimension(width, height));
ChartRenderingInfo info = null;
info = new ChartRenderingInfo(new StandardEntityCollection());
chartImage = chart.createBufferedImage(550, 350, info);
byte[] buffered_image = ChartUtilities.encodeAsPNG(chartImage);
String image = new String(Base64.encodeBase64Chunked(buffered_image));
return image;
public bipExt() {
public static IntervalCategoryDataset createDataset(List sdate,
List edate,
List taskName) throws ParseException {
Iterator iterator = sdate.iterator();
final TaskSeries s1 = new TaskSeries("Schedule");
for (int i = 0; i < sdate.size(); i++) {
String c1;
String c2;
s1.add(new Task(taskName.get(i).toString(), new SimpleDateFormat("yyyy-MM-dd").parse(c1),
new SimpleDateFormat("yyyy-MM-dd").parse(c2)));
final TaskSeriesCollection collection = new TaskSeriesCollection();
return collection;

Add the previous 3 jar files to the project 


And create the JAR Deployment file


Once the JAR File is generated, copy it to the place where Weblogic  server expects it 


Log into to BI Publisher and “Change the Disable external references” flag to “False”, it is “True” by default. 

BI Publisher Report:
Create the BI-Publisher data model. For this example, download the ACTIVITIES table from the amis site and create a simple BIP SQL query:
select label,start_date,end_date from activities with the respective XML tag names: LABEL, START_DATE, END_DATE

Following is a sample XML data set from the data model 


Create an RTF template using BIP template builder with the following 3 form fields:
1) Namespace:

2) Create Gantt:
Call to the Java extension to pass in the XML data from BIP, the XML tag names and title, the result from the call is stored in a parameter called GanttIMG 


3) Display Gantt:
Display the image on the report 


Create a new BIP report using this RTF template and the previous data model.
Run your report, if all goes well: ta-da! 


Wednesday, January 23, 2013

Creating BIP Gantt Charts using JFreeChart

An overlooked feature of BI-Publisher is the ability to create custom extensions in Java in order to add capabilities beyond the out of the box features.  Tim Dexter blogged about this undocumented feature several years ago.
Using this feature, I was able to integrate BI Publisher with JFreeChart an Open Source plotting API in order to generate plots that are not provided by BI-Publisher such as the Gantt chart type. The main steps are as follows:
1) Create the BIP data model: as an example I used the sample Gantt data set from the amis website.

2) Create the BIP extension code in Java, I used Tim Dexter’s example as a starting point. I plan on sharing the custom code once I get a chance to clean it up.
Creating Gantt chart using JFreeChart is very straightforward and there are several examples on the web, other more sophisticated types of plots (box plots etc…) require more work. The only difficulty with JFreeChart is that it doesn’t support XML dataset as input, there are ways around that limitation
You’ll need the following JAR files available on the web:
· jfreechart-1.0.4.jar
· jcommon-1.0.8.jar
· Commons-code-1.5.jar
The resulting JAR file will have to be copied to the location expected by Weblogic, on my PC it is:

3) Create the BIP template, I used Template builder to create an RTF template with 3 fields

Create Gantt Chart: is the call to the custom Java code. My custom code call is:

I am basically feeding the XML data from BI-Publisher to the JFREECHART API as well as the XML tags
Display Gantt Chart: renders the resulting image (Gantt Chart) from JFreeChart

5) Change the “Disable External References” flag to “FALSE” (it is TRUE by default) in BI-Publisher

6)  Upload your RTF template, bounce the services and voila!
Pretty basic but the look and feel of this can be greatly improved by tweaking the JFreeChart API.