# Liquibase generateChangeLog Failed: org/yaml/snakeyaml/representer/Representer

**URL:** <https://forum.liquibase.org/t/liquibase-generatechangelog-failed-org-yaml-snakeyaml-representer-representer/2427>\
**Category:** General Discussion\
**Created:** [September 11, 2013, 12:38am UTC](https://forum.liquibase.org/t/liquibase-generatechangelog-failed-org-yaml-snakeyaml-representer-representer/2427 "2013-09-11T00:38:00Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Guest](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guest](https://forum.liquibase.org/u/Guest)\
**Post date:** [September 11, 2013, 12:38am UTC](https://forum.liquibase.org/t/liquibase-generatechangelog-failed-org-yaml-snakeyaml-representer-representer/2427/1 "2013-09-11T00:38:00Z")

</div>

I got the same error too. It looks like liquibase cannot find snakeyaml jar on the classpath for some reason.  
Another problem is that I need to explicitly set classpath for the driver. Placing the jar in the lib directory doesn’t help at all contrary to what readme.txt says.

---

<div class="post-metadata">

**Author:** ![Guest](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guest](https://forum.liquibase.org/u/Guest)\
**Post date:** [September 11, 2013, 12:38am UTC](https://forum.liquibase.org/t/liquibase-generatechangelog-failed-org-yaml-snakeyaml-representer-representer/2427/2 "2013-09-11T00:38:00Z")

</div>

I’m new to LiquiBase, so I’m not sure where I’m going wrong.

I’m running&nbsp; … 12 more

---

<div class="post-metadata">

**Author:** ![Guest](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guest](https://forum.liquibase.org/u/Guest)\
**Post date:** [September 11, 2013, 12:38am UTC](https://forum.liquibase.org/t/liquibase-generatechangelog-failed-org-yaml-snakeyaml-representer-representer/2427/3 "2013-09-11T00:38:00Z")

</div>

I had the same error and finally decided to try a different package of the same version and it started to work.

I downloaded:

liquibase-3.0.4-bin.zip

rather than:

liquibase.properties

#liquibase.properties

driver=com.mysql.jdbc.Driver

classpath=/root/scripts/liquibase/lib/mysql-connector-java-5.1.17.jar:/root/scripts/liquibase/lib/snakeyaml-1.12.jar

changeLogFile=changelog/blah-diff-changelog.xml

url=jdbc:mysql://localhost:4000/blah

username=temp

referenceUrl=jdbc:mysql://localhost/blah

referenceUsername=temp

logLevel=info

logFile=log/liquibase.log

The mysql connector in liquibase/lib is just a symlink.

---

<div class="post-metadata">

**Author:** ![Guest](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guest](https://forum.liquibase.org/u/Guest)\
**Post date:** [September 11, 2013, 12:38am UTC](https://forum.liquibase.org/t/liquibase-generatechangelog-failed-org-yaml-snakeyaml-representer-representer/2427/4 "2013-09-11T00:38:00Z")

</div>

1. java -cp lib/snakeyaml-1.12.jar;liquibase.jar liquibase.integration.commandline.Main --defaultsFile props/mig.properties --changeLogFile generated.xml generateChangeLog&nbsp;

The commandline above works for me to fix this:

1. Liquibase generateChangeLog Failed: org/yaml/snakeyaml/representer/Representer

If this is not going to be fixed then it should be noted in the doc that you have to add the yaml.jar to the classpath by yourself.

---

<div class="post-metadata">

**Author:** ![Guest](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guest](https://forum.liquibase.org/u/Guest)\
**Post date:** [September 11, 2013, 12:38am UTC](https://forum.liquibase.org/t/liquibase-generatechangelog-failed-org-yaml-snakeyaml-representer-representer/2427/5 "2013-09-11T00:38:00Z")

</div>

Thanks for the suggestion.&nbsp;

I tried it, but I get the same output.

I should add that I’m running this on my Mac - does that matter?

---

<div class="post-metadata">

**Author:** ![Guest](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guest](https://forum.liquibase.org/u/Guest)\
**Post date:** [September 11, 2013, 12:38am UTC](https://forum.liquibase.org/t/liquibase-generatechangelog-failed-org-yaml-snakeyaml-representer-representer/2427/6 "2013-09-11T00:38:00Z")

</div>

I’ve switched back to version 2.0.5 and it works there.

---

<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:** [September 11, 2013, 12:38am UTC](https://forum.liquibase.org/t/liquibase-generatechangelog-failed-org-yaml-snakeyaml-representer-representer/2427/7 "2013-09-11T00:38:00Z")

</div>

You have to add the snakeyaml to the classpath if you are calling liquibase directly from java rather than using the batch or shell script. Same with the jdbc drivers, they should get picked up automatically from the lib dir, but only if you use the bat/sh script. I’ll take a look a the tar.gz version to make sure that is being packaged correctly.

I also created&nbsp;[https://liquibase.jira.com/browse/CORE-1448](https://liquibase.jira.com/browse/CORE-1448)&nbsp;for making a more helpful error message.

Nathan

---

<div class="post-metadata">

**Author:** ![Guest](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guest](https://forum.liquibase.org/u/Guest)\
**Post date:** [September 11, 2013, 12:38am UTC](https://forum.liquibase.org/t/liquibase-generatechangelog-failed-org-yaml-snakeyaml-representer-representer/2427/8 "2013-09-11T00:38:00Z")

</div>

Thanks Nathan, using the shell script solved this problem for me 🙂

  

I just had to give the +x permissions to the “liquibase” file to make it executable. The other thing is that I did not notice its a shell script initially because it did not have the .sh file extension (duh!).

---

<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:** [September 11, 2013, 12:38am UTC](https://forum.liquibase.org/t/liquibase-generatechangelog-failed-org-yaml-snakeyaml-representer-representer/2427/9 "2013-09-11T00:38:00Z")

</div>

Thanks for pointing that out. I added the executable flag to the file for the next release.

Nathan
