Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes in JDBC DatabaseMetaData #7126

Closed
dprutean opened this issue Jan 26, 2017 · 14 comments
Closed

Fixes in JDBC DatabaseMetaData #7126

dprutean opened this issue Jan 26, 2017 · 14 comments
Assignees
Labels
Milestone

Comments

@dprutean
Copy link

We try to use the JDBC.DatabaseMetaData to discover database structure. For this we call getSchemas() getTables() getColumns() getIndexes(), etc.
After getSchemas() we receive an error 'The database instance is not set in the current thread'. Could you please set this directly in the JDBC driver ? Since we pass in the JDBC URL the database name, I think the driver should take care about it.
If we succeed to fix all this methods we will have a database design tool compatible with OrientDb ( the tool is dbschema.com ).

@robfrank
Copy link
Contributor

robfrank commented Jan 26, 2017

Which orientDB version? Can you provide a snippet of code or better a test case that fails?

@robfrank robfrank self-assigned this Jan 26, 2017
@dprutean
Copy link
Author

dprutean commented Jan 26, 2017 via email

@lvca lvca added the bug label Jan 27, 2017
@robfrank
Copy link
Contributor

Ok, I guess you pass the resultSet and or the connection from one thread to another, e.g. from "backend thread" to the view. I'm improving this kind of use, I'll notify you when I've got something ready

@robfrank
Copy link
Contributor

I've done some improvement on thread safety. You can download the latest 2.2.16-SNAPSHOT jar and try it instead of the 2.2.15 you have.
I hope it could work fine. Let me know please

@robfrank robfrank added this to the 2.2.x (next hotfix) milestone Jan 30, 2017
@dprutean
Copy link
Author

dprutean commented Jan 30, 2017 via email

@robfrank
Copy link
Contributor

@dprutean did you have time to test the SNAPSHOT?

@dprutean
Copy link
Author

dprutean commented Jan 31, 2017 via email

@robfrank
Copy link
Contributor

We still get this error in one place, but generally looks better

which place?

About the rest, I'll check all the calls. Note that some of these calls sometimes are hard to map to the inner OrientDB data model. I guess you had the same kind of problem with other noSQLs

@robfrank
Copy link
Contributor

robfrank commented Feb 3, 2017

Could you share with me a snippet of code that shows errors and wrong metadata?
Because in my tests the TABLE_NAME attribute is filled with the class name in OrientDB.
Thanks in advance

@robfrank
Copy link
Contributor

robfrank commented Feb 5, 2017

hi, the new JDBC jar contains a fix for the table name:

https://oss.sonatype.org/content/repositories/snapshots/com/orientechnologies/orientdb-jdbc/2.2.17-SNAPSHOT/orientdb-jdbc-2.2.17-20170205.125333-4-all.jar

please test it and report here any problems.

robfrank added a commit that referenced this issue Feb 6, 2017
fixes indexes metadata

refs #7126
@robfrank
Copy link
Contributor

robfrank commented Feb 6, 2017

I just updated columns and indexes metadata mapping.
please refer to the latest available snapshot:

https://oss.sonatype.org/content/repositories/snapshots/com/orientechnologies/orientdb-jdbc/2.2.17-SNAPSHOT/

robfrank added a commit that referenced this issue Feb 7, 2017
@dprutean
Copy link
Author

dprutean commented Feb 8, 2017

For some reason I had to download again the latest version of OrientDb. Now I got an connection exception which I list below

Few more remarks beside this:

  • Please use a default configuration with 250M or so, not 4G. I want to test your product, the notebook where I test has only 4G, I get memory exceptions, have to edit server.bat. Even there are few memory settings, MaxDirectMemorySize and HeapSize, which makes the stuff more confusing. It would be better to have a single global memory setting or at least put the first parameter in the file the most important setting. Make the product robust to run for the first time, when it will go in production each team will check how to increase the memory.

  • Name your sample database 'SampleDb' or so, not 'GracefulDeadConcerts'. Is hard to remember this name and not intuitive.

com.orientechnologies.orient.enterprise.channel.binary.OResponseProcessingException: Exception during response processing
at com.orientechnologies.orient.client.binary.OChannelBinaryAsynchClient.throwSerializedException(OChannelBinaryAsynchClient.java:458)
at com.orientechnologies.orient.client.binary.OChannelBinaryAsynchClient.handleStatus(OChannelBinaryAsynchClient.java:393)
at com.orientechnologies.orient.client.binary.OChannelBinaryAsynchClient.beginResponse(OChannelBinaryAsynchClient.java:275)
at com.orientechnologies.orient.client.binary.OChannelBinaryAsynchClient.beginResponse(OChannelBinaryAsynchClient.java:167)
at com.orientechnologies.orient.client.remote.OStorageRemote.openRemoteDatabase(OStorageRemote.java:1862)
at com.orientechnologies.orient.client.remote.OStorageRemote.openRemoteDatabase(OStorageRemote.java:1897)
at com.orientechnologies.orient.client.remote.OStorageRemote.openRemoteDatabase(OStorageRemote.java:1836)
at com.orientechnologies.orient.client.remote.OStorageRemote.open(OStorageRemote.java:336)
at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.open(ODatabaseDocumentTx.java:263)
at com.orientechnologies.orient.jdbc.OrientJdbcConnection.(OrientJdbcConnection.java:80)
at com.orientechnologies.orient.jdbc.OrientJdbcDriver.connect(OrientJdbcDriver.java:62)
at com.wisecoders.dbs.rdbms.connect.a.a.d.r(SourceFile:57)
at com.wisecoders.dbs.rdbms.connect.a.a.d.a(SourceFile:86)
at com.wisecoders.dbs.rdbms.RdbImport.listSchemas(SourceFile:126)
at com.wisecoders.dbs.layout.ui.editors.n.a(SourceFile:46)
at com.wisecoders.dbs.layout.ui.editors.n.doInBackground(SourceFile:18)
...

@robfrank
Copy link
Contributor

robfrank commented Feb 9, 2017

Which versions are you using?
I guess:

  • OrientDb server 2.2.16
  • OrientDB JDBC 2.2.17-SNAPSHOT

About demo database, we are working on a new demo db for 3.0.x, that is still in development. We don't know yet if the new demo db will be backported to 2.2.x

@robfrank robfrank modified the milestones: 2.2.x (next hotfix), 2.2.18 Apr 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

4 participants