Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,368,358
Community Members
 
Community Events
168
Community Groups

Getting Error while saving Notification details

Edited
Hi ,
I have created a bamboo Notification plugin. which accepts a URL and big json.
 
But whenever i try to save the details, it gives the following error: "Value too long"
How can I handle this so that it can take bigger data. 
Thanks,
2021-10-04 12:05:50,495 INFO [http-nio-8085-exec-11] [AbstractBatchImpl] HHH000010: On release of batch it still contained JDBC statements
2021-10-04 12:05:50,496 ERROR [http-nio-8085-exec-11] [BatchingBatch] HHH000315: Exception executing batch [org.h2.jdbc.JdbcBatchUpdateException: Value too long for column """RECIPIENT"" VARCHAR(255)""STRINGDECODE('https://baswarecorp.webhook.office.com/webhookb2/3590dd62-0d13-4c6f-b8c7-c277731cdbfb@9737b55a-4455-48e4-8c47-a26a... (358)"; SQL statement:
insert into NOTIFICATIONS (RECIPIENT_TYPE, RECIPIENT, NOTIFICATION_SET, CONDITION_KEY, CONDITION_DATA, NOTIFICATION_RULE_ID) values (?, ?, ?, ?, ?, ?) [22001-199]], SQL: insert into NOTIFICATIONS (RECIPIENT_TYPE, RECIPIENT, NOTIFICATION_SET, CONDITION_KEY, CONDITION_DATA, NOTIFICATION_RULE_ID) values (?, ?, ?, ?, ?, ?)
2021-10-04 12:05:50,496 WARN [http-nio-8085-exec-11] [SqlExceptionHelper] SQL Error22001, SQLState: 22001
2021-10-04 12:05:50,496 ERROR [http-nio-8085-exec-11] [SqlExceptionHelper] Value too long for column """RECIPIENT"" VARCHAR(255)""STRINGDECODE('https://baswarecorp.webhook.office.com/webhookb2/3590dd62-0d13-4c6f-b8c7-c277731cdbfb@9737b55a-4455-48e4-8c47-a26a... (358)"; SQL statement:
insert into NOTIFICATIONS (RECIPIENT_TYPE, RECIPIENT, NOTIFICATION_SET, CONDITION_KEY, CONDITION_DATA, NOTIFICATION_RULE_ID) values (?, ?, ?, ?, ?, ?) [22001-199]
2021-10-04 12:05:50,497 ERROR [http-nio-8085-exec-11] [ExceptionMappingInterceptor] could not execute batch; SQL [insert into NOTIFICATIONS (RECIPIENT_TYPE, RECIPIENT, NOTIFICATION_SET, CONDITION_KEY, CONDITION_DATA, NOTIFICATION_RULE_ID) values (?, ?, ?, ?, ?, ?)]; nested exception is org.hibernate.exception.DataException: could not execute batch
org.springframework.dao.DataIntegrityViolationException: could not execute batch; SQL [insert into NOTIFICATIONS (RECIPIENT_TY....
METHOD:
 @NotNull
@Override
public String getRecipientConfig()
{

JSONObject config = new JSONObject();

try {

config.put(WEBHOOK_URL, webhookUrl);
config.put(TEMPLATE, template);
} catch (JSONException e) {
log.error("Error getting recipient config: " + e.getMessage());
}

return config.toString();

}

 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events