Tuesday, December 30, 2008

Fix: InvocationTargetException in Eclipse while using CVS

I ran into an issue while using Eclipse 3.3 today where Eclipse was throwing a java.lang.reflect.InvocationTargetException while trying to get another version of a project using Eclipse's built-in CVS client. I initially encountered the error after pressing the "Refresh Tags" button on the "Replace with Branch or Version" dialog.

InvocationTargetException thrown by Eclipse trying to do a 'Refresh Tags'

Some brief experimentation revealed that I wasn't able to do any CVS operations from within Eclipse. Either I would get the above error, or else the operation would just silently fail.

Checking the Eclipse log file (at workspace\.metadata\.log) showed that a "Connection refused: HTTP/1.1 403 Forbidden" error was occurring whenever I tried to perform a CVS operation.

This error message turned out to be the key; there was an issue with Eclipse's proxy settings. In the Preferences dialog (Window menu | Preferences), under General | Network Connections, in the "No Proxy for" section, I needed to add the hostname of my CVS server.

After adding the hostname of my proxy server in the Network Connections section of the Preferences dialog, CVS operations in Eclipse once again stared working properly.

Thursday, December 04, 2008

Adding a 3rd Monitor to a Laptop

Back in September, I set up about researching how I might be able to add a 3rd monitor to my laptop PC at work, a Lenovo (IBM) ThinkPad T60.

The built-in video card on the laptop PC, an ATI Mobility Radeon X1300, supports only dual monitors.  The card can run the built-in laptop LCD display plus one external monitor, or two external monitors (via the additional DVI port on the machine's docking station), but not two external monitors and the built-in LCD at the same time.

Since simply opening up the case and popping an additional video card into a free PCI-e or PCI slot isn't an option with this laptop machine like it would be with a desktop machine, I considered several alternative solutions:

Docking Station PCI Card

I first considered purchasing a new docking station, the Thinkpad Advanced Dock, which supports adding a standard PCI-e card directly to the dock; then plugging a PCI-e video card into the dock, and running the 3rd monitor off of that. 

However, this solution was cost-prohibitive (around US $380 for the dock -- not including the cost of a PCI-e video card).  I also ran across multiple reports from Thinkpad owners trying and failing to get this solution working on the official Lenovo forums (particularly in this thread).

PCMCIA Video Card

Next, I looked into the possibility of getting a PCMCIA video card for my laptop's free PCMCIA slot, such as the VillageTronic VTBook

However, I was somewhat concerned that the card might "stick out" of the side of my laptop, making the laptop a hassle to carry around with the card installed.  I was also concerned about potential difficulties with docking/undocking the machine (which I do a few times a week) while using the card.  Finally, the VTBook solution was also somewhat cost-prohibitive (around US $250).

My solution: USB Video Card

The solution that I finally settled on was to purchase a USB 2.0 video card.  This is a self-enclosed video card with a USB connection on one end to connect to the PC, and a DVI port on the other for connecting a monitor.  The specific model I picked up was an IOGEAR model GUC2020DW6 external video card.  The price was right (particularly compared to the other available laptop multiple-monitor solutions I considered): the IOGEAR card was on sale for about US $80 when I purchased it back in early October 2008 (and it's even lower now, down to US $68 on Amazon, as I write this post). 

I've had the card for just about two months now, and it's been working great -- better than I expected!  I had been concerned that there might be noticeable display "lag" on the monitor connected by the USB video card, but in practice, there's no noticeable difference when working on the USB-connected monitor or working with one of the others.  The only time that I notice the difference is when dragging a window around on the USB-connected monitor; there is just a bit of "lag" as the window moves around the screen.

Here's the card, connected, behind my PC, along with a penny to help show the size of the device (apologies for the low quality cellphone-cam photo):


And here's the 3-monitor setup at my desk at work, using the external USB video card to drive one of the external monitors:


USB video cards do have known limitations with displaying very rapidly-updating content (e.g. movies, 3D games) due to the limited throughput of USB 2.0, so I wouldn't purchase one of these cards to use on a gaming machine.  However, I knew that I'd only be using this monitor for business use: Writing code, viewing documents, doing email, surfing the web; that type of thing.  Also, in the event that I do want to view some rapidly-changing content that the adapter can't handle well, I can always just put that content on one of my other monitors.


I got some great help in my research on this issue by posing the question of ways to add a 3rd monitor to a laptop over on StackOverflow, a fairly new community-run site for asking and answering programming and programming-related questions.