# How to use oracle extensions?

**URL:** <https://forum.liquibase.org/t/how-to-use-oracle-extensions/496>\
**Category:** General Discussion\
**Created:** [April 8, 2010, 12:18pm UTC](https://forum.liquibase.org/t/how-to-use-oracle-extensions/496 "2010-04-08T12:18:00Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![jon222](https://avatars.discourse-cdn.com/v4/letter/j/ba8739/32.png) [@jon222](https://forum.liquibase.org/u/jon222)\
**Post date:** [April 8, 2010, 12:18pm UTC](https://forum.liquibase.org/t/how-to-use-oracle-extensions/496/1 "2010-04-08T12:18:00Z")

</div>

Hi,

I need to add oracle support in liquibase, but I’ve never used it before, so I have problems.  
It says: To use, simply include the oracle-extentions.jar file in your classpath.  
I did it in liquibase:properties  
“classpath: …/ojdbc14.jar;…/liquibase-extensions-1.0.jar”  
but when trying \<ora:createTrigger … \> I get this:  
"Migration Failed: cvc-complex-type.2.4.a: Invalid content was found starting wit  
h element ‘ora:createTrigger’. One of '{“[http://www.liquibase.org/xml/ns/dbchangelog…”](http://www.liquibase.org/xml/ns/dbchangelog....%22)

It would be helpful to show me a full example of cmd line,properties file, and update.xml how to use it (in general a full simple example, which works), because I think there can be problem with e.g. xml schema or other stuff (it’s not clear what is required and what not) , but I didnt found information how to use it.

Thanx

---

<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:** [April 8, 2010, 12:18pm UTC](https://forum.liquibase.org/t/how-to-use-oracle-extensions/496/2 "2010-04-08T12:18:00Z")

</div>

You do need to be using liquibase 2.0, and make sure that the xsd you are using a root node with the 2.0 xsd like this:

\<databaseChangeLog  
&nbsp; &nbsp; &nbsp; &nbsp; xmlns=“[http://www.liquibase.org/xml/ns/dbchangelog”](http://www.liquibase.org/xml/ns/dbchangelog%22)  
&nbsp; &nbsp; &nbsp; &nbsp; xmlns:xsi=“[http://www.w3.org/2001/XMLSchema-instance”](http://www.w3.org/2001/XMLSchema-instance%22)  
&nbsp; &nbsp; &nbsp; &nbsp; xsi:schemaLocation="[http://www.liquibase.org/xml/ns/dbchangelog](http://www.liquibase.org/xml/ns/dbchangelog) [http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd\>](http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd>)

Does that help?

---

<div class="post-metadata">

**Author:** ![jon222](https://avatars.discourse-cdn.com/v4/letter/j/ba8739/32.png) [@jon222](https://forum.liquibase.org/u/jon222)\
**Post date:** [April 8, 2010, 12:18pm UTC](https://forum.liquibase.org/t/how-to-use-oracle-extensions/496/3 "2010-04-08T12:18:00Z")

</div>

Thanks, I used this with liquibase 2.0 and it works. Needed to add xmlns:ora yet.

\<databaseChangeLog xmlns=“[http://www.liquibase.org/xml/ns/dbchangelog”](http://www.liquibase.org/xml/ns/dbchangelog%22)  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xmlns:ora=“[http://www.liquibase.org/xml/ns/dbchangelog-ext”](http://www.liquibase.org/xml/ns/dbchangelog-ext%22)  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xmlns:xsi=“[http://www.w3.org/2001/XMLSchema-instance”](http://www.w3.org/2001/XMLSchema-instance%22)  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xsi:schemaLocation=“[http://www.liquibase.org/xml/ns/dbchangelog](http://www.liquibase.org/xml/ns/dbchangelog) [http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd”\>](http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd%22>)

---

<div class="post-metadata">

**Author:** ![jon222](https://avatars.discourse-cdn.com/v4/letter/j/ba8739/32.png) [@jon222](https://forum.liquibase.org/u/jon222)\
**Post date:** [April 8, 2010, 12:18pm UTC](https://forum.liquibase.org/t/how-to-use-oracle-extensions/496/4 "2010-04-08T12:18:00Z")

</div>

I have another problem, when trying:

&nbsp; &nbsp;   
&nbsp; &nbsp; &nbsp; &nbsp; \<ora:createTrigger  
&nbsp; &nbsp; &nbsp; &nbsp; afterBeforeInsteadOf=“before”  
&nbsp; &nbsp; &nbsp; &nbsp; procedure=“begin select departments\_seq.nextval into :new.id from dual; end;”&nbsp;   
&nbsp; &nbsp; &nbsp; &nbsp; triggerName=“departments\_trg”  
&nbsp; &nbsp; &nbsp; &nbsp; tableName=“departments”  
&nbsp; &nbsp; &nbsp; &nbsp; insert=“true”  
&nbsp; &nbsp; &nbsp; &nbsp; forEachRow=“true”  
&nbsp; &nbsp; &nbsp; &nbsp; /\>&nbsp; &nbsp; &nbsp;  
&nbsp; &nbsp; &nbsp;

I get:  
LiquiBase Update Failed: Validation Failed:  
&nbsp; &nbsp; 1 changes have validation errors  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; java.lang.NoSuchMethodError: liquibase.exception.ValidationErrors.chec  
kDisallowedField(Ljava/lang/String;Ljava/lang/Object;)V  
.&nbsp; For more information, use the --logLevel flag)  
SEVERE 9.4.2010 14:10:liquibase: Validation Failed:  
&nbsp; &nbsp; 1 changes have validation errors  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; java.lang.NoSuchMethodError: liquibase.exception.ValidationErrors.chec  
kDisallowedField(Ljava/lang/String;Ljava/lang/Object;)V

liquibase.exception.ValidationFailedException: Validation Failed:  
&nbsp; &nbsp; 1 changes have validation errors  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; java.lang.NoSuchMethodError: liquibase.exception.ValidationErrors.chec  
kDisallowedField(Ljava/lang/String;Ljava/lang/Object;)V

&nbsp; &nbsp; &nbsp; &nbsp; at liquibase.changelog.DatabaseChangeLog.validate(DatabaseChangeLog.java  
:131)  
&nbsp; &nbsp; &nbsp; &nbsp; at liquibase.Liquibase.update(Liquibase.java:97)  
&nbsp; &nbsp; &nbsp; &nbsp; at liquibase.integration.commandline.Main.doMigration(Main.java:664)  
&nbsp; &nbsp; &nbsp; &nbsp; at liquibase.integration.commandline.Main.main(Main.java:105)

---

<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:** [April 8, 2010, 12:18pm UTC](https://forum.liquibase.org/t/how-to-use-oracle-extensions/496/5 "2010-04-08T12:18:00Z")

</div>

We have made a few changes leading up to 2.0 that have apparently broken the extension.&nbsp; I’ll take a look at the extension code and get it fixed up.

Nathan

---

<div class="post-metadata">

**Author:** ![jon222](https://avatars.discourse-cdn.com/v4/letter/j/ba8739/32.png) [@jon222](https://forum.liquibase.org/u/jon222)\
**Post date:** [April 8, 2010, 12:18pm UTC](https://forum.liquibase.org/t/how-to-use-oracle-extensions/496/6 "2010-04-08T12:18:00Z")

</div>

What was the Liquibase version, the Oracle Extensions 0.1 were originally made for?

---

<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:** [April 8, 2010, 12:18pm UTC](https://forum.liquibase.org/t/how-to-use-oracle-extensions/496/7 "2010-04-08T12:18:00Z")

</div>

It was an early build of 2.0.&nbsp; I’m not sure exactly when it was from.&nbsp; There hasn’t been a lot of changes in the liquibase API since then, but there has been a couple.&nbsp; Part of what is holding up the 2.0 release is me ensuring that the final version of the APIs will not need to change cause issues like this in the future.

Nathan

---

<div class="post-metadata">

**Author:** ![alegr44](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@alegr44](https://forum.liquibase.org/u/alegr44)\
**Post date:** [April 8, 2010, 12:18pm UTC](https://forum.liquibase.org/t/how-to-use-oracle-extensions/496/8 "2010-04-08T12:18:00Z")

</div>

Hi…

I’m using this amazing project (liquibase) but I have a problem with the oracle extension. It’s seen like the jar is not in sync with the latest version of liquibase.

So my question is? When is going to be released the new version of oracle extension? or there is a new version and I didn’t found it.

Please let me know.

Best regards

Alejandro

---

<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:** [April 8, 2010, 12:18pm UTC](https://forum.liquibase.org/t/how-to-use-oracle-extensions/496/9 "2010-04-08T12:18:00Z")

</div>

It hasn’t been synced up yet.&nbsp; It’s on my to-do list for this week hopefully.&nbsp;

Nathan

---

<div class="post-metadata">

**Author:** ![carlyle\_lb](https://avatars.discourse-cdn.com/v4/letter/c/f08c70/32.png) [@carlyle\_lb](https://forum.liquibase.org/u/carlyle_lb)\
**Post date:** [April 8, 2010, 12:18pm UTC](https://forum.liquibase.org/t/how-to-use-oracle-extensions/496/10 "2010-04-08T12:18:00Z")

</div>

Does RC7 support oracle extensions?

Is there something I should do differently?

This code:

\<?xml version="1.0" encoding="UTF-8" standalone="no"?\>

\<databaseChangeLog xmlns=“[http://www.liquibase.org/xml/ns/dbchangelog”](http://www.liquibase.org/xml/ns/dbchangelog%22)  
&nbsp; &nbsp; xmlns:xsi=“[http://www.w3.org/2001/XMLSchema-instance”](http://www.w3.org/2001/XMLSchema-instance%22)  
&nbsp; &nbsp; xmlns:ora=“[http://www.liuitbase.org/xml/ns/dbchangelog-ext”](http://www.liuitbase.org/xml/ns/dbchangelog-ext%22)  
&nbsp; &nbsp; xsi:schemaLocation=“[http://www.liquibase.org/xml/ns/dbchangelog](http://www.liquibase.org/xml/ns/dbchangelog)  
&nbsp; &nbsp; &nbsp; &nbsp; [http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd”\>](http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd%22>)

&nbsp; 

Results in error output:

INFO: Successfully released change log lock  
Nov 9, 2010 8:53:14 PM liquibase.logging.jvm.JavaUtilLogger info  
INFO: liquibase.ext.ora.droptrigger.DropTriggerOracle.warn(Lliquibase/statement/SqlStatement;Lliquibase/database/Database;Lliquibase/sqlgenerator/SqlGeneratorChain;)Lliquibase/exception/Warnings;  
java.lang.AbstractMethodError: liquibase.ext.ora.droptrigger.DropTriggerOracle.warn(Lliquibase/statement/SqlStatement;Lliquibase/database/Database;Lliquibase/sqlgenerator/SqlGeneratorChain;)Lliquibase/exception/Warnings;  
at liquibase.sqlgenerator.SqlGeneratorChain.warn(SqlGeneratorChain.java:38)  
at liquibase.sqlgenerator.SqlGeneratorFactory.warn(SqlGeneratorFactory.java:165)  
at liquibase.change.AbstractChange.warn(AbstractChange.java:80)  
at liquibase.changelog.visitor.ValidatingVisitor.visit(ValidatingVisitor.java:77)  
at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:58)  
at liquibase.changelog.DatabaseChangeLog.validate(DatabaseChangeLog.java:128)  
at liquibase.Liquibase.update(Liquibase.java:109)  
at liquibase.integration.commandline.Main.doMigration(Main.java:685)  
at liquibase.integration.commandline.Main.main(Main.java:115)

---

<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:** [April 8, 2010, 12:18pm UTC](https://forum.liquibase.org/t/how-to-use-oracle-extensions/496/11 "2010-04-08T12:18:00Z")

</div>

There is a new build on [liquibase.org/extensions](http://liquibase.org/extensions) site that should work with the newest core liquibase RC7 now. Let me know if you run into troubles with it.

Nathan
