David R. Heffelfinger

  Ensode Technology, LLC

 

BlackBerry Bold, Google Maps and GPS


One of the main reasons I upgraded my old BlackBerry device to a BlackBerry bold is because the Bold has GPS. AT&T Navigator is the default GPS application that comes with the device. Although I haven't actually tried it, it seems like a nice application, with turn by turn directions and automatic rerouting. AT&T Navigator comes with a 30 day free trial, after that it adds $10 a month to the cell phone bill.

Although I drive in unfamiliar territory frequently enough that a GPS can be useful, it is not frequently enough to justify the extra $10 a month on the bill. Thankfully there is an alternative. mobile Google Maps on the BlackBerry can take advantage of the device's GPS functionality.

Yesterday I had to make a 50 mile trip, although the trip was on familiar territory, I decided to try out the GPS functionality of the BlackBerry and Google Maps.

One nice thing about Google Maps is that it can provide directions from your current location to wherever you are going. Therefore if hopelessly lost it can find your way for you. Directions "from" and "to" can be entered, or the current location can be used as the starting point.

Once "from" and "to" addresses have been entered, Google Maps will highlight the route in the map, showing clearly where turns need to be made. Where the GPS comes into place, a blue dot will be shown in your current location, therefore you know at all times where you are in the map.

Pressing "I" on the BlackBerry Bold's keyboard will zoom in the map, where "O" will zoom out. I found that the default zoom is sometimes too zoomed in, letting you know about an exit about two seconds before you need to take it. The ability to easily zoom out was very useful. The disadvantage of zooming out is that the street names may become unreadable.

The Google Maps help states that the number "6" needs to be pressed to see the next turn, and the number "4" needs to be pressed to see the previous turn. I thought this would be cumbersome since on the BlackBerry the "alt" key needs to be pressed to punch in numbers. Thankfully it is not necessary to do press "alt" to get the previous and next turns, simply pressing "S" (which with "alt" is the number 4) and "F" (which with "alt" is the number 6) takes you to the previous/next turn, respectively.

Pressing "0" will take you to your current location in the map.

If using the GPS frequently enough, it may be a good idea to invest in a car charger, as leaving the screen on for a long time to look at the GPS takes a toll on the battery.

Although I wish Google Maps would provide spoken turn by turn directions, it really isn't a bad application for those times when GPS functionality is needed, and the price certainly cannot be beat.

 
 
 
 

Installing Amazon MP3 Downloader under Ubuntu 64 bit


Being a child of the 80's, I love listening to music I grew up with. Unfortunately, it seems most of the 80's compilation CDs out there made a conscious effort to find the suckiest songs of the 80's and put them together in a CD. It seemed like the really good music from that era had just but disappeared.

Today while browsing Amazon I ran into some MP3 downloads for some songs I hadn't heard in about 20 years, the good stuff that I thought had dissappeared, I, of course, became very eager to add these songs to my collection.

When downloading individual songs in Amazon, no special software is needed, however, the Amazon MP3 downloader is needed to download complete albums.

They have a few Linux versions for Fedora, Debian, OpenSUSE and Ubuntu. The only version of Ubuntu they support is Gutsy Gibbon, which is two versions behind the latest, Intrepid Ibex.

Feeling brave, I tried to install the Ubuntu Gutsy Gibbon Amazon MP3 Downloader under Intrepid Ibex, unfortunately the installer failed, telling me that the architecture was wrong. The deb package available on Amazon is for i386, and I run the 64 bit version of Ubuntu Linux.

I googled around to see if there was a way to install 32 bit packages under 64 bit Ubuntu, I ran into getlibs.

getlibs is a script that downloads any missing libraries for any installed package.

In summary, what I had to do to install the Amazon MP3 Downloader under 64 bit Ubuntu was to get getlibs from http://www.boundlesssupremacy.com/Cappy/getlibs/getlibs-all.deb. Simply clicking on the link results in the package opening in GDebi, it should install without issues.

Once getlibs is installed, the Amazon MP3 Downloader needs to be installed, passing a parameter to ignore the architecture difference:

sudo dpkg -i --force-architecture amazonmp3.deb

This will install the package, it will be placed under /usr/bin/amazonmp3, however at this time it won't run properly because of missing libraries. In order to get the libraries, we need to run the getlibs script:

sudo getlibs /usr/bin/amazonmp3

At this point the application should be "good to go" and able to download MP3 albums from Amazon MP3 Downloads.

NetBeans 6.5 Final Now Available


It has come to my attention that NetBeans 6.5 final is now available.

It can be downloaded from the NetBeans web site.

If you would like to learn the ins and outs of enterprise Java development, my book, Java EE 5 Development with NetBeans 6, may help.

 
 
 
 

Streaming Internet Radio on BlackBerry


