3 Replies Latest reply on Aug 28, 2002 12:27 AM by 3004

    reversemapping tool exception

    3004
      I am trying to run the reversemapping tool against the "live" read-only
      oracle9i.
      The reversemapping tool is trying to run some sort of update statement while
      it is getting the
      index info for the table. Oracle is throwing an exception since it is
      read-only.

      Any ideas?




        • 1. Re: reversemapping tool exception
          3004
          The reversemapping tool is trying to run some sort of update statement while
          it is getting the
          index info for the table.
          Can you try running the schema generator tool (rd-schemagen) against the live
          DB to see what happens? The reverse mapping tool doesn't try to make any
          updates, but if you run it directly against the DB (i.e. without specifying any
          schema XML files for it to act on) it invokes the schema generator. I've seen
          Oracle throw execptions when trying to access index metadata before; usually
          when the table involved is some sort of system table. Is that the case here
          (and are you seeing log messages from the tool) ?
          • 2. Re: reversemapping tool exception
            3004
            I'm tried running the rd-schemagen against the live DB and the
            rd-reversemappingtool(without a schema.xml)
            and I get the same result. If I run against my development database which
            is not in read-only and everything works. However
            I am unable to see what SQL is being run against the database.

            No system tables are being referenced.

            I do see messages from the tool but they are minimal [INFO}such as "found
            table XXX".

            D:\Java\kodo-jdoee-2.3.1\mergent>rd-schemagen -properties
            odo.properties -file
            schema.xml
            [INFO] SQL - -[C: 7453641; T: 6270929]open:
            jdbc:oracle:thin:@sundev2:1521:test
            (mergent_user)
            [INFO] SQL - -[C: 7453641; T: 6270929]close
            [INFO] SQL - -[C: 3828867; T: 6270929]open:
            jdbc:oracle:thin:@sundev2:1521:test
            (mergent_user)
            [INFO] Schema - -Found existing table "EXCHANGE".
            [INFO] SQL - -[C: 3828867; T: 6270929]close
            Exception in thread "main" java.sql.SQLException: ORA-01031: insufficient
            privileges

            at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
            at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
            at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
            at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1405)
            at
            oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:822)
            at
            oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:1446
            )
            at
            oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1371)
            at
            oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java
            :1900)
            at
            oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java :693)
            at
            oracle.jdbc.OracleDatabaseMetaData.getIndexInfo(OracleDatabaseMetaData.java:
            3583)
            at
            com.solarmetric.rd.kodo.impl.jdbc.schema.SchemaGenerator.generateIndexes(Sch
            emaGenerator.java:265)
            at
            com.solarmetric.rd.kodo.impl.jdbc.schema.SchemaGenerator.generateTables(Sche
            maGenerator.java:174)
            at
            com.solarmetric.rd.kodo.impl.jdbc.schema.SchemaGenerator.generateSchema(Sche
            maGenerator.java:129)
            at
            com.solarmetric.rd.kodo.impl.jdbc.schema.SchemaGenerator.generateSchemas(Sch
            emaGenerator.java:98)
            at
            com.solarmetric.rd.kodo.impl.jdbc.schema.SchemaGenerator.run(SchemaGenerator
            ..java:471)
            at
            com.solarmetric.rd.kodo.impl.jdbc.schema.SchemaGenerator.main(SchemaGenerato
            r.java:456)








            "Abe White" <awhite@solarmetric.com> wrote in message
            news:akg48b$idf$1@io.solarmetric.com...
            The reversemapping tool is trying to run some sort of update statement
            while
            it is getting the
            index info for the table.
            Can you try running the schema generator tool (rd-schemagen) against the
            live
            DB to see what happens? The reverse mapping tool doesn't try to make any
            updates, but if you run it directly against the DB (i.e. without
            specifying any
            schema XML files for it to act on) it invokes the schema generator. I've
            seen
            Oracle throw execptions when trying to access index metadata before;
            usually
            when the table involved is some sort of system table. Is that the case
            here
            (and are you seeing log messages from the tool) ?
            • 3. Re: reversemapping tool exception
              3004
              This is the line referenced in the stack trace:

              ResultSet idxs = meta.getIndexInfo (meta.getConnection ().getCatalog(),
              table.getSchema ().getName (), table.getName (), false, false);

              As you can see, this is not an update, but Oracle seems to be treating it
              as such. I'll modify the tool to just warn on this exception (and to
              reconnect because otherwise oracle seems to leave an open cursor for each
              call to this method when it throws an exception).