Tuesday, January 31, 2012

java.lang.OutOfMemoryError: PermGen space - Cause and Solution

The error was (in maven):
java.lang.OutOfMemoryError: PermGen space

Solution:
If you build with maven:
MAVEN_OPTS="-Xms512m -Xmx768m -XX:PermSize=256m -XX:MaxPermSize=512m"
AND
JAVA_OPTS="-Xms512m -Xmx768m"

If you use other tools, check their OPTS configuration - may be there is analogue.

searching in linux command history

This is a great trick for everyone who uses linux console a lot.

1. Ctrl+R in console
2. Enter search string
3. OS suggests you a line from command history
4. If you want an older command with same search string, just hit Ctrl+R.
5. that's all folks

Monday, January 23, 2012

EJBCA with jboss

EJBCA 4.07 supports jBoss version 5.1 but not jboss 6.0 or jboss 7.0. I checked with jboss web profile and with full version too.

The error message is in ant command

ant bootstrap

The error was:

"package javax.ejb does not exist"


So how i resolved it? I returned to jboss 5.1. :(

Thursday, January 5, 2012

Optimizing queries with EXPLAIN

The explain command gives information about indexes which are used for the query, so you could check, whether it is optimized as you expected.

SQL trees filtration

This article solves remove-matching-children problem and avoid recursion.

Tuesday, January 3, 2012

Problem with WebDAV folders in debian linux

Here is my problem:

When I try to copy some files / folders to webdav folder, I get an error in Windows XP and this log in my Linux box:

[Tue Jan 03 13:49:35 2012] [error] [client 123.123.123.123] File does not exist: /the/webdav/folder/some-file.JPG
[Tue Jan 03 13:49:35 2012] [error] [client 123.123.123.123] The locks could not be queried for verification against a possible "If:" header. [500, #0]
[Tue Jan 03 13:49:35 2012] [error] [client 123.123.123.123] Could not open the lock database. [500, #400]
[Tue Jan 03 13:49:35 2012] [error] [client 123.123.123.123] (2)No such file or directory: Could not open property database. [500, #1]