← Back to team overview

dhis2-devs team mailing list archive

[Bug 409339] [NEW] DHIS 1.4 File Import fails when data element names are longer than 160 characters

 

Public bug reported:

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

** Affects: dhis2
     Importance: Undecided
         Status: New

-- 
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 District Health Information Software 2: New

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



Follow ups

References