Friday, May 23, 2008

Netbeans SVN Troubles

Sometimes Netbeans 6's SVN feature screws up. A situation I've had this occur is where one goes into the repository store location on the server and screws around/deletes the files.

The reason these problems are so bad is you'll try and make amends with the server by trying an import again and you'll find it greyed out - Netbeans is confused and won't let you do what you want to. So you get smart and delete the netbeans project, open another one and try an import, hoping it forgot - to find errors to do with 'WC unique ids'.

It seems Netbeans maintains some sort of hidden list of servers you've connected to and projects you've dealt with, deep in its configuration files, and while you can try any number of classy tricks to try and get it to forget you even made your mistake it knows. You can even delete the hidden .svn files from each directory, and Netbeans doesn't care.

So here's how you defeat Netbeans and start a fresh SVN import if things go bad at the repository level and Netbeans isn't letting you forget about it.

1. Delete the .svn hidden file from every directory below src, test, and any other folder that isn't nbproject, build, or dist. We don't need those Netbeans-specific folders. Linux/mac people can use the find command and xargs to delete them recursively, and in one command.

2. Copy the aformentioned folders out of your Netbeans project directory and somewhere temporary.

2. Delete your project in Project View from Netbeans. Check the box so you delete the files too.

3. Go into your Netbeans Projects directory and remove the directory of the project that gets left behind.

4. Start a new project in Netbeans, of whatever type it was. For instance 'Java Desktop Application'. Call it the same name as the project you just deleted.

5. Go into the Netbeans Projects folder in the file system and remove the src and test folders.

6. Navigate to your temporary directory where src, test and anything else you have are kept, and copy them back into the Netbeans project folder.

7. Go back to Netbeans and you'll find all your files loaded into there. Your project good as uh.. new again, except because you didn't copy back the Netbeans configuration files, your library references are probably broken. So right click on your project and 'Resolve' the missing libraries.

8. Test-run your program to make sure it works.

9. If everything's good, you'll find the 'Import into a repository' option available again, and you'll get no 'WC' errors importing your new copy.

From here, others can and should Check Out copies of the software from your new setup. This requires them to delete the project from their own Netbeans folder as described in steps 2 & 3.

So there's how you re-import into a screwed up repository from Netbeans. This solution is obviously also applicable to repository server hard drives crashing/corrupting.

Wednesday, May 21, 2008

Useful NIMROD Pages

NIMROD software allows scheduling of distributed jobs across multiple grid resources around the world. Unfortunately its documentation is a bit all over the place.

Here are the main nimrod commands:

http://www.csse.monash.edu.au/~nimrod/nimrodg/papiman.html

If your nimrod has enFuzion on it, you can run specific commands for it here

http://www.csse.monash.edu.au/cluster/enFuzion/api.htm

Run 'nimrod enfapi [command parameters]' at the command line

Plan files are an important part of NIMROD's job scheduling. Here are the basics:

http://www.csse.monash.edu.au/~nimrod/nimrodg/ng.html

And here are a set of examples of plan files:

http://www.csse.monash.edu.au/~nimrod/nimrodportal/manual/planfileexamples.shtml

Hopefully this clears up some of the mess.

Introduction

I'm Steve, I'm a software developer in a medical research group for a university in Melbourne, Australia.

This will be a technical blog of things I've discovered in my travels. Sometimes there are seemingly simple things that take too long to find a clear answer to - I'll post them here in an easy to read format. Sometimes I work with technology that's poorly documented or obscure - I'll post interesting things I find about that here too.

The idea is that hopefully people find these pages in google searches and it's of use to them. That's all!