Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

JBuilder 9, Websphere CMP mapping to Oracle ?

2 views
Skip to first unread message

Robin Sharp

unread,
Sep 25, 2003, 5:04:41 AM9/25/03
to
I am trying to map an Oracle 9 SQL type NUMBER(3) to a java int in a
CMP EJB Bean AND a NUMBER(12) to
a java long in the same CMP EJB Bean, using JBuilder 9 Enterprise with
the WebSphere Server.

Using the default mappings (without specifying any custom CMP
mappings) I get
RDBSchema:SQLUnknown errors in the
META-INF/backends/ORACLE_V_91/*MAPPING.tblxml file.

I then used the Tools | Config Servers | Custom | CMP Mapping
Settings.

I first hoped that the mapping tool specified mapping options
in the Data type aliases section, so I tried the following.

When I try the mapping the BIGINT FIRST only the long is
mapped, in the tblxml file, to the NUMBER(12), but not the int

Vendor Type Data Type Data Type Alias
ORACLE_V91 NUMBER BIGINT
ORACLE_V91 NUMBER INTEGER


When I try the mapping the INTEGER FIRST only the int is
mapped in, the tblxml file, to the NUMBER(3), but not the long

Vendor Type Data Type Data Type Alias
ORACLE_V91 NUMBER INTEGER
ORACLE_V91 NUMBER BIGINT

Then I tried to specify the types more clearly and nothing happened

Vendor Type Data Type Data Type Alias
ORACLE_V91 NUMBER(3) INTEGER
ORACLE_V91 NUMBER(12) BIGINT

Vendor Type Data Type Data Type Alias
ORACLE_V91 NUMBER(3,0) INTEGER
ORACLE_V91 NUMBER(12,0) BIGINT

I've tried various options to get the mapping tool to correctly
map the Oracle 9 types to int or long, and can't seem to find a
permutation that works.

My other option is to go though the DataSource table specification
and edit each columns properties, for example where the SQL type
is a NUMBER(3) I would need to set (both) ...

Java SQL Type : INTEGER
Vendor Type : INTEGER

but this is tedious and means that I can't refresh the datasource
from the database

Has anybody successfully mapped 2 Oracle NUMBER types to int's and
longs,
if so how, or what are my alternatives ?

0 new messages