[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - How to use VARCHAR2 and NVARCHAR2 columns with EJB 2.1 CMP

franz77 do-not-reply at jboss.com
Thu Jun 12 05:33:28 EDT 2008


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,

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4157627#4157627

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4157627

More information about the jboss-user mailing list