No base table could be identified for the current result set's query.

236 views
Skip to first unread message

donnek

unread,
Dec 17, 2018, 12:09:08 PM12/17/18
to SQL Workbench/J - DBMS independent SQL tool
I have a table which was working fine until yesterday, but today any attempt to update any field gives the error:

No base table could be identified for the current result set's query.
Updating this result is not possible.

Other tables in the database update fine, and the only thing I've done to the problem table is add another column using the (I think mistaken) syntax:

alter table biblist add column bpsubset character varying(250) default '';

I dropped bpsubset, and then re-added it using:

alter table biblist add bpsubset character varying(250) default '';

I'm using Build 124 (2018-08-20 22:43) on Java 1.8.0_191 (64 bit) on Ubuntu 14.04 running the 3.13.0-163-generic kernel.  This is probably something obvious, but it's beyond me - it's never happened before in 8 years of using SQL Workbench/J!

The log is as follows:
2018-12-17 16:46:00 INFO  =================== Log started =================== 
2018-12-17 16:46:00 INFO  Using configdir: /home/kevin/.sqlworkbench 
2018-12-17 16:46:00 INFO  Setting default locale to: en 
2018-12-17 16:46:00 INFO  Starting SQL Workbench/J, Build 124 (2018-08-20 22:43) 
2018-12-17 16:46:00 INFO  Java version=1.8.0_191, java.home=/usr/lib/jvm/java-8-oracle/jre, vendor=Oracle Corporation, name=Java HotSpot(TM) 64-Bit Server VM 
2018-12-17 16:46:00 INFO  Operating System=Linux, version=3.13.0-163-generic, platform=amd64 
2018-12-17 16:46:00 INFO  Available memory: 853MB 
2018-12-17 16:46:00 INFO  Found 0 commands in 1ms 
2018-12-17 16:46:01 INFO  Using sizes: toolbar: 16, menu: 16 
2018-12-17 16:46:03 INFO  POI version: 3.13 available. 
2018-12-17 16:46:05 INFO  Loading connection profiles from /home/kevin/.sqlworkbench/WbProfiles.xml 
2018-12-17 16:46:19 INFO  Creating new connection for [{Default group}/bibpad] for driver=org.postgresql.Driver and URL=[jdbc:postgresql://localhost:5432/bibpad] 
2018-12-17 16:46:19 INFO  Adding ClassLoader URL=file:/usr/share/java/postgresql-jdbc4-9.2.jar 
2018-12-17 16:46:19 INFO  Adding /usr/share/java: to java.library.path 
2018-12-17 16:46:20 INFO  Wb1-10: Using DBID=postgresql 
2018-12-17 16:46:20 INFO  Wb1-10: Using identifier quote character: " 
2018-12-17 16:46:20 INFO  Wb1-10: Using search string escape character: \ 
2018-12-17 16:46:20 INFO  Wb1-10: Using catalog separator: . 
2018-12-17 16:46:20 INFO  Wb1-10: Using regular expression for valid identifiers: [a-zA-Z_][\w\$]* 
2018-12-17 16:46:20 INFO  Connected to: [PostgreSQL], Database version info: [11.1 (Ubuntu 11.1-1.pgdg14.04+1)], Database version number: [11.1], Driver version: [PostgreSQL 9.2 JDBC4 (build 1002)], JDBC version: [4.0], ID: [Wb1-10] 
2018-12-17 16:46:49 ERROR Could not read table definition java.lang.NullPointerException
java.lang.NullPointerException
at org.postgresql.jdbc2.AbstractJdbc2DatabaseMetaData.getColumns(AbstractJdbc2DatabaseMetaData.java:2501)
at org.postgresql.jdbc4.AbstractJdbc4DatabaseMetaData.getColumns(AbstractJdbc4DatabaseMetaData.java:98)
at workbench.db.JdbcTableDefinitionReader.getColumns(JdbcTableDefinitionReader.java:265)
at workbench.db.JdbcTableDefinitionReader.getTableColumns(JdbcTableDefinitionReader.java:135)
at workbench.db.JdbcTableDefinitionReader.getTableDefinition(JdbcTableDefinitionReader.java:344)
at workbench.db.DbMetadata.getTableDefinition(DbMetadata.java:2452)
at workbench.db.DbMetadata.getTableDefinition(DbMetadata.java:2445)
at workbench.storage.UpdateTableDetector.getDefinition(UpdateTableDetector.java:448)
at workbench.storage.UpdateTableDetector.checkUpdateTable(UpdateTableDetector.java:129)
at workbench.storage.DataStore.setUpdateTable(DataStore.java:733)
at workbench.storage.DataStore.setUpdateTable(DataStore.java:670)
at workbench.storage.DataStore.checkUpdateTable(DataStore.java:1552)
at workbench.gui.sql.DwPanel.checkUpdateTable(DwPanel.java:719)
at workbench.gui.sql.DwPanel.startEdit(DwPanel.java:1659)
at workbench.gui.sql.DwPanel.startEdit(DwPanel.java:1618)
at workbench.gui.sql.DwPanel.lambda$tableChanged$4(DwPanel.java:1815)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)


Thomas Kellerer

unread,
Dec 17, 2018, 12:15:13 PM12/17/18
to sql-wo...@googlegroups.com
Please use an up-to-date JDBC driver with Postgres 11.

The current driver version is 42.2.5, the outdated 9.2 version of the driver will give you a lot of problems with current Postgres versions to begin with.
I am surprised that you didn't run into problems earlier.

Thomas
> --
> You received this message because you are subscribed to the Google Groups "SQL Workbench/J - DBMS independent SQL tool" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sql-workbenc...@googlegroups.com <mailto:sql-workbenc...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

donnek

unread,
Dec 17, 2018, 1:09:42 PM12/17/18
to SQL Workbench/J - DBMS independent SQL tool
Thanks for coming back so quickly, Thomas.

You're absolutely right - upgrading the driver sorts this immediately.

Thank you so much.
Reply all
Reply to author
Forward
0 new messages