---
title: "CMJ: SQL exception thrown during a snapshot deployment"
canonical: "https://support.appfire.com/space/SUPPORT/701694014/CMJ%3A%20SQL%20exception%20thrown%20during%20a%20snapshot%20deployment"
format: markdown
---
## \uD83E\uDD14 Problem

A snapshot deployment failed because of an error thrown related to an SQL exception:

```
There was a SQL exception thrown by the Active Objects library: Database: - name:PostgreSQL - version:12.5 - minor version:5 - major version:12 Driver: - name:PostgreSQL JDBC Driver - version:42.2.25 org.postgresql.util.PSQLException: ERROR: invalid byte sequence for encoding "UTF8": 0x00””

java.util.concurrent.ExecutionException: com.atlassian.activeobjects.internal.ActiveObjectsSqlException: There was a SQL exception thrown by the Active Objects library:
Database:

name:PostgreSQL
	- version:12.5
	- minor version:5
	- major version:12
Driver:
	- name:PostgreSQL JDBC Driver
	- version:42.2.25
```

The error suggests there might be a problematic character that is not allowed by the database used (PostgreSQL), so the text value may need to be changed on the source instance.

## \uD83C\uDF31 Solution

To determine where those problematic characters are located, the below steps can be followed:

1. Modify the number for the app's error threshold to a number bigger than the issues included in the project so the app won’t stop the deployment of issues when that number of errors is encountered.
  1. [https://botronsoft.atlassian.net/wiki/spaces/CMJ/pages/33456130/General+Settings](https://botronsoft.atlassian.net/wiki/spaces/CMJ/pages/33456130/General+Settings)
2. Redeploy the snapshot and generate a support zip, ensuring the app's DEBUG is enabled; in that way, all errors related to this problem will be reported.
  1. [https://appfire.atlassian.net/wiki/spaces/CMJ/pages/198214114/General+Settings#Logging-Settings](https://appfire.atlassian.net/wiki/spaces/CMJ/pages/198214114/General+Settings#Logging-Settings)
3. Once all issues are identified on the logs (see example below), modify all problematic comments by deleting the null character (on the source) and re-create the snapshot.

![922d2e8b-fd6b-4888-9a85-87336f34d6e5.png](media://8e786a62-8b39-4a16-be1e-7f4e463e2424)

> ℹ️ Reference documentation:
> ℹ️ 
> ℹ️ - [https://stackoverflow.com/questions/1347646/postgres-error-on-insert-error-invalid-byte-sequence-for-encoding-utf8-0x0](https://stackoverflow.com/questions/1347646/postgres-error-on-insert-error-invalid-byte-sequence-for-encoding-utf8-0x0)
> ℹ️ - [https://www.postgresql.org/docs/9.1/sql-syntax-lexical.html#SQL-SYNTAX-STRINGS-UESCAPE](https://www.postgresql.org/docs/9.1/sql-syntax-lexical.html#SQL-SYNTAX-STRINGS-UESCAPE)

## \uD83D\uDCCE Related articles



> Macro (contentbylabel)