Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[stellation-res] Stellation + Firebird docs

Hi All,

The attached file is a first draft for Stellation + Firebird how-to
instructions.

Your comments are welcome.

BTW, the sources I checked this evening introduced some problem at
database configuration. Tomorrow I will trace it.

Regards,

Rodolfo

-- 

 MAXPROGRAMS
 IBM Business Partner
 Microsoft MSDN Business Connection Partner
 rmraya@xxxxxxxxxxxxxxx
 http://www.maxprograms.com

Title: Using Stellation with Firebird as database backend

Using Stellation with Firebird as database backend

Basic setup procedure

Rodolfo M. Raya


Abstract

This article shows how to install Stellation using Firebird as database server on Linux . The procedure has been tested using Red Hat Linux 7.3 with Firebird Classic Server 1.0, other Linux distributions and Borland's InterBase 6.0.x can be used with a few modifications.

Getting all the pieces

There is a small set of tools that you need to get Stellation working with Firebird or InterBase. Here are the links that you should follow to obtain everything:

  • Java 2 SDK

    Visit http://java.sun.com or IBM WebSphere Developers Domain to get a Java SDK. All tests were actually performed with SUN Java 2 SDK 1.3.1_04

    Important: Make sure you define and export an environment variable named JAVA_HOME pointing to where you installed the Java 2 SDK.

  • Eclipse

    Go to http://www.eclipse.org/downloads/index.php and select a recent Release like 2.0 or 2.0.1 . If you want Release 2.0.1, the following are links to download Motif or GTK 2.0 version.

    The rest of the text assumes that you have installed and configured Eclipse. At Eclipse FAQ you can find tips to achieve this.

  • Stellation

    The steps to obtain Stellation from CVS repository are:

    1. Start Eclipse and open CVS Repository Exploring perspective (Window -> Open Perspective -> CVS Repository Exploring).

    2. Right click on CVS Repositories pane and select New -> Repository Location.

    3. Fill the "Add CVS Repository" form with the following data:

      Table 1. CVS parameters

      Host:dev.eclipse.org
      Repository path:/home/technology
      User:anonymous
      Connection type:pserver

      The final connection string should be: :pserver:anonymous@xxxxxxxxxxxxxxx:/home/technology

    4. Connect to the new repository location and expand HEAD branch.

    5. Right click on org.eclipse.stellation and select Check Out As Project in the pop-up menu.

    6. Go get a cup of coffee.

    After following all the above steps you should have the latest version of Stellation stored in your Eclipse workspace.

  • Firebird or InterBase

    Inprise Corp (now known as Borland Software Corp) released the code of InterBase under InterBase Public license v1.0 on July 25, 2000. That code gave birth to Firebird, an open source relational database. Some time later, Borland decided to stop releasing InterBase as open source and withdrew source and binaries from Borland's website.

    If you want to try Firebird 1.0 get it from http://firebird.sourceforge.net/index.php?op=files&id=fb10 . Stellation has been tested with Firebird Classic Server for Linux, available in .rpm format at http://prdownloads.sourceforge.net/firebird/FirebirdCS-1.0.0.796-0.i386.rpm

    Borland's open source InterBase 6.0.2 binaries are still available from Mers, at http://mers.com .

    To use either Firebird or Borland's InterBase with Stellation you must download InterClient --a JDBC driver-- from http://firebird.sourceforge.net/index.php?op=files&id=interclient .

  • Jakarta ANT

    Ant is needed to build Stellation. Go to http://jakarta.apache.org/builds/jakarta-ant/release/v1.5/bin/ and download jakarta-ant-1.5-bin.tar.gz . Uncompress it with tar -zxvf in "/opt" (or where you store your tools) and add "/opt/jakarta-ant-1.5/bin" to your PATH variable.

  • Additional libraries.

    Stellation requires a few additional jars that you can get from the original developers.

    You can also get Xerces, Log4J, ORO and JDOM packed as Eclipse plugins.

    1. Start Eclipse and open Update Manager perspective (Help -> Software Updates -> Update Manager).

    2. Right click on feature Updates pane and select New -> Site Bookmark...

    3. Fill "New Site Bookmark" writing "Ringo de Smet site" in Name (Ringo is the author of these Eclipse plugins) and "http://stecl.sourceforge.net/eclipse/updates/" in URL and click on finish.

    4. Expand the new site and install the plugins one by one.

    Once you have downloaded and installed all additional libraries create a directory named "stellation" in your home directory. Then, inside it create a subdirectory named "lib".

    Finally, copy xercesImpl.jar , xmlParserAPIs.jar , jacarta-oro.jar , jdom.jar , jdbc7.2dev-1.2.jar and log4j.jar to $HOME/stellation/lib

