Type mapping in JBoss for Oracle9i

D

derHarri

Hello,

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.

Code:
<cmp-field>
<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.

Code:
<mapping>
<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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top