It is harder than i thought to create a simple Zip Archive from within Java that contains entries with unicode names in it. I’m actually to lazy to read all the specs, but it says something that the entries in a zip archive are encoded using “Cp437”. The buildin Java compressing api has nothing to […]
Some would say, i have 3 problems 😉 private final static Pattern placeholder = Pattern.compile("#\\{(\\w+?)\\}");private final static Pattern placeholder = Pattern.compile("#\\{(\\w+?)\\}"); won’t match “Mot#{ö}rhead” for example. To replace the word character \w you either need the list of possible unicodeblocks like [\p{InLatin}|\p{InEtc}] (you get the codes for the blocks through “Character.UnicodeBlock.forName” or you’re lazy like […]
The following statement "foo baz".replaceAll("baz","$bar");"foo baz".replaceAll("baz","$bar"); will present you an java.lang.IllegalArgumentException: Illegal group reference exception as the replacement string can contain backreferences to the search pattern as stated in Mather#replaceAll: This method first resets this matcher. It then scans the input sequence looking for matches of the pattern. Characters that are not part of any […]
Graeme was so kind to help me with this problem. My app worked well with Grails 1.0.4 but not in 1.1-beta3 any more. My first wild guess leading to a HibernateException: contains is not valid without active transactionHibernateException: contains is not valid without active transaction exception was my use of annotated Hibernate classes together with […]
Just some snippets from the doku that I tend to forget: Run grails on a different port: grails -Dserver.port=9090 run-appgrails -Dserver.port=9090 run-app Run grails with a different environment: grails prod run-app // production grails -Dgrails.env=mycustomenv run-app // mycustomenvgrails prod run-app // production grails -Dgrails.env=mycustomenv run-app // mycustomenv