Tuesday, January 17, 2006

Oracle JDeveloper and backups

I usually write Java code using Oracle's JDeveloper IDE. In my opinion it's a very good product which I've been using for years. I like it. But yesterday it freaked me out.

Yesterday I refactored a project I'm working on, including change of package names, renaming some java classes and functions and so on. Once I had all my sources organized, I thought that would be good to clean the directories where the old compiled class files reside. There's no need to do it manually as JDeveloper can do this for you; just go to the Run menu and execute Clean project (keep reading before trying!). Once finished I continued coding normally, but in the next build, the compiler complained about source files not found. What?! The cleaning process cleaned so deeply that even some (actually 6) of my source files had been completely wiped out of my hard disk.

Luckily, I had a recent backup and the lost files had just a few lines of code changed. I work with a laptop and I confess that I usually wait too much between backups. I've been very lucky this time; be careful if you can be affected by this issue and more important, keep regular backups, even if you work with a CVS.

I'm using JDeveloper build It's an Early Access version and I'm convinced this issue will be solved in the final release.

On another note, I just use the IDE; I try to resist the temptation to stick to their frameworks and libraries because, although they're excellent pieces of software, they usually work better/only with a commercial Oracle product in the backend. If you're developing Java applications interacting with an Oracle database though, Oracle ADF (Application Development Framework, former BC4J) is a master piece of software that excels specially when used with complex relational data models.

[Update (2006-06-11)]: I've been using JDeveloper 10.1.3 (With Service Update 3) for some time and it works perfect; the 'cleaning too much' issue is no longer present. Suport for CVS (and Subversion too) is excellent. Nice.

No comments: