# Liquibase 2.0.1 and Oracle DB - I can't get it to work

**URL:** <https://forum.liquibase.org/t/liquibase-2-0-1-and-oracle-db-i-cant-get-it-to-work/1102>\
**Category:** General Discussion\
**Created:** [February 1, 2011, 7:22pm UTC](https://forum.liquibase.org/t/liquibase-2-0-1-and-oracle-db-i-cant-get-it-to-work/1102 "2011-02-01T19:22:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevin\_mic](https://avatars.discourse-cdn.com/v4/letter/k/b38774/32.png) [@kevin\_mic](https://forum.liquibase.org/u/kevin_mic)\
**Post date:** [February 1, 2011, 7:22pm UTC](https://forum.liquibase.org/t/liquibase-2-0-1-and-oracle-db-i-cant-get-it-to-work/1102/1 "2011-02-01T19:22:00Z")

</div>

I have been using liquibase to update my database for a few months now and ran into some issues on a different machine using liquibase.&nbsp; I decided to try upgrading to the latest and greatest liquibase version to see if I could bypass the issue and now I am getting errors on my current setup.

Here is the stack trace

build.xml:657: liquibase.exception.DatabaseException: liquibase.exception.DatabaseException: java.sql.SQLException: Unsupported feature  
at liquibase.database.AbstractDatabase.getDatabaseMajorVersion(AbstractDatabase.java:145)  
at liquibase.Liquibase.setDatabasePropertiesAsChangelogParameters(Liquibase.java:720)  
at liquibase.Liquibase.setDatabase(Liquibase.java:78)  
at liquibase.Liquibase.(Liquibase.java:63)  
at liquibase.integration.ant.BaseLiquibaseTask.createLiquibase(BaseLiquibaseTask.java:181)  
at liquibase.integration.ant.DatabaseUpdateTask.execute(DatabaseUpdateTask.java:33)  
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)  
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)  
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)  
at java.lang.reflect.Method.invoke(Method.java:597)  
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)  
at org.apache.tools.ant.Task.perform(Task.java:348)  
at org.apache.tools.ant.Target.execute(Target.java:390)  
at org.apache.tools.ant.Target.performTasks(Target.java:411)  
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397)  
at org.apache.tools.ant.Project.executeTarget(Project.java:1366)  
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)  
at org.apache.tools.ant.Project.executeTargets(Project.java:1249)  
at org.apache.tools.ant.Main.runBuild(Main.java:801)  
at org.apache.tools.ant.Main.startAnt(Main.java:218)  
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)  
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)  
Caused by: liquibase.exception.DatabaseException: java.sql.SQLException: Unsupported feature  
at liquibase.database.jvm.JdbcConnection.getDatabaseMajorVersion(JdbcConnection.java:43)  
at liquibase.database.AbstractDatabase.getDatabaseMajorVersion(AbstractDatabase.java:143)  
… 21 more  
Caused by: java.sql.SQLException: Unsupported feature  
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)  
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)  
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)  
at oracle.jdbc.dbaccess.DBError.throwUnsupportedFeatureSqlException(DBError.java:690)  
at oracle.jdbc.OracleDatabaseMetaData.getDatabaseMajorVersion(OracleDatabaseMetaData.java:4451)  
at liquibase.database.jvm.JdbcConnection.getDatabaseMajorVersion(JdbcConnection.java:41)  
… 22 more

I thought that maybe it was my oracle database driver but I continue to get the error even after updating my driver files to be 11g drivers.&nbsp; &nbsp; My actual database is 10g, does liquibase 2.0.1 require an 11g database?&nbsp; Any insights into the problem would help.

Thanks.

---

<div class="post-metadata">

