# Create first snapshot Error

**URL:** <https://forum.liquibase.org/t/create-first-snapshot-error/5782>\
**Category:** General Discussion\
**Created:** [August 9, 2021, 7:45am UTC](https://forum.liquibase.org/t/create-first-snapshot-error/5782 "2021-08-09T07:45:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![thewbb](https://avatars.discourse-cdn.com/v4/letter/t/2acd7d/32.png) [@thewbb](https://forum.liquibase.org/u/thewbb)\
**Post date:** [August 9, 2021, 7:45am UTC](https://forum.liquibase.org/t/create-first-snapshot-error/5782/1 "2021-08-09T07:45:57Z")

</div>

command:liquibase --changeLogFile=mydatabase\_changelog.xml generateChangeLog  
Unexpected error running Liquibase: Column ‘REFERENCED\_TABLE\_NAME’ in where clause is ambiguous  
version:liquibase-4.4.3  
OS:win10  
database:MySQL 5.7

details:  
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Column ‘REFERENCED\_TABLE\_NAME’ in where clause is ambiguous  
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)  
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)  
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)  
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)  
at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)  
at com.mysql.jdbc.Util.getInstance(Util.java:381)  
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1015)  
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)  
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3491)  
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3423)  
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1936)  
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060)  
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2542)  
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1734)  
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1885)  
at com.mysql.jdbc.DatabaseMetaDataUsingInfoSchema.executeMetadataQuery(DatabaseMetaDataUsingInfoSchema.java:50)  
at com.mysql.jdbc.DatabaseMetaDataUsingInfoSchema.getImportedKeys(DatabaseMetaDataUsingInfoSchema.java:780)  
at liquibase.snapshot.JdbcDatabaseSnapshot$CachingDatabaseMetaData$ForeignKeysResultSetCache.fastFetch(JdbcDatabaseSnapshot.java:653)  
at liquibase.snapshot.ResultSetCache.get(ResultSetCache.java:72)  
… 52 more

---

<div class="post-metadata">

**Author:** ![rakhi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.liquibase.org/rakhi/32/288_2.png) [@rakhi](https://forum.liquibase.org/u/rakhi)\
**Post date:** [August 10, 2021, 11:28am UTC](https://forum.liquibase.org/t/create-first-snapshot-error/5782/2 "2021-08-10T11:28:59Z")

</div>

Hi @thewbb

Could you please provide some more details:

1. Liquibase version
2. Database you are using
3. The exact command you run
4. liquibase.properties file

Thanks,  
Rakhi Agrawal

---

<div class="post-metadata">

**Author:** ![thewbb](https://avatars.discourse-cdn.com/v4/letter/t/2acd7d/32.png) [@thewbb](https://forum.liquibase.org/u/thewbb)\
**Post date:** [August 13, 2021, 3:43pm UTC](https://forum.liquibase.org/t/create-first-snapshot-error/5782/3 "2021-08-13T15:43:23Z")

</div>

changeLogFile:dbchangelog.xml  
url: jdbc:mysql://localhost:3306/xbio\_sms1?characterEncoding=UTF-8&allowMultiQueries=true  
username: root  
password: \*\*\*\*\*\*\*\*  
classpath: mysql-connector-java-5.1.6.jar

---

<div class="post-metadata">

**Author:** ![khoshgadam](https://avatars.discourse-cdn.com/v4/letter/k/b9e5f3/32.png) [@khoshgadam](https://forum.liquibase.org/u/khoshgadam)\
**Post date:** [August 20, 2022, 5:57pm UTC](https://forum.liquibase.org/t/create-first-snapshot-error/5782/4 "2022-08-20T17:57:16Z")

</div>

Hello @thewbb , did you find any solution for this exception? I’m getting the same exception.
