The Career and Life of Martin Naughton.I would like to show the world that shapes me as a person. Through the projects and information about me you will be able to make a judgement of what kind of person I am. Please scan my site for any articles I wrote to help you with your progress on your quest.

Sqlite 2 databases can not be correctly read by sqlite3

If you try to open a sqlite file that is created with sqlite 2 with sqlite3 command then you can get an error like this when running commands on that database

Error: file is encrypted or is not a database

The database file must be created and read by the same version of sqlite. Sqlite3 will not be able to see the tables created in the sqlite2 database.

This can also cause a problem if you are using the sqlite 3 jdbc connector with a sqlite database file that was created with sqlite2. Queries on this file will say that the table you are trying to access does not exist.

Using openhab bluetooth binding on linux

OpenHab does not distribute the bluecove GPL library in the Bluetooth binding because it is GPL licensed. OpenHAB is EPL (Eclipse Platform License) which is friendly to business since they do not have to open source their own bindings.

You will get this error if you do not modify the Bluetooth binding:

To fix the problem follow these steps:
unjar the org.openhab.binding.bluetooth-1.4.0.jar bundle

change directory to lib

Download the blue cove GPL jar from here

Add the Bluecove GPL library in lib directory of the bundle along with the blue cove jar

Add the new library to manifest:
Bundle-ClassPath: .,lib/bluecove-2.1.1-SNAPSHOT.jar,lib/bluecove-gpl-2.1.0.jar

SCCS cheat sheet

Source Code Control System is on old version control systems. It predates RCS which predates SVN. It can see how old it is now. Some companies still use in their legacy systems. To remind myself I have made a cheat sheet.

All commands start with a call to the sccs binary. For example "sccs edit".

Check out a new version of a file in SCCS

Just like uncheckout

Will get the latest file from the SCCS directory to your current location

Add a file to SCCS

This will remove all files in the current directory that you are able to retrieve again from SCCS. This is better then delete the file using a linux or unix command because you might delete files that are not under SCCS control.

Automated multiple terminal sessions

If you are a person that when they log on to their linux machine that you start alot of terminal sessions. Best way instead of setting up all these terminals maunally you set them up automatically.

  • This command will start a new terminal for you, list all directories and files and then stay logged in to the terminal. The bash command is there to start a bash prompt after the ls command is run.  If was not there then ther terminal would exit since the ls program has done its job.

xterm  -e 'ls;/bin/bash'

GIT Error "rejected non-fast-forward" when pushing changes

It means that your local master branch is out of sync with remote master/origin branch. All you have to do is issue a pull and your branch will be fast-forward. This happens even if you are pushing a new file that does not exist on the remote branch. Some one has made a change on the remote branch that you need to decide to pull down and merge with your branch. Once your branches are synchronized then it will allow you to push your changes.



Integration of M2Eclipse and Egit

A Maven project in a GIT repository can be imported in to Eclipse in 3 different ways.

What you will need installed already

  • M2Eclipse
  • Egit
  • m2eclipse-egit connector

Using the plugins separately.

Things I find annoying about M2Eclipse

Updating Settings.xml

When you update the settings.xml m2eclipse does not check it. The only way to inform M2Eclipse of the update is to

Windows>Preferences>Maven>User Settings.

Click on the button "Update Settings". Then you will have all the settings in the xml defined in your eclipse project.

Books for 2013

People recommend me books, I see books on websites to read and some times I think of a subject I should read up on so I need a book. At the moment the list is in my head so I think it is time to write it down for 2013 and the reason why.

JBoss Application Server 7 Configuration, Deployment and Administration : Started using this in work so will give me an edge.

Pomodoro Technique : I have been using this technique for 2 weeks and i think it works. I think the book will give me more advanced techniques to get the best out of 25 minutes of focus.

How to Talk to Anyone: 92 Little Tricks For Big Success In Relationships : Some one gave me this. I have no problem talking to any one but it can give some pointers to improve.

How to be more efficient with eclipse Part 1

Eclipse has a lot of powerful ways to improve has fast you develop your software. It has ways to automate some of the mundane taks so you do not have to spend time

There is a eclipse plugin to inform you of the keyboard shortcut when you do a task in Eclipse. After a few reminders you will be using the keyboard shortcut all the time you help you speed up your work.