Firebird installation

Follow this recipe and everything will be ok:

  1. Change user and become root.

  2. Install Firebird package with rpm -ivh FirebirdCS-1.0.0.796-0.i386.rpm

  3. Add "/opt/interbase/bin" to your PATH variable.

  4. Goto "/opt/interbase" and create a directory named "interclient".

  5. Copy interclient_201_linux-xinetd.tar.gz to "/opt/interbase/interclient".

  6. Change to "/opt/interbase/interclient" and uncompress the driver with tar -zxvf *.gz .

  7. Copy /opt/interbase/interclient/xinetd.d/interserver to /etc/xinetd.d

  8. Make /opt/interbase/interclient/interserver an executable file executing chmod +x /opt/interbase/interclient/interserver .

  9. Add the following 2 lines to /etc/services

    gds_db        3050/tcp
    interserver   3060/tcp
  10. Restart xinetd executing /etc/rc.d/init.d/xinetd restart

  11. Add "/opt/interbase/interclient/interclient.jar" to your CLASSPATH variable.

Stellation installation

The coockbook recipe to bake a Stellation system is:

  1. Goto the directory where you installed Eclipse

  2. Execute cd workspace/org.eclipse.stellation/plugins/org.eclipse.stellation.misc

  3. Edit build.xml and delete the line that sets the property build.compiler to jikes and adjust the property java.dir and make it point to your $JAVA_HOME/bin directory.

  4. Execute ant bundle , cross your fingers and expect a BUILD SUCCESSFULL message.

  5. Copy stellation-dist.zip to $HOME/stellation

  6. Goto $HOME/stellation

  7. Unzip stellation-dist.zip

  8. Change user and become root

  9. Execute ant install-bundle , cross your fingers again and expect another BUILD SUCCESSFULL message.

  10. Copy the contents of $HOME/stellation/lib to $JAVA_HOME/jre/lib/ext or add each jar to your CLASSPATH variable.

    Warning: the latest step may generate conflicts with xercesImpl.jar and xmlParserAPIs.jar at Eclipse startup.

Testing everything

If all the previous step were successfull, you are now ready to create a new Firebird database and use Stellation to store your projects there.

Database setup

Invoque /opt/interbase/bin/isql and you should see:

$ /opt/interbase/bin/isql
Use CONNECT or CREATE DATABASE to specify a database
SQL> _

Next, create a database in your home directory

SQL> create database 'localhost:/home/yourHome/Stellation.gdb' default character set none;

Commit your changes and you are ready to start Stellation

SQL> exit;
$ _

Configuring Stellation

The first step will be to become root and start the server typing:

/usr/local/lib/stellation/start-stellationd --logfile=/var/log/stellation --debug=0

If you see something like

Server started on process 2362
Port option = 6060
Server starting on port 6060
Server thread started

Then, it's time to pat yourself in the back and get another cup of coffee. Otherwise, start reading this document again and check every step.

Now leave user root and become yoursel to try SVC.

Type svc and expect the following:

$ svc
Try svc --help for more information

Finally, configure SVC to use your new database with the following commands:

$ svc configure default
$ svc configure option location=firebird:/home/yourHome/Stellation.gdb
$ svc configure database

Guess what? you are ready to use Stellation with your Firebird database. Congratulations!!!

What's next?

Now that you have everything configured you can test Stellation with your own projects.

Visit Sellation documentation pages and follow the Tutorial (skip PostgreSQL related sections) and keep learning.

If you like Stellation + Firebird combination you can help extend them.

The next steps supporting Firebird in Stellation are:

  • Add support for the new Firebird Type 4 JDBC driver

  • Add support for remote Firebird servers and port selection. Current port only works with localhost and port 3060.

Resources

You can ask question relative to Stellation usage in news://eclipse.org/eclipse.technology.stellation . To access this server you have to request a username and password using the apropriate link at http://www.eclipse.org/newsgroups/index.html .

If you have questions related to Stellation development join Stellation Mailing List

Visit http://firebird.sourceforge.net/index.php?op=lists for a list of Firebird mailing lists and newsgroups.

Last, you can contact the author of this article at <rmraya@xxxxxxxxxxxxxxx> asking for support, but don't expect any miracle.


Back to the top