Postgresql : value too long for type character varying(2000)

  • which versions are you using : by looking at the maven output, it seems the Sonar Scanner plugin version is sonar-maven-plugin:3.7.0.1746 . The server is SonarQube version: 6.7.6 and the database backend is PGSQL version 9.6.10

This question follows up Issue with inherited sonar.organization property using a self hosted instance

It seems the analysis fail at server side with the following error message:

"\n### Error updating database. Cause: org.postgresql.util.PSQLException: ERROR: value too long for type character varying(2000)\n### The error may involve org.sonar.db.component.ComponentMapper.insert-Inline\n### The error occurred while setting parameters\n### Cause: org.postgresql.util.PSQLException: ERROR: value too long for type character varying(2000) (Visit failed for Component {key=org.xwiki.platform:xwiki-platform-store-transaction,type=MODULE} located org.xwiki.platform:xwiki-platform-store(type=MODULE)->org.xwiki.platform:xwiki-platform-core(type=MODULE)->org.xwiki.platform:xwiki-platform(type=PROJECT))"

Any idea ?

Sorry but I am really in need for help. I don’t even understand which field in concerned. Thanks !

Hi @mhow2,

As you’re using a no more supported version of SonarQube (6.7.6, when the latest LTS is 7.9), I would highly recommend you to migrate to the latest LTS.
Modules have been removed, so your problem should be automatically fixed.

Regards

Thanks. It worked by upgrading SonarQube.

Thanks for confirming that your issue has been fixed @mhow2 !