software development

Per request debugging with Log4j 2 filters

Customers quite regularly call on me to support them when an application is not behaving as expected. On a development machine there are a lot of ways and utilities to analyse the situation. But troubleshooting the erroneous application behaviour in production environments quite often limits your tool belt to a minimum.

JBoss Forge in IntelliJ IDEA

At this year’s JavaOne I attended a talk by Marius Bogoevici (@mariusbogoevici) and was once again pointed at the JBoss Forge project. Last time I took a look at Forge it was still called Seam Forge which was about a year ago. It seriously matured since then.

SpringRoo - Howto translate Java exceptions to user-friendly error messages

Introduction

This blog post belongs to a tutorial series on SpringRoo 1.2.0 which uses the sample application "photooapp" to provide practical examples.
Within this blog post I will try to explain how you can configure your SpringRoo application to translate well-known exceptions to user-friendly error messages.
By default SpringRoo's exception handling is very basic meaning the technical exception message is directly presented to the user. Our aim is to provide the user with human-readable error messages he (most probably) can understand and react upon.

Basics: Translations in Spring MVC

First of all we need to make ourselves familiar with the translation process in Spring MVC. To translate any given String to the currently set browser locale, Spring MVC uses so called "message codes". These codes are defined in property files which are located in "src/main/webapp/WEB-INF/i18n/application.properties". For each supported locale there will be a separate application.properties file, e.g. application_de.properties for german translations of the message codes. The "application.properties" file must always be used as the fallback reference.

SpringRoo - Entity-Klassen und JPA-Repositories mit SpringRoo erstellen

Dies ist der zweite Artikel in meiner Tutorial-Reihe zu SpringRoo 1.2.0 in der die Beispiel-Anwendung "photooapp" entwickelt wird.

Vorbedingungen

In diesem Beitrag geht es um die initiale Erstellung der Roo-Anwendung. Hierfür müssen folgende Vorbedingungen erfüllt sein:


Lokalen Datenbankserver installieren (falls notwendig)

Wir gehen davon aus, dass die Anwendung später mit einer MySQL 5.1-Datenbank betrieben werden soll, die auf dem gleichen Server läuft wie die Anwendung.
Um eine ähnliche Umgebung für die Entwicklung zu verwenden, benötigen wir eine lokale MySQL-Installation. Für diejenigen ohne eine lokale Installation ist die wohl einfachste und schnellste Art dies zu erreichen wahrscheinlich das XAMPP-Paket von Apachefriends. Es kann über die URL http://www.apachefriends.org/de/xampp.html heruntergeladen werden.

Starting PhotooApp - A SpringRoo tutorial application

Ich hatte bereits im Februar angekündigt, dass ich hier ein paar Artikel über SpringRoo schreiben würde, und nutze nun das Erscheinen des neuen Meilensteins um damit zu beginnen.

Die Idee

Vor ein paar Tagen ist endlich SpringRoo 1.2.0.M1 erschienen, welches der erste sog. Milestone der nächsten Version von SpringRoo ist. Das Besondere hieran ist die Unterstützung des Repository- oder auch DAO-Models, welches im Gegensatz zu dem sog. ActiveRecord-Model steht. Bisher verwendete SpringRoo zwingend das ActiveRecord-Model. Dank dieser Neuerung kann SpringRoo nun endlich in Kombination mit Spring Data JPA genutzt werden, was viele Vorteile und einige neue Möglichkeiten gerade im Bereich der Finder eröffnet.

Broken special chars in Spring Roo internationalization?

This is the first post in an upcoming series of posts on Spring Roo (see footer for details an Roo).

Problem: Special chars and Umlauts are not correctly displayed in my Roo-Application

[german version]
There are often questions and support requests on the above named topic in Spring Roo-Forum. Mostly questioners write that german "Umlauts" like ä, ö, ü and ß or other special chars in cyrillic are not correctly display or saved to the database. With the following post I'd like to review the most common sources of the problem and come up with solutions.

Umlaute und Sonderzeichen in Spring Roo?

Dies ist der erste in einer Reihe von Blog-Posts über Spring Roo (Erläuterung siehe unten).
[english version]

Problem: Sonderzeichen und Umlaute werden in meiner Roo-Anwendung nicht korrekt angezeigt


Im Spring Roo-Forum gibt es öfter Anfragen, die o.g. Problem beschreiben, dass deutsche Umlaute wie ä, ö, ü und ß nicht korrekt gespeichert oder "kaputt" übertragen werden. Im Folgenden möchte ich kurz die häufigsten Fehlerquellen und Lösungen aufzeigen.

Back to Top ↑

productivity

Personal Reset

Lately I noticed a growing dissatisfaction with my daily workflow. And this was not only because my last blog post has been almost a year ago. No, it’s related to a noticable drop in productivity. I figured this was due to my curiosity dragging me onto way more interesting topics than either my time frame or my toolset could master. Unfortunately trying to keep up-to-date on those topics created loads of distractions which almost resulted in an inability to focus on a single task for a longer amount of time

Mac OS X setup tips & tricks

This post is kind of a reminder for myself when re-setting up my MacBook on which tools and applications I found to be useful for daily business. Feel free to comment, make suggestions or even send in pull-requests if you have different recommendations. :)

Enhancements for Mac OS X Finder.app

Today I’d like to share three AppleScripts with you which really enhanced my general usage of the Finder.app in Mac OS X. If you are not a Mac OS X user, you can stop reading here.

