i recieve a mistake using the following statement inside a hibernate hbm file:

...
<subselect>
   <![CDATA[
      select t.colA, right(t.colB, 12) b
   ]]>
</subselect>
...

The mistake is Caused by: java.sql.SQLException: ORA-00904: "RIGHT": invalid Identifier

Database: Oracle 11g Hibernate: 3.5.6-Final

Around the Java side i personally use Hibernate Criteria to retrieve the information in the database. With no right function it really works without error. The statement runs without error too directly performed by having an sql client around the database.

Is the Criteria API causes the issue?

Oracle does not appear to aid RIGHT function. You can test using SUBSTR function rather, something similar to:

select t.colA, substr(t.colB,-12) b 

References:

Oracle String Functions on oradev

Oracle String Functions on techonthenet

Oracle/PLSQL String Functions

Oracle right function