Wednesday, June 30, 2010

Connecting Eclipse Project to IBM DB2CM Repository

Couple of days ago I had the task of connecting to a CM repository using the IBM CMv8 APIs , at first we had to put everything on one machine that contains both The Eclipse IDE and the CM setup so we can go on with the development with the APIs.
Then , and for the sake of separating the Development Environment form the server, we had to move the Eclipse to another machine on the same domain, to make our project able to communicate with the CM we had to do the following steps
  1. Install the db2 client so we can catalog both the RMDB and the LMSDB.
  2. Copy the cmgmt folder which contains the connectors form the original installation machine to the development machine in the same installation path C:\Program Files\IBM\db2cmv8\cmgmt
  3. For the project the following Java Archive (JAR) files are required to be put in the build path
    • cmb81.jar
    • cmbsdk81.jar
    • cmbview81.jar
    • log4j-1.2.8.jar
    • db2jcc.jar
    • db2jcc_license_cu.jar
    • db2jcc_license_cisuj.jar
    All of these files can be found in [IBMCMROOT] \lib\
  4. finally, add the cmgmt folder to your class path and you are set to go
Up to this point everything is up and running but I’ve had two thorns in my side
  • I have to install the DB2 client and catalog the cm database
  • The cmgmt folder is on a different place than the project is
Actually, I don’t know why in the first place I had to catalog the DB, so all I did is simply removing the DB client

The second problem was really a challenge, after two hours of working here is how you can solve it:
  1. Move the cmgmt folder form C:\Program Files\IBM\db2cmv8\cmgmt to the [PROJECTROOT]\cmgmt
  2. Edit the cmbcmenv.properties file so that the CMCFGDIR=cmgmt\\connectors
  3. Edit the ibmcmconfig.properties file so that the IBMCMWorkingDirectory=
  4. Change the ClassPath so it would point to the new folder location
Now you are all set, test the project
I’ve Enclosed a sample that you can download from this LINK

Friday, June 4, 2010

Linking NotePad++ To Compiler

In the following tutorial we will go through how to use Notepad++ as a IDE for Perl (or –Theoretically- any other programming language with a compiler/interpreter executable )

In this tutorial you’ll need to have
  • NotePad++
  • NppExec plug-in, it’s usually installed by default with Notepad++

First, open Notepad++ , go to Plugins > NppExec > Execute


window will popup with an empty textbox, copy and paste the following script into the box

press save and you’ll have something like the following picture:

put a name for your script in the box (on the bottom left), and press save.

Now , test your script by pressing Shift+F6, a console window should shpw up in the buttom of the screen showing you the command prompt result

in order to make that complete, we need to add the CGI extension to Notepad++ so when you open any file the program instantiously colorize the syntax without forcing you to choose the language from the language menu
you’ll need to edit the lang.xml file found in NOTEPAD++ DIRECTORY/langs.xml
you’ll need to edit this file with some editors, for now i’ll just open it with IE to show you where you’re supposed to edit

of course I've already added the CGI extension as you can see in the picture changing the line

to be

save your file and test the Notepad.
i hope you’ve enjoyed reading this tutorial, till we meet cyberians, bye

Tuesday, June 1, 2010

How to Boot into single user mode

You can do that by modifying the grub boot option on startup.
  1. Press 'e' to edit startup
  2. Use the arrow keys to highlight the kernel line and press 'e' to edit the parameters
  3. At the end of the line, add the word 'single' (without the ' ) and press Enter
  4. Press 'b' to boot the system
GRUB will boot single-user Linux mode. After it finishes loading, you will be presented with a shell prompt similar to the following:

You can now change the root password by typing