**Author:** ![nvoxland](https://avatars.discourse-cdn.com/v4/letter/n/87869e/32.png) [@nvoxland](https://forum.liquibase.org/u/nvoxland)\
**Post date:** [February 1, 2011, 7:22pm UTC](https://forum.liquibase.org/t/liquibase-2-0-1-and-oracle-db-i-cant-get-it-to-work/1102/2 "2011-02-01T19:22:00Z")

</div>

It is failing on this line: connection.getMetaData().getDatabaseMajorVersion() which appears to be a jdbc driver issue.&nbsp; Liquibase runs fine with the 10g driver.&nbsp; Are you sure there isn’t a 9i or earlier driver somewhere in your classpath?

Nathan

---

<div class="post-metadata">

**Author:** ![kevin\_mic](https://avatars.discourse-cdn.com/v4/letter/k/b38774/32.png) [@kevin\_mic](https://forum.liquibase.org/u/kevin_mic)\
**Post date:** [February 1, 2011, 7:22pm UTC](https://forum.liquibase.org/t/liquibase-2-0-1-and-oracle-db-i-cant-get-it-to-work/1102/3 "2011-02-01T19:22:00Z")

</div>

Here is my ant code.

&nbsp;   
&nbsp; &nbsp; &nbsp;   
&nbsp; &nbsp; &nbsp;   
&nbsp; &nbsp; &nbsp; \<updateDatabase  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; changeLogFile="${liquibase.changelog.file}"  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; driver="${liquibase.dbdriver}"  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; url="${sqlj.url}"  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; username="${sqlj.user}"  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; password="${sqlj.password}"  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; promptOnNonLocalDatabase=“true”  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dropFirst=“false”  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; contexts="${liquibase.context}"  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; classpathref=“liquibase.classpath”  
&nbsp; &nbsp; &nbsp; /\>

&nbsp;

Here is what I think is happening.&nbsp; In my project there are two ojdbc jars.&nbsp; One is a 10g jar I use for my java application the other is a 11g jar that we added specifically for liquibase.&nbsp; I am passing in a classpathref to the command that includes only liquibase.jar and the 11g oracle driver jar.

What I have found though is my console environment has a CLASSPATH variable set that has the 10g driver in it.&nbsp; Somehow the updateDatabase command is using both the classpathref I passed in and my environment classpath variable.&nbsp; &nbsp; If I do “unset CLASSPATH” then running “ant updatedb” works without the error.

---

<div class="post-metadata">

**Author:** ![kevin\_mic](https://avatars.discourse-cdn.com/v4/letter/k/b38774/32.png) [@kevin\_mic](https://forum.liquibase.org/u/kevin_mic)\
**Post date:** [February 1, 2011, 7:22pm UTC](https://forum.liquibase.org/t/liquibase-2-0-1-and-oracle-db-i-cant-get-it-to-work/1102/4 "2011-02-01T19:22:00Z")

</div>

One other note, I am currently running 2.0-rc7 as my liquibase version and it does not have the problem I am seeing in 2.0.1 . &nbsp; &nbsp; I have noticed one other new problem. &nbsp; With the new jar when I run ant it tries to start up some sort of AWT process. &nbsp; &nbsp;When I try and run it on an environment without a GUI it fails saying it needs a GUI in order to run.

updatedb:  
&nbsp; &nbsp; [echo] liquibase.jar:ojdbc5.jar  
2011-02-01 14:01:00.612 java[80092:60f] Apple AWT Startup Exception : \*\*\* -[NSCFString appendString:]: nil argument  
2011-02-01 14:01:00.614 java[80092:60f] Apple AWT Restarting Native Event Thread

any thoughts?

---

<div class="post-metadata">

**Author:** ![nvoxland](https://avatars.discourse-cdn.com/v4/letter/n/87869e/32.png) [@nvoxland](https://forum.liquibase.org/u/nvoxland)\
**Post date:** [February 1, 2011, 7:22pm UTC](https://forum.liquibase.org/t/liquibase-2-0-1-and-oracle-db-i-cant-get-it-to-work/1102/5 "2011-02-01T19:22:00Z")

</div>

The promptOnNonLocalDatabase=“true” makes liquibase create a UI prompt if you are connecting to a database other than localhost.&nbsp; In your case, you will need that to false if you are getting an error.

Nathan
