Software

Workaround for missing DomainClassConverter in Spring Boot JUnit tests

In one of my projects I let Spring Boot automatically bind domain objects from the database.

This fails in the reduced unit test setup, because DomainClassConverter is not available. But it can be mocked!

weiterlesen

Avoid conversion warnings when using yedit ansible role

When I fist started to use yedit to modify YAML files I got the following warning:

[WARNING]: The value {...} (type dict) in a string field was converted to "{...}" (type string). If this does not look like what you expect, quote the entire value to ensure it does not change.

 

weiterlesen

Shrinking LVM physical volume running on software RAID

Due to a misconfiguration I had to shrink a LVM 2 volume group and its physical volume running on a software RAID.

weiterlesen

Formatting phone numbers using libphonenumber in Thymeleaf

The Google phone number parser & formatter is very helpful to ensure the same number format for user prodived data. To simplify the use in Spring Boot application with Thymeleaf I created a wrapping TagLib/ExpressionFactory.

weiterlesen

Samsung SSD as Linux Software RAID

Initially I thought adding a pair of Samsung 860 EVO as software RAID to my small home server cannot be too hard...

... but they seem to require special kernel settings to work.

weiterlesen

Setup Unifi Controller on Debian 10 / Buster

The requirements of the Unifi Controller do not allow a direct installation. But with a few manual steps a successful setup is possible!

weiterlesen

How to ensure you get a BindingResult instead of whitelabel error page when validating input

When I started to use Spring Boot I had some issues with the validation. The @Validated annotation triggered the validation as requested but the validation terminated with an org.springframework.validation.BindException instead of filling the BindingResult object.

weiterlesen

Configure Java/JDBC to connect to PostgreSQL with JRE certificate validation

Using the PostgreSQL JDBC driver since 42.2.5, the SSL behaviour changed which can cause FileNotFoundExceptions looking for .postgresql/root.crt.

weiterlesen

Configure Apache as Proxy for Thumbor

On our default setup, we use Apache as proxy and load balancer for our applications. This usually works, but caused problems with Thumbor.

 

weiterlesen

Inject Attributes to Spring Boot Controller Methods (HandlerMethodArgumentResolver)

During learning Spring Boot I noticed attributes to methods in Spring Boot controllers can be automatically injected.

To migrate my blog from Grails to Spring Boot I created an implementation to inject the current blog instance based on an session attribute.

weiterlesen

Asset Pipeline Thymeleaf Taglib

Using the asset pipline in Grails, the production CSS and Javascript files have been including with a digest appendix. This feature is not available in Spring Boot, therefore I started to create a simple Thymeleaf tag library.

weiterlesen

SSL Debugging with Arduino / ESP8266

I recently bought the 2.9″ ESPaper Plus Kit, WiFi ePaper display from ThingPulse.

To get this device working with my ansible configured SSL webproxy I had to get some additional debugging skills...

weiterlesen

How to find the cause of "deleted object would be re-saved by cascade"

Sometimes if you do not properly delete objects in a Grails/GORM/Hibernate transaction the following error might occur:

deleted object would be re-saved by cascade (remove deleted object from associations)

This message is presented by the org.hibernate.ObjectDeletedException

After some hours of investigation I found a solution to find the cause!

weiterlesen

MCabber Notifications in i3

On my new i3 setup I got no notifications of new MCabber events and messages.

weiterlesen

Setup CyanogenMod on Google Nexus 10

Due to the decreasing performance of Android on my Nexus 10 and similar reports of other user I tried to install CyanogenMod 13. This caused some resolvable problems...

weiterlesen

Seafile behind a proxy

My Seafile instance is running on a dedicated webserver behind a reverse proxy which is handling the SSL encryption.

This setup with the protocol change on one of the webservers does not work out of the box / this case is not documented in the official server documentation.

weiterlesen

BASIC Auth with Oracle WebLogic

If you would like to do the authentification in Java application running on Oracle WebLogic, you will probably wonder why the Authentification-Header does not reach the Filter.

weiterlesen

Logstash Log4j broken pipe with MDC attributes

We recently configured some applications to log with log4j's SocketAppender to Logstash.

When we startet to add MDC-Attributes we sometimes lost the connection:

| Error log4j:WARN Detected problem with connection: java.net.SocketException: (broken pipe)

