Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Store big string in Active Object data

Salvatore _Sax_ Cammarata September 16, 2016

Hi,

We are trying to use Active Object to store the data needed by our plugin.
When we try to store an base64 encode of an image we get the following exception:

org.h2.jdbc.JdbcSQLException: Value too long for column "ATTRIBUTES VARCHAR(255)"

 

Currently, Atlassian's Active Object framework does not support binary large objects (BLOBs). 

How can we overcome this limitation?

Using the local file system is not a valid solution for Data Center plugin.

 

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

7 votes
Answer accepted
Petar Petrov (Appfire)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 16, 2016

Mark the field with:

@StringLength(StringLength.UNLIMITED)

From the javadoc of StringLength:

an unlimited-length string is stored as the corresponding "long string" database type (TEXT, CLOB, etc. depending on the database provider)

Claudio Kirchhoff February 14, 2017

Thanks! For future readers: the annotation goes on the setter to be precise.

Tormod Haugene June 1, 2018

Works as advertised. As a side note, adding this to a String setter used in postgres DB does not seem to alter the existing data, only open up for more. Thumbs up. :-)

TAGS
AUG Leaders

Atlassian Community Events