Thursday, August 24, 2006

Mercado de Serviços

[For English version, please refer to rengolin blog]

Uma nova plataforma para a prestação de serviços no Brasil está disponível, o Mercado de Serviços.

O objetivo é que o Mercado de Serviços se torne uma comunidade de prestação de serviços no Brasil. Nessa plataforma, compradores (empresas ou indivíduos) que precisem de serviços feitos são conectados a prestadores (freelancers, profissionais liberais ou empresas) que buscam projetos para executar.

O Mercado de Serviços abrange mais de 110 categorias de serviços, não se restringindo somente a projetos de TI (como desenvolvimento de aplicativos e sites web), mas também a categorias como engenharia, design, assessoria legal e administrativa, negócios, vendas, entre outros.

Thursday, August 10, 2006

Acegi: Redirecing Users to Different Start Pages

Redirect Users based on their Roles: check here.

I had to change Acegi implementation a little bit to be suitable to my needs. My suggestions to Spring were made in this thread in their forum.

MySQL: Error No. 1033 Incorrect information in file: 'filename'

Before trying other things or desperate thinking that you MySQL database is corrupted, simply check if you temp directory (/tmp on Linux) exists and accessible. In my case, my /tmp directory got deleted and MySQL could not access database information no longer. Restoring /tmp fixed the problem.

Wednesday, August 09, 2006

Spring (JstlView) and Tomcat ignoring precompiled JSPs

I had a problem with precompiled JSPs that made me think that it was due to the use of Spring MVC. Basically, after precompiling and inserting web.xml fragment generated by jspc tomcat task, I still could see the work dir full of Java generated source code and their classes. What did it mean? Tomcat was ignoring completely my precompiled JSPs.

After checking Spring code, I noticed a subtle thing that caused this error. A double slash maded all this mess. For example, instead of having


I had


because my view resolver had been set with prefix "/web/WEB-INF/pages/", suffix ".jsp" and the view name was being set as "/index". For this reason, Tomcat did not find a servlet mapping and ended up generating a new Java file for the JSP and compiling it on demand.

I don't know yet if this should be handled by Spring view resolver, but check if this is your case (and you are facing the same problem).

Tuesday, August 08, 2006

Hibernate: reattaching objects to the same session

Check this patch I developed to fix two nagging problems I faced when clearing a hibernate session:

- reassociated object has dirty collection reference
- Found two representations of same collection: (collection type)

It is against Hibernate 3.1.3 and it solved the scenarios I faced. I hope it works for you too. Any comments are very welcome.

Saturday, August 05, 2006

Dumbster returns empty header (eg "To")?

Dumbster is very useful, but it has been a tough time for me to make it work with multiple line headers, in particular "To". Vanilla dumbster does not have support for that, so I am unable to check in my unit tests if the "To" header is correct.

If you have similar problems, check this patch that is over an year old.

But also read the comment I wrote about a potential bug in this patch. Replace the code I mention in the comment if it is also your case.