For a few years, I have been listening to internet streaming radio with Shoutcast, there are several programs in Linux that I can use to listen to the streams, I currently use Rhythmbox, but in the past I have used Audacious and XMMS, they all work great to listen to internet streaming radio on my laptop.

I have been wanting to be able to listen to internet radio on my BlackBerry for a while, but I hadn't been able to find any software to do it. I had seen some references to Radio Bee, but I hadn't been able to get it to work.

Yesterday I decided to look once again, and I bumped into FlyCast, I downloaded it over the air, and it installed flawlessly. The first time I ran it, it asked me to register by providing my email address. Once I did that I was able to run it, and lo and behold, I was listening to streaming internet radio on my BlackBerry Bold!

So far I have only used it with a WiFi connection, and it works great, very little or no buffering. I have yet to try it under 3G or edge, so I have yet to see how well it works when a WiFi connection is not available.

FlyCast's web site does not specify if the software is free, if there is a trial period or if you have to register. I was expecting some kind of nag screen or a point where it would ask me for my credit card information, but so far it hasn't happened, although I've only been using FlyCast for two days. When most songs play, the album cover for the song is displayed on the BlackBerry screen, clicking on it with the trackball takes you to the Amazon site and gives you the opportunity to buy the CD. I assume that is how FlyCast will make its money, by being an Amazon affiliate.

Update: I was able to try FlyCast out over 3G recently and it still works great.

 
 
 
 

Blackberry Bold and Google Sync Gotcha


Like I mentioned recently, I just upgraded my old BlackBerry to a BlackBerry bold.

One very nice application I had in my old BlackBerry is Google Sync, it allows seamless synchronization between the BlackBerry calendar and Google calendar.

Of course, one of the first things I did when I got my new BlackBerry was to install Google Sync. Well, yesterday I added a new appointment to Google calendar, and when I check the appointment on my BlackBerry Bold I noticed that the time for the appointment is wrong, it is set to 5 hours later than the correct time.

Turns out that the BlackBerry Bold comes preset to Greenwich Mean Time (GMT), but of course I am not in that timezone, instead I am on Eastern Standard Time (EST). When synchronizing between Google Calendar and the BlackBerry bold, the timezone conversion was done automatically.

Once I found out what the issue was the solution was trivial, set up the timezone in the BlackBerry bold to EST by going to Settings | Options | Date/Time and setting the correct time zone.

 
 
 
 

Synchronizing Contacts Between Two Blackberries Under Ubuntu Intrepid


I just upgraded my old Blackberry to a Blackberry Bold. I of course wanted to transfer all my old contacts to my new device. I transferred all my contacts to the sim card and installed the sim card in the new phone, however that is a less than ideal solution since the sim card splits the contacts, that is, if a contact has home, phone and work numbers, that one contact appears as three different contacts in the sim card. Also, email addresses are lost when using this technique.

It is no secret that I am a Linux user, however I do keep a spare Windows partition around for the rare cases that I need to use Windows. Today was one of those days.

Blackberries come bundled with Windows software to install applications, synchronize with outlook, perform backups, so on and so forth. I wanted to run the Blackberry software to transfer the address book from my old device to my new Bold.

I booted to Windows vista and ran the installer, while it was running a million security updates and popups were showing up, and windows kept asking me to reboot my laptop. I refused to reboot as I simply wanted to transfer my addressbook to my new bold. Once the Blackberry desktop installer completed, lo and behold, it asked me to reboot. I gave in and rebooted, only to have Windows Vista prevent me from logging in again once it came back up.

When I tried to log in, a Windows Activation dialog window showed up, complaining about the license store containing inconsistent data or something like that. The dialog box had a link to contact HP, my laptop's manufacturer. I clicked on it and I was able to chat with HP customer support. After a lot of back and forth what HP told me is that I would have to do a full system restore, which I refuse to do since it would wipe out my Ubuntu Intrepid Ibex installation.

I googled around for a solution to Windows vista preventing me from logging in to no avail. I tried to transfer the addressbook via bluetooth, but for some reason I don't get the option when I select the Bold from my old Blackberry (I do get the option when I select my bluetooth headset, go figure).

At this point I turned my attention to trying to transfer the addressbook using Linux. I had heard of a utility called Barry that may help me with my issue.

I found Ubuntu deb packages here, unfortunately the most recent version they support at this time is Hardy, I saw no packages for intrepid. I felt brave and installed the packages for Hardy under Intrepid, they installed with no obvious issues.

From the list of packages, barrybackup-gui looked promising. I installed it by simply clicking on the link from Firefox and opening the downloaded file directly in GDebi. There were some unresolved dependencies, which at the moment I can't remember exactly, but all the dependencies are listed in the same page. I simply installed the dependencies and tried again, until all dependencies were satisfied (I only had to install two or three dependencies).

