Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » DTP » Error while trying to get tables from a MySQL database
Error while trying to get tables from a MySQL database [message #596122] Fri, 24 July 2009 13:59
Vincent Zurczak is currently offline Vincent ZurczakFriend
Messages: 149
Registered: July 2009
Senior Member


I encountered an error while trying to get the tables from a MySQL
database. More precisely, when I select the "Tables" folder of my MySQL
connection in the Data Source Explorer.

I created a MySQL profile connection, and I tested it with two versions
of a MySQL JDBC driver (mysql-connector-5.0.8 and 5.1.7). I got the same
error in the two cases. The database I'm using for tests was also used
with Talend (so, I know the problem is not on the database - and Talend
is not running at the same time).

I assume the error could be in the way I defined my connection (I don't
think it is a bug - I checked the DTP bugzilla and did not find it).

The exception I got is:

> java.sql.SQLException: An exception occurred invoking java.sql.DatabaseMetaData.getTables().
> at org.eclipse.datatools.enablement.mysql.catalog.loaders.MySql TableLoader.createResultSet(
> at org.eclipse.datatools.enablement.mysql.catalog.loaders.MySql TableLoader.loadTables(
> at org.eclipse.datatools.connectivity.sqm.core.rte.jdbc.JDBCSch ema.loadTables(
> at org.eclipse.datatools.connectivity.sqm.core.rte.jdbc.JDBCSch ema.getTables(
> at org.eclipse.datatools.modelbase.sql.schema.impl.SchemaImpl.e Get(
> at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjec
> at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjec
> at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjec
> at org.eclipse.datatools.connectivity.sqm.server.internal.ui.ex plorer.providers.content.layout.vnode.ServerExplorerVNodeCon tentProviderNav.getSchemaChildren(ServerExplorerVNodeContent
> at org.eclipse.datatools.connectivity.sqm.server.internal.ui.ex plorer.providers.content.layout.vnode.ServerExplorerVNodeCon tentProviderNav.displayTableNodeChildren(ServerExplorerVNode
> at org.eclipse.datatools.connectivity.sqm.server.internal.ui.ex plorer.providers.content.layout.AbstractOnDemandContentProvi derNav.getChildren( 73)
> at org.eclipse.datatools.connectivity.sqm.server.internal.ui.ex plorer.providers.content.layout.AbstractOnDemandContentProvi derNav.getChildren( 43)
> at org.eclipse.datatools.connectivity.sqm.server.internal.ui.ex tChildren(
> at org.eclipse.datatools.connectivity.sqm.server.internal.ui.ex plorer.providers.content.impl.ServerExplorerContentProviderN av.load(
> at org.eclipse.datatools.connectivity.sqm.server.internal.ui.ex
> at
> Caused by: java.lang.NullPointerException
> at org.eclipse.datatools.enablement.mysql.catalog.loaders.MySql TableLoader.createResultSet(
> ... 15 more

I put some breakpoints and I found that the exception occurs in
MySqlTableLoader, in the following lines:

> String catalogName = getCatalogObject().getConnection().getCatalog();
> if(catalogName == null || catalogName.trim().length() == 0){
> getCatalogObject().getConnection().setCatalog(getSchema().ge tCatalog().getName());
> }

More exactly, the "getSchema().getCatalog()" returns "null" (catalogName
= '').

Does anyone know why this error is thrown?
Are there some properties to define or limitations on the JDBC drivers
we can use with DTP? I precise that this database and these drivers were
working with DTP on Ganymede.



Vincent Zurczak
EBM WebSourcing
Previous Topic:Sharing embedded Derby with other plugins
Next Topic:Error while trying to get UDF, Stored Proc from a Oracle database(10g)
Goto Forum:

Current Time: Sat May 15 03:16:41 GMT 2021

Powered by FUDForum. Page generated in 0.01630 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top