Unknown Column Name

Hello,

i have a problem with liquibase and some sql-Exception:

    2010-08-10 16:10:05 [DEBUG] NewPooledConnection - com.mchange.v2.c3p0.impl.NewPooledConnection@52080d handling a throwable. java.sql.SQLException: Ung�ltiger Spaltenname (unknown Column) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:162) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:227) at oracle.jdbc.driver.OracleStatement.get_column_index(OracleStatement.java:3099) at oracle.jdbc.driver.OracleResultSetImpl.findColumn(OracleResultSetImpl.java:1854) at oracle.jdbc.driver.OracleResultSet.getBoolean(OracleResultSet.java:1571) at com.mchange.v2.c3p0.impl.NewProxyResultSet.getBoolean(NewProxyResultSet.java:2391) at liquibase.database.structure.SqlDatabaseSnapshot.readIndexes(SqlDatabaseSnapshot.java:446) at liquibase.database.structure.SqlDatabaseSnapshot.(SqlDatabaseSnapshot.java:99) at liquibase.database.structure.OracleDatabaseSnapshot.(OracleDatabaseSnapshot.java:34) at liquibase.database.OracleDatabase.createDatabaseSnapshot(OracleDatabase.java:242) at liquibase.preconditions.TableExistsPrecondition.check(TableExistsPrecondition.java:34) at liquibase.preconditions.AndPrecondition.check(AndPrecondition.java:21) at liquibase.ChangeSet.execute(ChangeSet.java:169) at liquibase.parser.visitor.UpdateVisitor.visit(UpdateVisitor.java:26)

In the code, where the exception occurs there is a catch and try block around, which should realy catch that exception… but it’s in the logfile anyway.

The code is in:

OracleDatabaseSnapshotGenerator.java line 258. (Liquibase 2.0 RC5)

        boolean nonUnique = true;     try {     nonUnique = rs.getBoolean("NON_UNIQUE");  <-- Exception comes, and the stacktrace is printed out... } catch (SQLException e) { //doesn't exist in all databases     }

There is no big problem with it, because everthing works. But this Exception should not be displayed in any log-file!!!

Possible this isn’t a liquibase-problem ?!
Any suggestions?

thanks

We are not logging it, it looks like c3p0 is, though.  You should be able to get it to go away by turning your loglevel  above debug.

Nathan

ok, thanks first, changing the log level for c3po worked.

But what is that code good for?
The documentation says, in other words that this exception is thrown in every db…
so why not remove this code?

thanks for your fast answers!

You’re right, we don’t actually need that call.  It was probably still there from when we split the oracle-specific code off from the default code which does include it.  If you aren’t using c3p0, a stacktrace isn’t thrown so normally you wouldn’t see the error, but there is not need to even make it now with oracle.

I removed it in trunk for the next release.

Nathan