At this point I plugged my old Blackberry to one of the USB ports in my laptop, and executed barrybackup, it detected the blackberry, asked me to identify it. At this point I configured barrybackup to backup only the address book by going to Edit | Config, then clicking the configure button.

I only wanted the addressbook, therefore I clicked "Deselect All", followed by activating the "Address Book" database. I OK'ed my way out of there and clicked on "Backup". After a couple of seconds, I had an addressbook backup in my Linux box.

At this point I unplugged my old blackberry from the USB port, plugged my new one and re-ran barrybackup, it recognized the new device and asked me to identify it. After doing so I clicked restore and it started copying my backups to the bold (word to the wise, it deletes all entries in the existing addressbook before restoring). Unfortunately there was a problem and it only restored a partial number of the entries in my addressbook.

It left out about 20 or so entries, luckily a lot of those I don't need anymore, therefore I ended up having to enter only a few by hand.

Although the Ubuntu/Barry combination wasn't perfect, it sure was a better solution to my problem than Windows vista with the official Blackberry desktop software

 
 
 
 

Installing and Configuring a New MySQL Installation on Ubuntu


I recently got involved in a project that uses MySQL as its RDBMS. I am not a DBA, nor I pretend to be, but I wanted to set up a local MySQL database on my Ubuntu 8.10 Intrepid Ibex laptop.

I ran into some issues that were primarily because of my lack of experience installing or administering MySQL, I assume others trying to do the same will run into the same issues, therefore I decided to write this entry recording what I had to do to get MySQL going for the benefits of others (and possibly some time in the future I might forget the solutions my issues, therefore I can refer to this entry myself if I ever need to setup MySQL again).

The first problem I ran into was that MySQL does not show up in the "Add/Remove Applications" GUI tool, sure there are MySQL clients, but the RDBMS itself is nowhere to be found.

I tried "sudo apt-get mysql" and it turned out there was no package mysql to be installed, at this point I started to suspect that the Desktop version of Ubuntu I have does not include MySQL, not even in the repositories.

Luckily I turned out to be wrong, after some research I found out that the correct package to install is mysql-server, a "sudo apt-get mysql-server" took care of installing MySQL.

Creating a new database worked without issue. I issued the following query to create the database:

CREATE DATABASE somedatabase;

It worked without issues.

The next thing I wanted to do was to create a regular, non administrator user to use MySQL. Following the instructions at the MySQL 5.0 Reference Manual created a user allright.

The following query:

CREATE USER someuser IDENTIFIED by 'password';

did the trick "someuser" is the new mysql login name for the new user "password" is the user's mysql password. Originally I forgot to enclose the password in single quotes, rookie mistake, I corrected the mistake and the query worked without a problem.

Next I wanted to grant the newly created user all privileges on my newly created database, in order to do so, I issued the following query:

GRANT ALL on 'somedatabase' to 'newuser';

At this point I thought I was "good to go", I attempted to log in to mysql by issuing the following command in the command line:

mysql -u newuser -p

At which point I was prompted for a password, I entered the correct password and was denied access.

After a lot of googling and hair pulling, I found out that my grant statement did not work for "localhost", I had to issue a different grant statement to be able to log in using my newly created user.

The following query did the trick:

GRANT ALL on somedatabase to newuser@localhost

It turns out I had to specify use the username@hostname syntax to be able to log in from the same server where mysql is running.

After doing this I was finally able to log in as my newly created user and create the tables I needed for the application I am working on.

 
 
 
 

JavaRanch Book Promotion Over


The JavaRanch book promotion we had this week for my new book, Java EE 5 Development With NetBeans 6 is now over.

There were many good questions over the week about the book and NetBeans in general.

I would like to personally congratulate all the "Java Ranchers" that won a free copy of the book:

  • renu richard
  • Peter Johnson
  • Rogerio Kioshi
  • Ankit Garg
Congratulations to all!
 
 
 
 

Project WebSynergy First Impressions


After blogging about my OpenPortal First Impressions, I was contacted by Eduardo Pelegrí-Llopart, he suggested I take a look at Project WebSynergy, a joint venture between Sun Microsystems and Liferay. Project WebSynergy includes code from Liferay and OpenPortal.

I downloaded it and took it for a spin, here is what I found:

Out of the box, it is much more aesthetically pleasing than OpenPortal

Project WebSynergy Screenshot

Tabs can be created directly from the user interface.

Project Synergy Add Page

Similarly, hovering over a tab results in a little red icon showing up, clicking on it allows the user to delete a tab: Project WebSynergy delete tab

Of course a confirmation dialog asks the user to confirm the deletion of the tab.

Project WebSynergy delete tab confirmation

Project WebSynergy certainly seems to include a lot of built in functionality that may have to be manually coded when using OpenPortal. The advantages I found for OpenPortal was the tight integration it provided with GlassFish and NetBeans.