weiterlesen

PDF nach Scan umwandeln

Beim Duplex-Scan mit hp-scan erstellt mir die Software ein PDF-Dokument, wo auf allen Seiten unten ein weisser Rand ist und jede zweite Seite um 180 verdreht ist.

Zum Glück gibt es Tools, welche diese Probleme in wenigen Schritten beheben können

weiterlesen

Create MS SQL Server 2008 SQL Dump

As a Linux using PostgreSQL and MySQL admin I am used to console tools. Therefore creating a sql dump (schema+data) from a MS SQL 2008 database is a challenging task.

weiterlesen

Sympa with Virtual Hosts using Exim

Setting up sympa with virtual hosts in an environment using exim requires some small modifications:

weiterlesen

BFH VPN + Dateizugriff mit Arch Linux

Wenn man nicht mit Windows, sondern gar mit etwas speziellen wie Arch Linux auf das Netzwerk der Berner Fachhochschule zugreiffen möchte, dann kann findet man leider auf anhieb keine Anleitung im Sharepoint. Daher habe ich mal einige Eckdaten zusammengestellt.

weiterlesen

Arduino and Arch Linux

I could not use the Arduino IDE (from AUR) with its default config on Arch Linux.

weiterlesen

Fix redmine CSRF / Post-Request issue

I use the squeeze-backport of redmine on Debian.

With the default setup, all the Ajax-Post-Requests cause the logout of the current user due to the missing X-CSRF-Token.

Because I could not find a complete solution, I backported the CSRF-Code from a newer relase.

weiterlesen

LXC mit Debian Squeeze

Da die aktuellen Anleitungen für LXC mit Debian Squeeze etwas spärlich und teilweise veraltet sind, notiere ich hier einige Schritte für ein aktuelles Setup.

weiterlesen

Systemstart wartet bei "Removing Leftover Files"

Nach einem Systemupdate blieb meine Workstation mit LDAP Authentifizierung beim Starten immer bei "Removing Leftover Files" stehen.

weiterlesen

Javascript Map sortieren

Die folgende Map möchte ich nach pos0 und pos1 sortieren....

var imap = {
    1: {
        name: 'Test 3',
        pos0: 30,
        pos1: 20
    },
    2: {
        name: 'Test 1',
        pos0: 10,
        pos1: 30
    },
    3: {
        name: 'Test 2',
        pos0: 20,
        pos1: 10
    }
}

weiterlesen

Von GPX zu FoxtrottGPS POI

Für unsere Norwegenferien wollte ich das Tomtom-OV2 über das GPX-Format in die POI-Datenbank von FoxtrottGPS (Fork von TangoGPS) importieren.

weiterlesen

SparkleShare auf Ubuntu 11.04

Auf der Suche nach einer Dropbox Alternative, wo man einen eigenen Server verwenden kann, bin ich auf SparkleShare gestossen.

weiterlesen

Problem mit unvollständigen Objekten

Im Blog verursachte der folgende Code beim generieren der Tag-Seiten Probleme:

${Article.withCriteria{ tags{like('id',tagInstance.id)  } }}

Die hier geladenen Artikel-Objekte hatten bei der anschliessenden Anzeite nur einen Tag, den von der Tag-Seite.

 

weiterlesen

CSS Selektoren

Mit Selektoren lässt sich mehr machen, das man denkt...

weiterlesen

Firecookie

Das Firefox-Add-on Firebug ist wohl den meisten Web-Entwicklern bekannt, das Firebug-Addon-on Firecookie aber wohl nicht...

weiterlesen

TinyMCE und Modal Dialog

Wenn man die Pluginliste selber zusammenstellt und den Compressor verwendet, kann es sein, dass der Konfigurationsparameter "dialog_type : 'modal'" nicht korrekt arbeitet....

weiterlesen

Sort 'mappedBy'

Sorting in Grails is easy, but defining the sort order of 'hasMany' children of an object is not obvious...

weiterlesen

Grails Blog Software

Um Grails besser kennen zu lernen und um dem Tandemblog eine optimierte Blogsoftware zu bieten, habe ich mich entschlossen ein neues Projekt zu starten....

weiterlesen

© 2015 - 2019 Moritz Kobel

Theme by Anders NorenUp ↑