Hi,
I have developed a custom mail handler plugin and am currently unable to save its configuration due to the below error.
Error adding service: com.opensymphony.module.propertyset.IllegalPropertyException: String exceeds 255 characters..
Step by Step example:
1. Administration > Incoming Mail > Mail Handlers - Add incoming mail handler
2. I complete the first page of the form that pops up (e.g. Name, Handler etc...) and then click the Next button
3. I enter all additional configuration into the second page's form, however upon clicking the "Save" button I receive the aforementioned error...
Please advise as to how I go about increasing the 255 character limit or another viable solution.
Hi Ricardo,
Judging by your description, it seems to me that this limitation is on the database. Mail handlers are stored into the tables propertyentry and it has the character limiti restriction as follow:
mysql> desc propertyentry;
+--------------+---------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+--------------+---------------+------+-----+---------+-------+
| ID | decimal(18,0) | NO | PRI | NULL | |
| ENTITY_NAME | varchar(255) | YES | MUL | NULL | |
| ENTITY_ID | decimal(18,0) | YES | MUL | NULL | |
| PROPERTY_KEY | varchar(255) | YES | MUL | NULL | |
| propertytype | decimal(9,0) | YES | | NULL | |
+--------------+---------------+------+-----+---------+-------+
5 rows in set (0.00 sec)
You may change the datatype, but honestly I'm not sure if it's a good idea as it's difficult to know if it's going to affect other functionalities in JIRA.
Cheers
This answer is indeed the solution, however I have decided to significantly reduce the amount of configuration being offered (for the time being) to circumvent the frequent occurence of this message. I may revisit this in the future :)
Thank you for the information
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I had exactly same problem, It was the class mail handler use to save settings.
By default, mail handler is using a specific implementation of PropertySet to persist the settings, if I recall correctly is OFBizPropertySet, this one has a hard limit of 255 chars.
If you want to save longer config, you need to consider switch to PlugingSettings:
https://developer.atlassian.com/docs/common-coding-tasks/storing-plugin-settings
or Active Object:
https://developer.atlassian.com/docs/atlassian-platform-common-components/active-objects
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ricardo,
did you find a solution to this problem without reducing parameters?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.