Friday, 4 November 2011

Could not complete schema update

I recently mapped a JPA entity to a view, and encountered this error while using hibernate to update the database schema:
ORA-01702: a view is not appropriate here

[SchemaUpdate.execute] could not complete schema update

I was using the Oracle JDBC drivers - luckily, the solution was to upgrade the drivers - when using it works fine.
Download ojdbc6.jar from here:

ojdbc6.jar (2,152,051 bytes) - Classes for use with JDK 1.6. It contains the JDBC driver classes except classes for NLS support in Oracle Object and Collection types.