cannot access db tables

Note: please leave bug reports and feature requests on

cannot access db tables

Postby andrewkl » Tue Nov 24, 2015 12:04 am

I upgraded to version 3.5.4 (from version 3.4.5)

After sucessfully connecting to the db, i get the following error:

DBCException: SQL Error [1064] [42000]: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '<...>' at line 1

when i click on "Tables" [ General -> Connections -> <my_connection> -> Databases -> <my_db> -> Tables ]

Everything worked fine with version 3.4.5; Anything higher than 3.4.5 produces the above error.

Why am i getting this error?

Thanks
--Andrew
andrewkl
 
Posts: 6
Joined: Mon Nov 23, 2015 11:56 pm

Re: cannot access db tables

Postby Serge » Tue Nov 24, 2015 12:04 pm

Most likely you have bad MariaDB driver (3.0 beta?).
- Go to MariaDB driver editor
- Click Download/Update
- In driver artifact version choose some stable version (for instance 3.2.0).
- Click "Download"
- Reconnect
Serge
 
Posts: 1526
Joined: Sat Feb 26, 2011 8:24 pm
Location: SPb

Re: cannot access db tables

Postby andrewkl » Mon Nov 30, 2015 11:20 pm

I'm using MySQL and there is no change to the way MySQL was configured.

The problem goes away if i downgrade back to v3.4.5 of DBeaver. Problem reappears when i upgrade. This is reproducible each and everytime for each upgrade/downgrade of DBeaver.
andrewkl
 
Posts: 6
Joined: Mon Nov 23, 2015 11:56 pm

Re: cannot access db tables

Postby Serge » Tue Dec 01, 2015 10:20 am

Main difference between 3.4.x and 3.5.x is in the drivers management.
After 3.5 DBeaver gets most recent drivers from Maven (while 3.4 has preconfigured MySQL jConnector 5.1.27).
So I still think that driver is the main reason.
Could you say what exact version of MySQL driver do you have?
Could you post a complete stacktrace of the error (you can get it in "Error Log" view)?
Serge
 
Posts: 1526
Joined: Sat Feb 26, 2011 8:24 pm
Location: SPb

Re: cannot access db tables

Postby andrewkl » Tue Dec 01, 2015 10:44 pm

I downloaded mysql-connector-java-5.1.37-bin.jar from http://dev.mysql.com/downloads/connector/j/

From the cmd.exe (Windows 7) console, i ran the following 2 commands:

set CLASSPATH=C:\the\full\path\to\mysql-connector-java-5.1.37-bin.jar
dbeaver.exe

This is the cut-and-paste of the error from the logs produced by dbeaver v3.5.4 :

!SUBENTRY 2 org.jkiss.dbeaver.model 4 0 2015-12-01 14:36:13.179
!MESSAGE MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '<db>' at line 1
!STACK 0
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '<db>' at line 1
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)
at com.mysql.jdbc.Util.getInstance(Util.java:387)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:941)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3870)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3806)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2470)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2617)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2550)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1861)
at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1192)
at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCPreparedStatementImpl.execute(JDBCPreparedStatementImpl.java:250)
at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCPreparedStatementImpl.executeStatement(JDBCPreparedStatementImpl.java:194)
at org.jkiss.dbeaver.model.impl.jdbc.cache.JDBCObjectCache.loadObjects(JDBCObjectCache.java:92)
at org.jkiss.dbeaver.model.impl.jdbc.cache.JDBCObjectCache.getAllObjects(JDBCObjectCache.java:60)
at org.jkiss.dbeaver.model.impl.AbstractObjectCache.getTypedObjects(AbstractObjectCache.java:73)
at org.jkiss.dbeaver.ext.mysql.model.MySQLCatalog.getTables(MySQLCatalog.java:207)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jkiss.dbeaver.model.navigator.DBNDatabaseNode.extractPropertyValue(DBNDatabaseNode.java:691)
at org.jkiss.dbeaver.model.navigator.DBNDatabaseNode.loadTreeItems(DBNDatabaseNode.java:426)
at org.jkiss.dbeaver.model.navigator.DBNDatabaseNode.loadChildren(DBNDatabaseNode.java:352)
at org.jkiss.dbeaver.model.navigator.DBNDatabaseNode.getChildren(DBNDatabaseNode.java:183)
at org.jkiss.dbeaver.ui.navigator.database.load.TreeLoadService.evaluate(TreeLoadService.java:57)
at org.jkiss.dbeaver.ui.navigator.database.load.TreeLoadService.evaluate(TreeLoadService.java:1)
at org.jkiss.dbeaver.runtime.load.jobs.LoadingJob.run(LoadingJob.java:76)
at org.jkiss.dbeaver.runtime.load.jobs.LoadingJob.run(LoadingJob.java:63)
at org.jkiss.dbeaver.runtime.AbstractJob.run(AbstractJob.java:100)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
andrewkl
 
Posts: 6
Joined: Mon Nov 23, 2015 11:56 pm

Re: cannot access db tables

Postby andrewkl » Wed Dec 02, 2015 12:38 am

It looks like DBeaver 3.5.4 is only compatible with MySQL jConnector 5.1.28 and earlier.

I went ahead and downloaded MySQL jConnector 5.1.28 and DBeaver 3.5.4 is able to access the db tables.
andrewkl
 
Posts: 6
Joined: Mon Nov 23, 2015 11:56 pm

Re: cannot access db tables

Postby Serge » Wed Dec 02, 2015 8:31 pm

That's pretty weird.

Could you try one more thing:
- Open Preferences->Common-Query Manager
- Turn on all checkboxes in Query Types and Object Types
- Open Query Manager view (main menu Window)
- Try to expand node "Tables"

Query manager will print metadata query which DBeaver will try to execute to read the table list.
Post this query here.

Thanks
Serge
 
Posts: 1526
Joined: Sat Feb 26, 2011 8:24 pm
Location: SPb

Re: cannot access db tables

Postby andrewkl » Tue Dec 08, 2015 1:07 am

I did the following:

- Open Preferences->Common-Query Manager
- Turn on all checkboxes in Query Types and Object Types
- Open Query Manager view (main menu Window)
- Try to expand node "Tables"

When i tried to to expand "Tables", this pops up:

DBCException: SQL Error [1064] [42000]: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '<...> at line 1
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '<...>' at line 1

I don't see anything else. Where else should i look?

Thanks
andrewkl
 
Posts: 6
Joined: Mon Nov 23, 2015 11:56 pm

Re: cannot access db tables

Postby Serge » Tue Dec 08, 2015 8:26 am

In Query Manager you can see queries which DBeaver executes to read metadata. Something like this:
qm-connect.png
qm-connect.png (21.63 KiB) Viewed 557374 times

Do you see it? I need to see the query DBeaver executes when you expand tables.
Serge
 
Posts: 1526
Joined: Sat Feb 26, 2011 8:24 pm
Location: SPb

Re: cannot access db tables

Postby andrewkl » Thu Dec 10, 2015 10:48 pm

Hi

I upgraded to the latest version (3.5.6) of DBeaver and used the latest MySQL jConnector (5.1.38) .

No more issues accessing the db tables.

Thanks for all the help.

Thanks
--Andrew
andrewkl
 
Posts: 6
Joined: Mon Nov 23, 2015 11:56 pm


Return to Support



Who is online

Users browsing this forum: No registered users and 18 guests