Pages

Saturday, September 27, 2014

Spring Data Neo4j Namespace Configuration Fails on Reload

I started a graph DB project using Neo4j a couple of weeks ago and decided to use Spring Data Neo4j to make my life easier. I got my app up without much hassle using the Spring Data Neo4j namespace configuration to configure my application in XML. This is quickly done with just 2 lines of XML:
<neo4j:config storeDirectory="/var/neo4j" base-package="graph.model" />
<neo4j:repositories base-package="graph.repositories"/>
Everything worked fine until I embedded my project in a larger Spring project which loads around 15 or so top level application context files for all the modules. Suddenly my configuration started throwing exceptions:

Friday, August 8, 2014

Syntax Highlighting for Groovy in Kate

Groovy has been my scripting language of choice for some time now and since I'm running KDE I'm using Kate for quick scripts. And even though Groovy has been around for quite some time and Kate supports a myriad of syntax highlighting modes, Groovy for some odd reason isn't one that comes bundled with Kate out of the box. At least not up to my current KDE version 4.13.2 running on Ubuntu derivatives - neither on (K)Ubuntu nor my latest install of Mint 17 KDE.

Thankfully Kate's syntax highlighting is extendible and the Groovy project provides plugins for various editors including kate. Unfortunately the instructions on  this page have never worked for me on an Ubuntu based system. The path names listed on that plugin page weren't correct with any install of KDE out of the repository.

To make Groovy syntax highlighting work, I instead had to place the groovy.xml file into

~/.kde/share/apps/katepart/syntax/

in order to make it available for a single user or in

/usr/share/kde4/apps/katepart/syntax

to make it available system wide. Restart Kate, here you go. It gets picked up automatically when you save a .groovy file and resides in the Tools -> Highlighting -> Sources menu.