I saw the errors ‘The last packet successfully received from the server was x milliseconds ago’ and ‘Communications link failure’ a lot lately. So much it almost drove me crazy. I knew it had something to do with the timeout of 8 hours that MySQL has by default for every connection.This is a simple problem, but the internet is so polluted with everybody parroting each other that it didn’t get me any further.
After a few days I fixed the problem, it was indeed very simple but because I did something stupid with JPA it became very complex.
In this article I’ll explain the simple solution and tell you about my complex problem, maybe you’re having the same trouble.
Last week a ‘bug’ was filed where the end users of our application wanted search results with a match on the name given more priority than a match on the address (we’re talking about searching for a company). Since I used Lucene a lot I thought it was just ‘boosting’ the name field. It appeared to be a bit more difficult. Maybe because Elasticsearch behaves differently, but probably because my Lucene knowledge has some rusty colorations.
I’m working on a project where we need to search the data the ‘google way’ and keep a history of every change in the data. Since a requirement is that we have to store the data in an sql database I started with Hibernate JPA. Hibernate Envers was added for versioning. For the Google search (or just full text search) I needed something with Lucene in the background. Hibernate Search seemed like a good combination.
Pretty soon I found out that Envers and Search don’t mix very well and a little search on the Hibernate forum confirmed it . Envers and Search are great products, don’t get me wrong, but this time it didn’t work out.
Furthermore it’s good to know that I’m also using Spring, which can mess up things pretty bad. Again it’s a lethal cocktail, nothing to do with the quality of the frameworks.
Moqups.com – A free online tool with the ability to export to PDF. It’s possible to add links to element, but I’m didn’t manage to get it working with the PDF
A paid tool, but well worth its money. The key feature is the PDF-export with working buttons! You can click a button in the PDF and it jumps to the right screen
Onotate let’s you annotate things. Very useful tool, only drawback is that when you change files you have to upload everything again
Every sane person ditches the Java Date-api and uses Joda. Okay, sometimes you run into trouble. This time when I was using the Spring @ResponseBody to return JSON and my date got returned as a big hairy monster (some Chronology and things which really scared me).
In this short article I’ll explain how to fix it. Since I try to be concise please feel free to ask me to elaborate.
This page will have short reviews of the books I read in 2013. The rating is the same as on Amazon (love, like, ok, don’t like, hate)
I own a Sony Xperia S and a Mac. Problem with the Sony Bridge for Mac is that it’s terribly slow. It takes minutes to get access to your files. I also had a problem that I couldn’t access files that are added to the device since the ICS (4.0.4) update. With the latest upgrade (6.1.A.2.45, 26-aug-2012) this issue is fixed. This blog should also work for other phones, if other steps are needed please add a comment, then I’ll update the article.