dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #01715
[Bug 409339] Re: DHIS 1.4 File Import fails when data element names are longer than 160 characters
Updated the Hibernate mapping to 230 characters on data element,
dataset, indicator and orgunit. New databases will get this fix while
existing databases must be updated manually.
r522
** Changed in: dhis2
Importance: Undecided => Medium
** Changed in: dhis2
Status: New => Fix Committed
** Changed in: dhis2
Milestone: None => 2.0.2
--
DHIS 1.4 File Import fails when data element names are longer than 160 characters
https://bugs.launchpad.net/bugs/409339
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
Status in DHIS 2: Fix Committed
Bug description:
Currently, the name field of the DHIS 1.4 data element table is set to 230 characters, where the DHIS2 name field in the DataElements table is set to 160. DHIS 1.4 imports silently fail if data element names are longer than 160 characters. Stack trace below.
ERROR 15:18:53,203 The process threw exception (ProcessExecutor.java [Thread-14])
java.lang.RuntimeException: Failed to flush BatchHandler
at org.hisp.dhis.jdbc.batchhandler.AbstractBatchHandler.flush(AbstractBatchHandler.java:255)
at org.hisp.dhis.importexport.dhis14.file.importer.DefaultDhis14FileImportService.importDataElements(DefaultDhis14FileImportService.java:324)
at org.hisp.dhis.importexport.dhis14.file.importer.DefaultDhis14FileImportService.importData(DefaultDhis14FileImportService.java:256)
at org.hisp.dhis.importexport.ImportInternalProcess.executeStatements(ImportInternalProcess.java:84)
at org.hisp.dhis.system.process.AbstractStatementInternalProcess.execute(AbstractStatementInternalProcess.java:85)
at org.hisp.dhis.system.process.AbstractStatementInternalProcess.execute(AbstractStatementInternalProcess.java:37)
at org.amplecode.cave.process.ProcessExecutor.run(ProcessExecutor.java:126)
at java.lang.Thread.run(Unknown Source)
Caused by: org.postgresql.util.PSQLException: ERROR: value too long for type character varying(160)
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1592)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1327)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:192)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:451)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:336)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:282)
at org.hisp.dhis.jdbc.batchhandler.AbstractBatchHandler.flush(AbstractBatchHandler.java:239)
... 7 more
References