Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-781

Oracle 9iR2: same table in diff. schema

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • No Release
    • JBossAS-3.2.6 Final
    • CMP service
    • None

      SourceForge Submitter: lafr .
      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.

              olubyans@redhat.com Alexey Loubyansky
              sourceforge-user SourceForge legacy user (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: