on 05-06-2005 9:15 AM
Hi,
We are in the process of porting weblogic J2EE based application into SAP WAS6.40. We have a problem with BLOB/CLOB data types; Backend is oracle 9i.
Our Bean CMP is defined as follows (field mapping)
Fieldname: metaData
FieldType : java.lang.String
Column Name: meta_data;
-
In the Oracle database, it is defined as follows:
Column name: meta_data;
Column type : CLOB
-
We have created the datasource as follows:
Created a data-source include the following attributes:
oracle.jdbc.xa.client.OracleXADataSource;
Vendor SQL selected.
We are able to connect to the database; No problem;
-
The generated code looks like this:
try{
iLoadStatement = conn.prepareStatement("select \"HMS_PROPERTY\".\"P_NAME\", \"HMS_PROPERTY\".\"DESCRIPTION\", \"HMS_PROPERTY\".\"META_DATA\" from \"HMS_PROPERTY\" where \"P_NAME\" = ? ");
iLoadStatement.setString(1, ejb_pkObject.name);
rset = iLoadStatement.executeQuery();
if (!rset.next()) {
beanPM = null;
BaseReliableNoSuchEntityException toThrow = new BaseReliableNoSuchEntityException(NEED_REFRESH);
toThrow.trace( LOCATION );
throw toThrow;
}
extract(rset);
}
// Extracts all data from the ResultSet
// CMR fields are initialized from their caches
public void extract(ResultSet rs) throws SQLException {
Object pk = null;
description = rs.getString("description");
metaData = rs.getString("meta_data");
loaded = true;
}
metaData is declared as java.lang.string type.
-
As you notice, metaData variable is of type string. According to J2EE documentation, this is perfectly fine to declare this way.
But, it is not working;
Do we have to do anything special for CLOB/BLOB data types?
Please advise.
Thank You,
cSoftgroup, Inc
Hi Kumar,
- which tool has generated the code?
- which db driver do you use?
regards, Katarzyna Fecht
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.