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.

1 comment:

  1. Thanks, reading your post made me realise I'd forgotten to connect to our VPN!

    ReplyDelete

Non-spammers: Thanks for visiting! Please go ahead and leave a comment; I read them all!

Attention SPAMMERS: I review all comments before they get posted, and I REPORT 100% of spam comments to Google as spam! Why not avoid getting your account banned as quickly -- and save us both a little time -- by skipping this comment form and moving on to the next one on your list? Thanks, and I hope you have a great day!