[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Type Mapping Oracle 9i

derharri do-not-reply at jboss.com
Wed Apr 18 09:57:12 EDT 2007


i am using Jboss 4.0.4 with EJB2.1 and a Oracle Database.
In my database there are tables containing CLOB fields.
The EJB accessing these tables use a "special" jbosscmp-jdbc.xml in which i explicitely define the CLOB type for the relevant fields.

  | 	<field-name>lsData</field-name>
  | 	<column-name>LSDATA</column-name>
  | 	<jdbc-type>CLOB</jdbc-type>
  | 	<sql-type>CLOB</sql-type>
  | </cmp-field>

That works fine but makes me have to use different jbosscmp-jdbc.xml files for different databases (e.g SQLServer).
Maybe i misunderstood something but i think normaly such type-mapping has do be done in standardjbosscmp-jdbc.xml in the conf directory of my used server implementation.
But when i define the CLOB mapping in that file it does not work.

  | 	<java-type>java.lang.String</java-type>
  | 	<jdbc-type>CLOB</jdbc-type>
  | 	<sql-type>CLOB</sql-type>
  | </mapping>

JBoss does not throw neither an exception nor error or warning.
The accessing method in the bean just returns null such as if the db field contains null. I draw the conclusion, that JBoss just has problems reading the db data of the CLOB field.

Can someone explain why my the "global" mapping does not work?
Maybe i just forgot something else?

Thanks for your help

Harri E.

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

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

More information about the jboss-user mailing list