question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Null Pointer Exception displaying postgres array type

See original GitHub issue

System 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:closed
  • Created 4 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
serge-ridercommented, Jul 22, 2019

Fix will be added in 6.1.4. Workaround: cast array column to varchar e.g. select '{1,2,3}'::int[]::varchar

0reactions
uslsscommented, Jul 26, 2019

verified.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Does Java Postgresql Driver support Array ... - Stack Overflow
I suppose because it is just null because no data for urls for a particular field ? To solve your problem you can...
Read more >
Java NullPointerException - Detect, Fix, and Best Practices
Some of the common reasons for NullPointerException in java programs are: ... Checking the length of an array that is null at runtime....
Read more >
Does Java Postgresql Driver support Array Datatype, getting ...
I suppose because it is just null because no data for urls for a particular field ? To solve your problem you can...
Read more >
8.0: Command Execution Functions - PostgreSQL
(The array pointers may be NULL when nParams is zero.) paramTypes[] specifies, by OID, the data types to be assigned to the parameter...
Read more >
Using a PostgreSQL database as an AWS DMS source
A table with an ARRAY data type must have a primary key. A table with an ARRAY data type missing a primary key...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found