How to Set Default Comment Security Level in Atlassian JIRA

Atlassian JIRA in my humble opinion one of the greatest issue tracking systems around. Nevertheless there are still many missing features, one of them may be "setting the default comment security level".

There is a nice little confluence wiki page which describes some kind of dirty hack to solve or at least work around this problem. The URL to that page is: http://confluence.atlassian.com/display/JIRA/How+to+Set+Default+Comment+Security+Level

Probleme beim Login ins Elster ePortal mit Mac OS X

Ich hatte bis vor Kurzem einige Probleme, mich im Elster ePortal anzumelden. Im Folgenden will ich kurz den Fehler und die für mich funktionierende Lösung zeigen.

FEHLERBESCHREIBUNG

Wenn man auf der Startseite im linken Bereich den Punkt "Login > Software-Zertifikat" wählt und dann auf "Login" klickt, wird das Java Applet geladen und der grüne, sich drehende Kreis angezeigt. Es erscheint kein Popup, die Java-Konsole oder ähnliches!
Wirft man während dieser Wartezeit einen Blick in die sog. Fehlerkonsole des Browsers, so findet man die folgende Fehlermeldung:

Failed to load resource: https://www.elsteronline.de/eportal/
de.elster.portal.applet.ElsterAppletAnalyze.class the server 
responded with a status of 404 (Not Found)

Back to Top ↑

organisation

Article on company culture at innoQ

For those of you interested in the impact of a company’s culture, I wrote an article about the company culture at innoQ on their blog. The article is on the company website and I’d really appreciate your feedback e.g. on writing style and content.

Alternative zu Google? DuckDuckGo

Nachdem Google das Tracking in den Suchergebnissen noch stärker ausgeweitet hat, so dass man mittlerweile noch nicht mal die angezeigten Links kopieren kann, habe ich mich nach einer Alternative umgesehen.

DuckDuckGo (https://duckduckgo.com/) scheint eine solche vernünftige Alternative zu sein. Die Grundsätze "don't track" (http://donttrack.us/) und "don't bubble" (http://dontbubble.us/) machen jedenfalls Hoffnung. Wer sich für die "Technik dahinter" interessiert, sollte einen Blick auf diese Hilfe-Seite werfen: http://help.duckduckgo.com/customer/portal/articles/216392-architecture


iPhone - Wartezeit für Rufumleitung bei Abwesenheit setzen

Frage: Wie kann man eigentlich am iPhone die Zeit oder die Anzahl der Klingelzeichen einstellen, die das Telefon wartet, bis ein nicht angenommener Anruf bspw. an die Mailbox weitergeleitet wird?



Antwort:
Diese Weiterleitung nennt man auch “Rufumleitung wenn keine Rufannahme”

Da dies nicht Telefon-spezifisch sondern eine Einstellung in den Systemen des Netzbetreibers ist, gibt es hierfür nicht in jedem Telefon einen Menüpunkt oder eine Einstellungsmöglichkeit. So auch nicht beim Apple iPhone.

Es gibt aber dennoch die Möglichkeit, diese Einstellung über einen sog. GSM-Code zu ändern. Eine Übersicht der meisten Codes gibt es unter http://www.gsmcodes-online.de/
Zur Rufumleitung: http://www.gsmcodes-online.de/Rufumleitungen/rufumleitungen.html

Diese Nummernfolge muss direkt in den Ziffernblock der “Telefon”-App eingetippt werden.

</b> Beispiel “Sprachanrufe nach 30 Sekunden auf die Mailbox umleiten”: </b>

**61*MAILBOXNUMMER*11*30#


Meine MAILBOXNUMMER im Telekom-Netz ist z.B. +49151 13 12345678 dementsprechend lautet die ganze Zeichenkette dann

*61+4915113123456781130#


Wie die MailboxNummer bei anderen Providern ist, kann ich leider nicht sagen, man kann aber vorher durch die Eingabe von “*#61#” die aktuelle Einstellung abfragen.

Back to Top ↑

talks

Speaking at JavaOne 2013

I’m very happy to announce that one of my proposals for JavaOne 2013 has been accepted. This year’s JavaOne takes place from Sep 22 until Sep 27 in San Francisco and will be another great chance catch up with the latest and greatest in java development and of course to meet with many old and new friends.

Getting ready for JavaOne 2012

At the time of writing this blog post everything is prepared and I'm already really excited about my very first flight to the States and therefore my very first Oracle JavaOne. As my talk proposal for JavaOne has been accepted by the conference committee - thanks again -, I'm even going to be a speaker at JavaOne 2012.

Back to Top ↑

hosting

Migrate Owncloud from PostgreSQL to MySQL

I am running a self-hosted owncloud instance for more than a year now. Back in August I decided to setup a new Ubuntu 14.04 server at home and tried to run owncloud with a PostgreSQL backend - which turned out to be a bad decision.

Postfix and /etc/hosts

The following post is actually a note2self as I stumbled over this problem and wanted to create a reminder for myself and others with similar issues.

Praxistipps zu ftplicity

Ich nutze seit geraumer Zeit "ftplicity" für das Backup meiner Server auf einen FTP-Backupserver. In diversen Artikeln u.a. bei heise.de ("Hinter Schloss und Siegel") wird genau beschrieben, wie man so ein Backup auch verschlüsselt für einen nicht vertrauenswürdigen Backupserver einrichtet.

Back to Top ↑