Although Project WebSynergy is not available from the GlassFish Update center, it can be downloaded bundled with GlassFish. That is what I did to try it out, I'm not sure how easy it would be to deploy it on an existing GlassFish installation.

As of NetBeans, the portlet plugins available in the NetBeans Plugin Manager do not integrate with Project WebSynergy, however, the NetBeans PortalPack 3.0 (milestone 2 is the latest available at the time of writing) does. Simply downloading the plugins from the NetBeans Portal Pack page and installing them on NetBeans (I tried on NB 6.5 RC2) provides the same integration that is provided with OpenPortal by the portlet plugins in the NetBeans Plugin Manager.

All in all my overall impression of Project WebSynergy is favorable, my one concern is that neither the NetBeans plugins nor Project WebSynergy itself are officially released, therefore they cannot be considered stable yet. In my admittedly simple tests they worked fine, but I can't be sure there aren't any issues waiting to be discovered if/when we start using it for real work.

 
 
 
 

NetBeans Book Now Available From Amazon


It has come to my attention that my newly released NetBeans Book is now available through Amazon.

Java EE 5 Development With NetBeans 6 amazon link
Java EE 5 Development With NetBeans 6

It is also available directly from Packt Publishing.

 
 
 
 

Just Finished Installing Ubuntu Intrepid Ibex


I just finished installing Ubuntu Intrepid Ibex on my HP Pavilion dv6810us, which is part of the HP dv6000 series

Installation was fairly straightforward, the only hiccup I found was that wireless networking was not working out of the box, I had to install ndiswrapper, but thankfully this was pretty painless. All I had to do was install ndisgtk

sudo apt-get install ndisgtk

And the Windows XP drivers for its wireless card (identified as 03:00.0 Ethernet controller: Atheros Communications Inc. AR242x 802.11abg Wireless PCI Express Adapter (rev 01) by lspci According to this post in the Ubuntu forums, the correct drivers can be found here.

Once I installed ndisgtk and downloaded the windows drivers, all I had to do was point ndisgtk to the .inf file included with the driver, and wireless "just worked", no mucking around with blacklisting drivers or anything like I had to do with previous versions of Ubuntu

I also ran into an issue in which the system would stop booting unless a key (any key) was pressed repeatedly. This issue seems to be affecting several Hewlett Packard (HP) and Compaq laptops.

This issue was reported on launchpad, and I found a workaround there.

The file /boot/grub/menu.lst needs to be edited as root, I use vi as my editor, substitute the following command with your favorite editor:

vi /boot/grub/menu.list

Find the following line:

kernel /boot/vmlinuz-2.6.27-7-generic root=UUID=c877e76e-7e7f-4b47-aec7-6ae28d1ab767 ro quiet splash

and append "acpi=noirq" to it. After doing this the line should look like this:

kernel /boot/vmlinuz-2.6.27-7-generic root=UUID=c877e76e-7e7f-4b47-aec7-6ae28d1ab767 ro quiet splash acpi=noirq

After making the above modifications I was able to boot to Ubuntu Intrepid Ibex normally.

OpenPortal First Impressions


I recently got involved in a project that may need some portlet development. The project is a completely new application to be built from the ground up.

The customer has been using GlassFish as their application server and they are very pleased with it, therefore it just makes sense to continue using it.

The OpenPortal Portlet Container can be installed in GlassFish from its update tool, therefore it made sense to try it out.

GlassFish Update Center

Once installed, I also installed the NetBeans Portal Pack plugin from NetBeans 6.5 RC2, that can be installed directly from the NetBeans Plugin Manager.

NetBeans Plugin Manager

The plugin makes deploying portlets to OpenPortal a breeze, as can be seen in this flash demo.

My main complaint? The default look and feel of the portlet is, let's just say, not the best looking.

OpenPortal default look

As far as I can tell the only way to change the default look is to hack the CSS and JSPs by hand. I noticed the icons to minimize a portlet, maximize it, edit it, etc had transparent backgrounds, therefore it gave me some hope that they should be able to be used when simply changing the background color of the portlet bar. I made a simple modification to the CSS to test this, unfortulately it seems like some of the pink background creeped into the icons.

OpenPortal modified look

Also, as far as I can tell, modifying the available tabs to match our application requirements will involve some customizations of the JSPs included with OpenPortal, there is no tool to create or modify tabs as necessary.

Even with these disadvantages, I'm leaning towards using OpenPortal if we in fact turn out to need portlets for this project. The tight integration with GlassFish and NetBeans is a great advantage and I can live with having to do some CSS and JSP hacking to make it look the way we need it to look.

 
 
 
 
 

« November 2008 »
SunMonTueWedThuFriSat
      
4
5
6
7
9
11
12
14
17
18
20
21
22
23
24
25
26
27
28
29
      
Today

 
© David R. Heffelfinger