Well I gave up, for anyone with the same problem it looks like something changed in jboss 5.1 because it just doesn't like the oracle oci driver, it works ok in jboss 4.2. I also tried to configurate it with Oracle 11g in production but i got a similar problem.
The solution: do not upgrade the jboss server.