Oracle – Installing Oracle Datamodeler on Ubuntu 16.04

oracleoracle-sql-data-modeleroracle12cubuntu-16.04

I'm in the process of setting up an oracle development environment on my Ubuntu 16.04 workstation. Installing Oracle 12c was a challenge, but there were several very useful tutorials that put me on the right track. Following Dizwell's instructions — SQL developer was a piece of cake to set up.

Initially, i was able to convert oracle's rpm package to a deb and install it succesfully. The first time I launched datamodeler it worked properly. On all subsequent launches I recieve the following series of errors:

Custom UI class oracle.bali.ewt.olaf2.OracleLookAndFeel not on classpath
Error: Data Modeler can't recognize the JDK version

I've purged and reinstalled the .deb package several times, and I can no longer get it to launch. Any suggestions on how to proceed would be appreciated.

To install DM, I followed Oracle Noob's Instructions as below:

sudo alien --scripts data*rpm
dpkg -i data*deb

I added this line to the datamodeler startup script:

unset -v GNOME_DESKTOP_SESSION_ID

Best Answer

Today, I need to get thorough the installation of Oracle Data Modeler (ODM) on my Ubuntu 16.04 and I've done this with success with below steps.

Info: Done as a sudo non-root user

Install Java

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer

Set the version of Java (java, javac):

sudo update-alternatives --config java
sudo update-alternatives --config javac

Then check if the version is correct

java -version
javac -version

and you should see something like:

$ java -version
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)
$ javac -version
javac 1.8.0_121

Install Oracle Data Modeler

I use most updated, stable version of ODM for the day of writing this answer (v4.1.5).

Before start we need alien converter, so we do:

$ sudo apt-get install alien
  1. Then download the modeler (here)
  2. Use alien to convert the *.rpm package into *.deb

    cd <where-you-download-the-rpm-package>
    sudo alien datamodeler-4.1.5.907-1.noarch.rpm  # it might take some time
    sudo dpkg -i datamodeler_4.1.5.907-2_all.deb
    

Small note about using --scripts flag (ref:alien manual)

-c, --scripts

Try to convert the scripts that are meant to be run when the package is installed and removed. Use this with caution, because these scripts might be designed to work on a system unlike your own, and could cause problems. It is recommended that you examine the scripts by hand and check to see what they do before using this option.

  1. After this step, you're able to run it form the console:

    $ datamodeler
    

Note: If you want to run Data Modeler from startup, then you need to add new entry into the /usr/share/applications (for all users) or ~/.local/share/applications/ (only for current user) like the example below.

[Desktop Entry]
Version=1.0
Type=Application
Name=Oracle Data Modeler
GenericName=Oracle Data Modeler
Comment=Oracle SQL Developer Data Modeler is a free graphical tool that enhances productivity and simplifies data modeling tasks.
Exec=datamodeler
Terminal=false
MimeType=text/plain;
Icon=datamodeler
Categories=SQLEditor;Development;
StartupNotify=true
Actions=Window;Document;