In all my projects this happens at least once, and I'm surprised over and over again: a controller will not map just anything to @PathVariable by default. Contrary to intuition, the annotation's argument is a regular expression which excludes some characters per default. For instance the url http://localhost:8080/myapp/api/user/testuser@example when mapped to a controller: @RequestMapping(value = … Continue reading Spring @PathVariable mapping incomplete path when dots are included
Category: java
NPE when starting Google Dev Mode
After setting up a new Eclipse instance, checking out my current GWT project it's time for a first test, so I fire up the DevMode and: NullPointerException at SwingUI(42) That particular class is part of the GWT DevMode and tries to load an image from the class path by requesting it from SwingUI's class loader … Continue reading NPE when starting Google Dev Mode
Cache collision and ehcache spring annotations module
If you are looking for a way to implement declarative caching with Spring, there is no way around Ehcache Spring Annotations [1]. This superimposes a transparent aspect on methods of any proxied bean, taking the method arguments as a key. Little known but easy to stumble upon [2] is an implementation (design?) quirk which expects … Continue reading Cache collision and ehcache spring annotations module
Annotations, Java compiler and missing debugging information
So I play with my favorite ant build script and a day later nearly every annotation is broken: java.lang.IllegalStateException: No parameter name specified for argument of type [java.lang.String], and no parameter name information found in class file either. as far as the eye goes. What actually happened is that the new deployment skips debugging information … Continue reading Annotations, Java compiler and missing debugging information
Non-Latin characters, openID and the openid4java library
The openid4java [1] library is a very handy set of components that handles openid and oauth for java applications and definitely worth a look before you capitulate in frustration before all that modern openid stuff. For those of us living and working outside the 7bit-speaking ANSI niche there is one webserver setting to verify: the … Continue reading Non-Latin characters, openID and the openid4java library