[Bug 1488898] [NEW] WepAPI crashes 500 when sending value exceeding n varchar(n)

Public bug reported:

From the stacktrace returned it seems that the wepapi crashes if it is

attempted to send data to a text data element with limited text size. In
this particular I can read in the stacktrace: "root cause:
org.postgresql.util.PSQLException: ERROR: value too long for type
character varying(31).

Was unable to get a stacktrace copied from the Android device returning
the error for some reason, so screenshots (read: photos of the screen)
are attached.

** Affects: dhis2
     Importance: Undecided
         Status: New

** Attachment added: "images of stacktrace. See page 6 for api ERROR: ..."
   https://bugs.launchpad.net/bugs/1488898/+attachment/4452683/+files/stacktrace.tar.gz

···

--
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1488898

Title:
  WepAPI crashes 500 when sending value exceeding n varchar(n)

Status in DHIS:
  New

Bug description:
  From the stacktrace returned it seems that the wepapi crashes if it is
  attempted to send data to a text data element with limited text size.
  In this particular I can read in the stacktrace: "root cause:
  org.postgresql.util.PSQLException: ERROR: value too long for type
  character varying(31).

  Was unable to get a stacktrace copied from the Android device
  returning the error for some reason, so screenshots (read: photos of
  the screen) are attached.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1488898/+subscriptions

It might be possible that this is due to the username being too long for
storing in storedby field, suggested by busoye.

···

--
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1488898

Title:
  WepAPI crashes 500 when sending value exceeding n varchar(n)

Status in DHIS:
  New

Bug description:
  From the stacktrace returned it seems that the wepapi crashes if it is
  attempted to send data to a text data element with limited text size.
  In this particular I can read in the stacktrace: "root cause:
  org.postgresql.util.PSQLException: ERROR: value too long for type
  character varying(31).

  Was unable to get a stacktrace copied from the Android device
  returning the error for some reason, so screenshots (read: photos of
  the screen) are attached.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1488898/+subscriptions

** Description changed:

  From the stacktrace returned it seems that the wepapi crashes if it is
- attempted to send data to a text data element with limited text size. In
- this particular I can read in the stacktrace: "root cause:
+ attempted to send data to a text field with limited text size. In this
+ particular I can read in the stacktrace: "root cause:
  org.postgresql.util.PSQLException: ERROR: value too long for type
  character varying(31).
  
  Was unable to get a stacktrace copied from the Android device returning
  the error for some reason, so screenshots (read: photos of the screen)
  are attached.

** Description changed:

  From the stacktrace returned it seems that the wepapi crashes if it is
  attempted to send data to a text field with limited text size. In this
- particular I can read in the stacktrace: "root cause:
+ particular case I can read in the stacktrace: "root cause:
  org.postgresql.util.PSQLException: ERROR: value too long for type
  character varying(31).
  
  Was unable to get a stacktrace copied from the Android device returning
  the error for some reason, so screenshots (read: photos of the screen)
  are attached.

** Description changed:

  From the stacktrace returned it seems that the wepapi crashes if it is
  attempted to send data to a text field with limited text size. In this
  particular case I can read in the stacktrace: "root cause:
  org.postgresql.util.PSQLException: ERROR: value too long for type
  character varying(31).
  
  Was unable to get a stacktrace copied from the Android device returning
  the error for some reason, so screenshots (read: photos of the screen)
  are attached.

···

+
+ edit:
+ It might be possible that this is due to the username being too long for storing in storedby field.

--
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1488898

Title:
  WepAPI crashes 500 when sending value exceeding n varchar(n)

Status in DHIS:
  New

Bug description:
  From the stacktrace returned it seems that the wepapi crashes if it is
  attempted to send data to a text field with limited text size. In this
  particular case I can read in the stacktrace: "root cause:
  org.postgresql.util.PSQLException: ERROR: value too long for type
  character varying(31).

  Was unable to get a stacktrace copied from the Android device
  returning the error for some reason, so screenshots (read: photos of
  the screen) are attached.

  edit:
  It might be possible that this is due to the username being too long for storing in storedby field.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1488898/+subscriptions

Made a fix to set "storedby" for trackedentitydatavalue and datavalue to
255 characters to match the length of users.username in trunk and 2.20.

···

--
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1488898

Title:
  WepAPI crashes 500 when sending value exceeding n varchar(n)

Status in DHIS:
  New

Bug description:
  From the stacktrace returned it seems that the wepapi crashes if it is
  attempted to send data to a text field with limited text size. In this
  particular case I can read in the stacktrace: "root cause:
  org.postgresql.util.PSQLException: ERROR: value too long for type
  character varying(31).

  Was unable to get a stacktrace copied from the Android device
  returning the error for some reason, so screenshots (read: photos of
  the screen) are attached.

  edit:
  It might be possible that this is due to the username being too long for storing in storedby field.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1488898/+subscriptions

** Changed in: dhis2
       Status: New => Fix Committed

** Changed in: dhis2
     Assignee: (unassigned) => Lars Helge Øverland (larshelge)

···

--
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1488898

Title:
  WepAPI crashes 500 when sending value exceeding n varchar(n)

Status in DHIS:
  Fix Committed

Bug description:
  From the stacktrace returned it seems that the wepapi crashes if it is
  attempted to send data to a text field with limited text size. In this
  particular case I can read in the stacktrace: "root cause:
  org.postgresql.util.PSQLException: ERROR: value too long for type
  character varying(31).

  Was unable to get a stacktrace copied from the Android device
  returning the error for some reason, so screenshots (read: photos of
  the screen) are attached.

  edit:
  It might be possible that this is due to the username being too long for storing in storedby field.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1488898/+subscriptions