1 Reply Latest reply on Jun 26, 2008 5:03 AM by Franz Reitmayer

    How to use VARCHAR2 and NVARCHAR2 columns with EJB 2.1 CMP

    Franz Reitmayer Newbie


      i've a problem using NVARCHAR2 and VARCHAR2 columns. We've a Oracle 10g database instance which default NLS char set is ASCII 7-Bit. The NCHAR char set is UTF-16.

      I need to know how to declare single columns in a Entity Bean as NVARCHAR2 or as VARCHAR2. Using the sql-type (i'm using xdoclet) doesn't work.

      I always get an ObjectNotFound Exception if i use a ejbSelect method which has a query parameter that is stored as NVARCHAR2 and the string contains Umlauts. I guess this is because JBoss is treating every column as ASCII 7-Bit. Thus the charset translation failes.

      Thank's in advance for any help!

      Best regards,