Webtop Add Contact Error - Value too long

Hello @webtop_team or @lucag,

I’m adding contacts to my Webtop Addressbook. I’ve taken our secretary’s addressbook and renamed it to our Office Addressbook. I’ve then shared this address book with all our employees.

I’ve created a new entry in this shared address book but I’m receiving a generic “Error”. There are no details with this error but just the word error in the box and the Ok to close the box.

I’ve looked in the Webtop logs and I can see the following details. They seem to be related to something being too long in the Address book. Please assist with why I’m receiving this error message.

Caused by: com.sonicle.webtop.core.dal.DAOException: JOOQ
	at com.sonicle.webtop.core.dal.BaseDAO$DAOExecuteListener.exception(BaseDAO.java:149)
	at org.jooq.impl.ExecuteListeners.exception(ExecuteListeners.java:232)
	at org.jooq.impl.AbstractQuery.execute(AbstractQuery.java:356)
	at org.jooq.impl.AbstractDelegatingQuery.execute(AbstractDelegatingQuery.java:133)
	at com.sonicle.webtop.contacts.dal.ContactDAO.insert(ContactDAO.java:672)
	at com.sonicle.webtop.contacts.ContactsManager.doContactInsert(ContactsManager.java:2003)
	at com.sonicle.webtop.contacts.ContactsManager.addContact(ContactsManager.java:1056)
	... 60 common frames omitted
Caused by: org.jooq.exception.DataAccessException: SQL [insert into "contacts"."contacts" ("contact_id", "category_id", "revision_status", "revision_timestamp", "public_uid", "is_list", "searchfield", "title", "firstname", "lastname", "nickname", "gender", "company", "function", "work_address", "work_city", "work_state", "work_postalcode", "work_country", "work_telephone", "work_telephone2", "work_fax", "work_mobile", "work_pager", "work_email", "work_im", "assistant", "assistant_telephone", "department", "manager", "home_address", "home_city", "home_state", "home_postalcode", "home_country", "home_telephone", "home_telephone2", "home_fax", "home_mobile", "home_pager", "home_email", "home_im", "partner", "birthday", "anniversary", "other_address", "other_city", "other_state", "other_postalcode", "other_country", "other_email", "other_im", "url", "notes", "revision_sequence", "href", "etag", "creation_timestamp", "display_name", "company_master_data_id") values (?, ?, ?, cast(? as timestamp), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as date), cast(? as date), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as timestamp), ?, ?)]; ERROR: value too long for type character varying(60)

Also, I’ve noticed this previously with Webtop Errors where there is a generic error and no details. I know I have access to the Webtop logs from Nethserver but it would be more helpful for our staff to see the reason for an error on Webtop itself. Is there a reason why this generic Error is displayed? I would like to suggest details to show why the error occurred.

Please assist with what is causing this ‘value too long’ error I’m seeing.

Thank you.

Hello,

Perhaps the @support_team could assist with my error. I’ve done more investigation and found the Company field in Contacts has a limit. But the error is generic and I’m not seeing what that limit is?

Thank you.

Hi @greavette,
the company field in the contact table has a default database limit of 60 characters.
To view all current field limits in this table:

su - postgres -c 'psql webtop5'
webtop5=# \d contacts.contacts

To increase the limit of the Company field (for example, from 60 to 100):

webtop5=# alter table contacts.contacts alter COLUMN company type character varying(100);

Let me know if you solve :wink:

5 Likes

Hello @lucag,

Will this change be saved across updates/uprgrades of Webtop?

Thank you.

Hi Charlse,

I can confirm that in one of the next releases the length of the Company field will be increased :wink:

just a little patience for the wait … thanks :slightly_smiling_face:

2 Likes