OK. I got good hints from the Firebird-java forum although this is a JBoss issue. It seems that none in this forum can help me.
Add the following under the type-mapping Firebird in $JBOSS_HOME/server/default/conf/standardjbosscmp-jdbc.xml
<mapping> <java-type>java.math.BigDecimal</java-type> <jdbc-type>NUMERIC</jdbc-type> <sql-type>NUMERIC</sql-type> </mapping>
Hope this can be valuable to others.
Type mapping is specific to the database driver, not jboss. We don't use firebird so maintence of its type mapping is up to the user community. For this to be useful you need to create a patch case in jira with the change details including the firebird driver version.