# Not loading SnakeYAML?

**URL:** <https://forum.liquibase.org/t/not-loading-snakeyaml/2285>\
**Category:** General Discussion\
**Created:** [June 11, 2013, 6:26pm UTC](https://forum.liquibase.org/t/not-loading-snakeyaml/2285 "2013-06-11T18:26:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexisli](https://avatars.discourse-cdn.com/v4/letter/a/7c8e57/32.png) [@alexisli](https://forum.liquibase.org/u/alexisli)\
**Post date:** [June 11, 2013, 6:26pm UTC](https://forum.liquibase.org/t/not-loading-snakeyaml/2285/1 "2013-06-11T18:26:00Z")

</div>

Hi, when I run the command listed at the top of this output, I get the rest:

1. **liquibase --changeLogFile=db.cams.yaml --classpath=snakeyaml-1.12.jar**  **&nbsp;update**
2.   
3. INFO 11/06/13 12:18:liquibase: Successfully acquired change log lock
4. INFO 11/06/13 12:18:liquibase: Successfully released change log lock
5. Liquibase update Failed: org.yaml.snakeyaml.Yaml
6. SEVERE 11/06/13 12:18:liquibase: org.yaml.snakeyaml.Yaml
7. java.lang.NoClassDefFoundError: org/yaml/snakeyaml/Yaml
8. &nbsp; &nbsp; &nbsp; &nbsp; at liquibase.parser.core.yaml.YamlChangeLogParser.parse(YamlChangeLogParser.java:47)
9. &nbsp; &nbsp; &nbsp; &nbsp; at liquibase.Liquibase.update(Liquibase.java:128)
10. &nbsp; &nbsp; &nbsp; &nbsp; at liquibase.integration.commandline.Main.doMigration(Main.java:851)
11. &nbsp; &nbsp; &nbsp; &nbsp; at liquibase.integration.commandline.Main.main(Main.java:138)
12. Caused by: java.lang.ClassNotFoundException: org.yaml.snakeyaml.Yaml
13. &nbsp; &nbsp; &nbsp; &nbsp; at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
14. &nbsp; &nbsp; &nbsp; &nbsp; at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
15. &nbsp; &nbsp; &nbsp; &nbsp; at java.security.AccessController.doPrivileged(Native Method)
16. &nbsp; &nbsp; &nbsp; &nbsp; at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
17. &nbsp; &nbsp; &nbsp; &nbsp; at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
18. &nbsp; &nbsp; &nbsp; &nbsp; at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
19. &nbsp; &nbsp; &nbsp; &nbsp; at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
20. &nbsp; &nbsp; &nbsp; &nbsp; ... 4 more

snakeyaml-1.12.jar is in the current working directory. If I try with --classpath=boo:

1. Liquibase update Failed: C:\w\juno\CAMS\CAMSLogicClient\resources\boo does not exist
2. SEVERE 11/06/13 12:23:liquibase: C:\w\juno\CAMS\CAMSLogicClient\resources\boo does not exist
3. liquibase.exception.CommandLineParsingException: C:\w\juno\CAMS\CAMSLogicClient\
4. resources\boo does not exist
5. &nbsp; &nbsp; &nbsp; &nbsp; at liquibase.integration.commandline.Main.configureClassLoader(Main.java:641)
6. &nbsp; &nbsp; &nbsp; &nbsp; at liquibase.integration.commandline.Main.main(Main.java:137)

So Liquibase is clearly finding the JAR. I’ve looked inside the JAR and&nbsp;org/yaml/snakeyaml/Yaml.class exists.

Has anyone got this working please?

---

<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:** [June 11, 2013, 6:26pm UTC](https://forum.liquibase.org/t/not-loading-snakeyaml/2285/2 "2013-06-11T18:26:00Z")

</div>

The problem is because the classpath liquibase parameter sets a sub-classloader whereas snakeyaml needs to be in the classloader that is running liqubase itself.

If you add snakeyaml to a new “lib” dir within the liquibase directory it will find it automatically without having to reference it. There is a bug that is resolved in the next release to include snakeyaml in that dir automatically.

Nathan

---

<div class="post-metadata">

**Author:** ![alexisli](https://avatars.discourse-cdn.com/v4/letter/a/7c8e57/32.png) [@alexisli](https://forum.liquibase.org/u/alexisli)\
**Post date:** [June 11, 2013, 6:26pm UTC](https://forum.liquibase.org/t/not-loading-snakeyaml/2285/3 "2013-06-11T18:26:00Z")

</div>

That’s got it, thanks Nathan.

---

<div class="post-metadata">

**Author:** ![un1508834095787r0id](https://avatars.discourse-cdn.com/v4/letter/u/3be4f8/32.png) [@un1508834095787r0id](https://forum.liquibase.org/u/un1508834095787r0id)\
**Post date:** [June 11, 2013, 6:26pm UTC](https://forum.liquibase.org/t/not-loading-snakeyaml/2285/4 "2013-06-11T18:26:00Z")

</div>

Hi,&nbsp;

I am facing the same issue. I tried creating lib dir but still not working.

I am using liquibase 3.5.3.
