Wednesday, June 16, 2010

Tip for Installing Hudson to Running Tomcat

Keeping the development environment restoration theme, today was the turn for Hudson which I don't wanted to let run standalone. Crucial point for integrating Hudson to a running Tomcat (gotten with Debian): set HUDSON_HOME to the CATALINA_OPT in the tomcat file. Follow Tomcat for Debian instructions in Tomcat - Hudson Wiki which apply to Tomcat6 too.

Tuesday, June 15, 2010

Restoring Nexus to new Ubuntu Installation

I'm enjoying a lot my just installed Ubuntu 10.04. Lucid is really pretty and it's flying but that doesn't change the fact that it is painful to recover the previous state of my development environment.

I spent at least a couple of hours working on recovering my Nexus local install. I had Nexus running standalone before but this time I'm trying to avoid having n thousand tomcats running (my computer is memory max out at 8GB :(  ) so Nexus is going on the Tomcat6 installed from Synaptic. I wasn't being able to login because Nexus couldn't generate the timeline file. The fact that the application itself was running really didn't help to speed the discovery of the solution :| The quick and dirty tip here is: check that the user that is running the web app has the correct privileges setup on the sonatype-work (the dir containing Nexus configuration Check this post on backing up Nexus ). 

Tuesday, June 1, 2010

Battle for the right to write (to my own DB)

I wanna shoot myself. I've been struggling trying to fix a "org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in read-only mode (FlushMode.NEVER/MANUAL)". I know that I'm a total newbie with Spring and Hibernate (and not really experienced on the inner workings of transaction management) but this is evil if you really don't understand how Spring works.

I don't think the Spring Framework documentation emphasizes it enough: "The most important concepts to grasp with regard to the Spring Framework's declarative transaction support are that this support is enabled via AOP proxies" (Spring's Declarative Transaction Management documentation). I know, I know! It's all my fault but even when I read those lines it really didn't "click": I thought that I was having issues because I've decided to use the OpenSessionInView pattern and believed that I needed to add transaction management to my newest Manager class. So, I've spent more than a day trying to figuring out how to fix this issue when the functionality was there all along. The deal was that my manager wasn't being proxied because it was defined as an inner bean (which can be a good practice in some cases but totally not when you want your bean to be proxied [Spring Best Practices]) :|