# generateChangeLog Failure failure for unknown reason

**URL:** <https://forum.liquibase.org/t/generatechangelog-failure-failure-for-unknown-reason/3166>\
**Category:** General Discussion\
**Created:** [February 4, 2015, 8:08am UTC](https://forum.liquibase.org/t/generatechangelog-failure-failure-for-unknown-reason/3166 "2015-02-04T08:08:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![un1382561729492r88id](https://avatars.discourse-cdn.com/v4/letter/u/c4cdca/32.png) [@un1382561729492r88id](https://forum.liquibase.org/u/un1382561729492r88id)\
**Post date:** [February 4, 2015, 8:08am UTC](https://forum.liquibase.org/t/generatechangelog-failure-failure-for-unknown-reason/3166/1 "2015-02-04T08:08:00Z")

</div>

That is about as full of a stack trace as you are likely to get. Including the command line option --logLevel=debug (if you haven’t already) will add more detail.

I went and looked at the source for that - here is a link to the code at github:

[https://github.com/liquibase/liquibase/blob/liquibase-parent-3.3.1/liquibase-core/src/main/java/liquibase/change/ColumnConfig.java#L111-L120](https://github.com/liquibase/liquibase/blob/liquibase-parent-3.3.1/liquibase-core/src/main/java/liquibase/change/ColumnConfig.java#L111-L120)

I would guess that the issue is in the part where it says:

fk . getPrimaryKeyColumns() . get( 0 )

It looks like the code does some checking to ensure that the foreign key columns list has a size of 1, but it does not check to see if the foreign key primary key columns list has a size \> 0.

If you can run it with --logLevel=debug, I think it will tell you which table it is having problems with. That should provide more insight into what is happening.

Steve Donie  
Principal Software Engineer  
Datical, Inc. [http://www.datical.com/](http://www.datical.com/)

---

<div class="post-metadata">

**Author:** ![JohnD.Ament](https://avatars.discourse-cdn.com/v4/letter/j/cc9497/32.png) [@JohnD.Ament](https://forum.liquibase.org/u/JohnD.Ament)\
**Post date:** [February 4, 2015, 8:08am UTC](https://forum.liquibase.org/t/generatechangelog-failure-failure-for-unknown-reason/3166/2 "2015-02-04T08:08:00Z")

</div>

Hi all

So I’m looking at liquibase to help with some DB migration issues I’m seeing.

My app uses 5 schemas. I started running generate schema one at a time to list out the changesets. Everything worked fine except for one, which simply gives me the output

Liquibase generateChangeLog Failed: Unknown Reason

Is there any way to see logs as to why this might fail? I’m using an RPM of 3.1.0.

---

<div class="post-metadata">

**Author:** ![un1423008136135r41id](https://avatars.discourse-cdn.com/v4/letter/u/848f3c/32.png) [@un1423008136135r41id](https://forum.liquibase.org/u/un1423008136135r41id)\
**Post date:** [February 4, 2015, 8:08am UTC](https://forum.liquibase.org/t/generatechangelog-failure-failure-for-unknown-reason/3166/3 "2015-02-04T08:08:00Z")

</div>

Ok, small but not a lot more detail update.

I upgraded to 3.3.1 and am at least able to get this output:

Unexpected error running Liquibase:

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

Anywhere that I would be able to see a full stack trace? Playing with more options did get me this…

 

 

SEVERE 2/4/15 2:25 AM: liquibase: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

 

liquibase.exception.LiquibaseException: liquibase.command.CommandExecutionException: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

 

at liquibase.integration.commandline.CommandLineUtils.doGenerateChangeLog(CommandLineUtils.java:155)

 

at liquibase.integration.commandline.Main.doMigration(Main.java:940)

 

at liquibase.integration.commandline.Main.run(Main.java:177)

 

at liquibase.integration.commandline.Main.main(Main.java:96)

 

Caused by: liquibase.command.CommandExecutionException: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

 

at liquibase.command.AbstractCommand.execute(AbstractCommand.java:13)

 

at liquibase.integration.commandline.CommandLineUtils.doGenerateChangeLog(CommandLineUtils.java:153)

 

... 3 more

 

Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

 

at java.util.ArrayList.rangeCheck(ArrayList.java:571)

 

at java.util.ArrayList.get(ArrayList.java:349)

 

at liquibase.change.ColumnConfig.(ColumnConfig.java:116)

 

at liquibase.change.AddColumnConfig.(AddColumnConfig.java:16)

 

at liquibase.diff.output.changelog.core.MissingIndexChangeGenerator.fixMissing(MissingIndexChangeGenerator.java:62)

 

at liquibase.diff.output.changelog.ChangeGeneratorChain.fixMissing(ChangeGeneratorChain.java:44)

 

at liquibase.diff.output.changelog.ChangeGeneratorFactory.fixMissing(ChangeGeneratorFactory.java:99)

 

at liquibase.diff.output.changelog.DiffToChangeLog.generateChangeSets(DiffToChangeLog.java:140)

 

at liquibase.diff.output.changelog.DiffToChangeLog.print(DiffToChangeLog.java:120)

 

at liquibase.diff.output.changelog.DiffToChangeLog.print(DiffToChangeLog.java:71)

 

at liquibase.diff.output.changelog.DiffToChangeLog.print(DiffToChangeLog.java:59)

 

at liquibase.command.GenerateChangeLogCommand.run(GenerateChangeLogCommand.java:54)

 

at liquibase.command.AbstractCommand.execute(AbstractCommand.java:8)

 

 

... 4 more

---

<div class="post-metadata">

**Author:** ![un1423008136135r41id](https://avatars.discourse-cdn.com/v4/letter/u/848f3c/32.png) [@un1423008136135r41id](https://forum.liquibase.org/u/un1423008136135r41id)\
**Post date:** [February 4, 2015, 8:08am UTC](https://forum.liquibase.org/t/generatechangelog-failure-failure-for-unknown-reason/3166/4 "2015-02-04T08:08:00Z")

</div>

Hi,

Actually no, no matter how much logging I add it doesn’t say what table is affected. With some code hacking I was able to identify which FK is having the issue. However, I’m having much larger concerns which seem to warrant a separate topic.

John
