Null Pointer Exception displaying postgres array type
See original GitHub issueSystem information:
- Operating system (distribution) and version: Win7
- DBeaver version 6.1.3.2019072211943
- Java version : jre1.8.0_221
- Additional extensions
Connection specification:
- Database name and version Postgres 10
- Driver name postgres-jdbc 42.2.5
- Do you use tunnels or proxies (SSH, SOCKS, etc)? no
Describe the problem you’re observing:
Null pointer exception when trying to display value of postgres type “array” in grid view
Steps to reproduce, if exist:
Include any warning/errors/backtraces from the logs
java.lang.NullPointerException
at org.jkiss.dbeaver.model.DBUtils.getEntityFromMetaData(DBUtils.java:1804)
at org.jkiss.dbeaver.model.DBUtils.getEntityFromMetaData(DBUtils.java:1792)
at org.jkiss.dbeaver.model.impl.jdbc.data.JDBCCollection.makeCollectionFromArray(JDBCCollection.java:197)
at org.jkiss.dbeaver.model.impl.jdbc.data.handlers.JDBCArrayValueHandler.getValueFromObject(JDBCArrayValueHandler.java:62)
at org.jkiss.dbeaver.ext.postgresql.model.data.PostgreArrayValueHandler.getValueFromObject(PostgreArrayValueHandler.java:82)
at org.jkiss.dbeaver.ext.postgresql.model.data.PostgreArrayValueHandler.getValueFromObject(PostgreArrayValueHandler.java:1)
at org.jkiss.dbeaver.model.impl.jdbc.data.handlers.JDBCComplexValueHandler.fetchColumnValue(JDBCComplexValueHandler.java:50)
at org.jkiss.dbeaver.ext.postgresql.model.data.PostgreArrayValueHandler.fetchColumnValue(PostgreArrayValueHandler.java:49)
at org.jkiss.dbeaver.model.impl.jdbc.data.handlers.JDBCAbstractValueHandler.fetchValueObject(JDBCAbstractValueHandler.java:49)
at org.jkiss.dbeaver.ui.controls.resultset.ResultSetDataReceiver.fetchRow(ResultSetDataReceiver.java:122)
at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.fetchQueryData(SQLQueryJob.java:755)
at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.executeStatement(SQLQueryJob.java:484)
at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.lambda$0(SQLQueryJob.java:407)
at org.jkiss.dbeaver.model.exec.DBExecUtils.tryExecuteRecover(DBExecUtils.java:146)
at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.executeSingleQuery(SQLQueryJob.java:405)
at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.extractData(SQLQueryJob.java:849)
at org.jkiss.dbeaver.ui.editors.sql.SQLEditor$QueryResultsContainer.readData(SQLEditor.java:2776)
at org.jkiss.dbeaver.ui.controls.resultset.ResultSetJobDataRead.lambda$0(ResultSetJobDataRead.java:98)
at org.jkiss.dbeaver.model.exec.DBExecUtils.tryExecuteRecover(DBExecUtils.java:146)
at org.jkiss.dbeaver.ui.controls.resultset.ResultSetJobDataRead.run(ResultSetJobDataRead.java:96)
at org.jkiss.dbeaver.model.runtime.AbstractJob.run(AbstractJob.java:102)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (4 by maintainers)
Top GitHub Comments
Fix will be added in 6.1.4. Workaround: cast array column to varchar e.g.
select '{1,2,3}'::int[]::varchar
verified.