Bugs item #840536, was opened at 2003-11-12 09:09
Message generated for change (Comment added) made by loubyansky
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=840536&group_id=22866

Category: JBossCMP
Group: v3.2
Status: Open
>Resolution: Postponed
Priority: 5
Submitted By: Frank Langelage (lafr)
Assigned to: Alexey Loubyansky (loubyansky)
Summary: Oracle 9iR2: same table in diff. schema

Initial Comment:
I recently switched my database from informix to oracle
and encountered some problems.

With informix, you have one instance and many separate
databases. Each datasource connects to exactly one
database.
With oracle you have one instance and database objects
per user. You connect to the whole instance.

I use the feature of jboss to build database tables on
deployment, if they don't exist.
With oracle DB I got messages that some tables already
exist.
But this table exist for another user (schema), not for
the jboss user.

This leads to exceptions (Table does not exist) when an
foreign key constraint to this supposedly existing table.

Shouldn't jboss use the username of oracle-ds.xml as
schema for metadata access ?
If I set schema to "jboss" instead of null in
SQLUtil.tableExists(), the deployment and table
creation works fine.

Index:
jboss-3.2/server/src/main/org/jboss/ejb/plugins/cmp/jdbc/SQLUtil.java
===================================================================
RCS file:
/cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/cmp/jdbc/SQLUtil.java,v
retrieving revision 1.12.4.14
diff -r1.12.4.14 SQLUtil.java
907c907
<          String schema = null;
---
>          String schema = "JBOSS";

So, I think, schema should get the name of the database
user from oracle-ds.xml.

Oracle-ds.xml is attached.


----------------------------------------------------------------------

>Comment By: Alexey Loubyansky (loubyansky)
Date: 2004-08-11 17:16

Message:
Logged In: YES 
user_id=543482

As a workaround, schema name can be used in the table-name
element in jbosscmp-jdbc.xml. Like
<table-name>[schema-name].[table-name]</table-name>

----------------------------------------------------------------------

Comment By: Alexey Loubyansky (loubyansky)
Date: 2003-11-12 13:24

Message:
Logged In: YES 
user_id=543482

It should.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=840536&group_id=22866


-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to