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.

You can't access non-default Postgresql databases

See original GitHub issue

I get this error whenever I try to interact with my non-default created database:

org.jkiss.dbeaver.DBException: Can't access non-default database
	at org.jkiss.dbeaver.ext.postgresql.model.PostgreDatabase.getSchemas(PostgreDatabase.java:256)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.jkiss.dbeaver.model.navigator.DBNDatabaseNode.extractPropertyValue(DBNDatabaseNode.java:793)
	at org.jkiss.dbeaver.model.navigator.DBNDatabaseNode.loadTreeItems(DBNDatabaseNode.java:479)
	at org.jkiss.dbeaver.model.navigator.DBNDatabaseNode.loadChildren(DBNDatabaseNode.java:403)
	at org.jkiss.dbeaver.model.navigator.DBNDatabaseNode.getChildren(DBNDatabaseNode.java:190)
	at org.jkiss.dbeaver.model.navigator.DBNDatabaseNode.getChildren(DBNDatabaseNode.java:1)
	at org.jkiss.dbeaver.ui.navigator.NavigatorUtils.getNodeChildrenFiltered(NavigatorUtils.java:563)
	at org.jkiss.dbeaver.ui.navigator.database.load.TreeLoadService.evaluate(TreeLoadService.java:49)
	at org.jkiss.dbeaver.ui.navigator.database.load.TreeLoadService.evaluate(TreeLoadService.java:1)
	at org.jkiss.dbeaver.ui.LoadingJob.run(LoadingJob.java:86)
	at org.jkiss.dbeaver.ui.LoadingJob.run(LoadingJob.java:71)
	at org.jkiss.dbeaver.model.runtime.AbstractJob.run(AbstractJob.java:95)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

Is this a fault of me or of DBeaver? I just created it with CREATE DATABASE "<name>" OWNER postgres

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:14 (10 by maintainers)

github_iconTop GitHub Comments

4reactions
serge-ridercommented, Sep 19, 2017

PostgreSQL is special. Different databases require different physical connections. You can’t just switch active database in current connection. Changing active database means disconnect+connect, loose of all current transactions, different security, etc.

Most of tools doesn’t allow PG database switch at all. In DBeaver there is a special workaround. Perhaps it should be additionally improved…

2reactions
serge-ridercommented, Jan 18, 2018

I’m pretty sure we need a new ticket. It is completely not clear what to do in this one. As in PG different DBs are actually different connections we can’t make this UI similar to other database systems. There was no any UI solution proposed. Or a workaround. It is a kind of bug report but it is not a bug. So this ticket may lay here forever and depressing us (as we have too many open tickets).

Let’s create a new ticket with some proposed solution, or at least with some discussion which will let us to find a solution - this will make everybody happy.

And I’m sure that @tati-kru didn’t mean any offence here, sorry if it was a bit frustrating.

Read more comments on GitHub >

github_iconTop Results From Across the Web

DBeaver Can't access non-default database - Stack Overflow
I'm using DBeaver 3.8.0 and trying to setup general connection to my local PostgreSQL database. To ...
Read more >
[Solved]-DBeaver Can't access non-default database-postgresql
Right-click on the Db Connection in the database navigator (right-click on PostgreSQL) · Click on edit connection.
Read more >
Postgresql – DBeaver Can't access non-default database – iTecNote
I'm using DBeaver 3.8.0 and trying to setup general connection to my local PostgreSQL database. To view all the databases i have, I...
Read more >
Dbeaver Can't Access Non-Default Database - ADocLib
Once you have created a database you can access it by: If you do not supply the database name then it will default...
Read more >
8.5. Connecting to a Non-Default Database Schema
PostgreSQL and Microsoft SQL Server support connection to a specific ... Keep in mind, that you cannot re-create the SQL Server database from...
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