Solution for JBoss 4.0.4. There's a bug affecting this issue. So updating the following libraries solves the problem:
I've found that the cause of the problema was the library: jboss-commons-core-2.0.4.jar.
In JBoss 4.0.5 there's no conflict but with others versions there is.
Removing this library and all it's dependencies solved the problem.
I hope I could help somebody.