-
1. Re: JBoss stores java.lang.String incorrectly ... help pleas
scoy Nov 5, 2002 7:13 AM (in response to tejasab)I think you are not getting any replies because:
1) OJB is ambiguous at best - Oracle Java Bean or jakarta apache OJB?
2) You have code that shows how you are extracting your data, but not how you are storing it. How are you storing it? What are you using for database mappings?
For what it's worth, there is some chance that JBoss 3.0.4 will handle this better.
Steve -
2. Re: JBoss stores java.lang.String incorrectly ... help pleas
tejasab Nov 6, 2002 7:39 AM (in response to tejasab)Hi,
Thanks for replying and your interest.
By OJB, I mean Ordinary Java Bean, hope that clarifies.
I was using JBoss version 3.0.3, but as per your advise I tried the solution with Jboss ver 3.0.4 running on Windows NT, but still the same results as earlier.
I am using Oracle 8i database. I have created a table and a Oracle Type similar to this table.
The sql query I used is,
select cast ( multiset ( SELECT cola, colb from tablea ) as MyTypeMaxList ) from dual
In the oracle database, the structures created are,
create or replace type MyTypeMax_T AS OBJECT (
cola varchar2(50),
colb varchar2(50)
);
/
create or replace type MyTypeMaxList AS table of MyTypeMax_T;
/
On java side I use,
ArrayDescriptor descr = ArrayDescriptor.createDescriptor(arraydesciptorname, dbConnection);
stmt = (OraclePreparedStatement)dbConnection.prepareStatement(sqlString);
stmt.setLong(1, (new Long("1").parseLong(sqlWhere)));
arr = new ARRAY(descr, dbConnection, null);
rset = (OracleResultSet)stmt.executeQuery();
Logger.write("SQL Query executed" , true);
rset.next();
arr = (ARRAY)rset.getArray(1);
Object [] obj = (Object []) arr.getArray();
Hope this makes it all clear now along with my earlier email.
What makes me wonder is the fact that the same code runs fine on OC4J server running on WindowsNT.
Please do give more ideas and pointers....
Many Thanks,
Tejas -
3. Re: JBoss stores java.lang.String incorrectly ... help pleas
scoy Nov 6, 2002 7:09 PM (in response to tejasab)Your code does not appear to be interacting with JBoss at all that I can see.
I suspect that different Oracle JDBC drivers are being used when you swap between the JBoss platform and the OC4J server.