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 #57457] Fri, 24 July 2009 13:59 Go to next message
Vincent Zurczak is currently offline Vincent ZurczakFriend
Messages: 149
Registered: July 2009
Senior Member

Hi.

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(MySqlTableLoader.java:155)
> at org.eclipse.datatools.enablement.mysql.catalog.loaders.MySql TableLoader.loadTables(MySqlTableLoader.java:82)
> at org.eclipse.datatools.connectivity.sqm.core.rte.jdbc.JDBCSch ema.loadTables(JDBCSchema.java:128)
> at org.eclipse.datatools.connectivity.sqm.core.rte.jdbc.JDBCSch ema.getTables(JDBCSchema.java:89)
> at org.eclipse.datatools.modelbase.sql.schema.impl.SchemaImpl.e Get(SchemaImpl.java:597)
> at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjec tImpl.java:1013)
> at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjec tImpl.java:1005)
> at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjec tImpl.java:1000)
> at org.eclipse.datatools.connectivity.sqm.server.internal.ui.ex plorer.providers.content.layout.vnode.ServerExplorerVNodeCon tentProviderNav.getSchemaChildren(ServerExplorerVNodeContent ProviderNav.java:250)
> at org.eclipse.datatools.connectivity.sqm.server.internal.ui.ex plorer.providers.content.layout.vnode.ServerExplorerVNodeCon tentProviderNav.displayTableNodeChildren(ServerExplorerVNode ContentProviderNav.java:187)
> at org.eclipse.datatools.connectivity.sqm.server.internal.ui.ex plorer.providers.content.layout.AbstractOnDemandContentProvi derNav.getChildren(AbstractOnDemandContentProviderNav.java:1 73)
> at org.eclipse.datatools.connectivity.sqm.server.internal.ui.ex plorer.providers.content.layout.AbstractOnDemandContentProvi derNav.getChildren(AbstractOnDemandContentProviderNav.java:2 43)
> at org.eclipse.datatools.connectivity.sqm.server.internal.ui.ex plorer.providers.content.layout.AbstractLayoutProviderNav.ge tChildren(AbstractLayoutProviderNav.java:85)
> at org.eclipse.datatools.connectivity.sqm.server.internal.ui.ex plorer.providers.content.impl.ServerExplorerContentProviderN av.load(ServerExplorerContentProviderNav.java:153)
> at org.eclipse.datatools.connectivity.sqm.server.internal.ui.ex plorer.loading.LoadingJob.run(LoadingJob.java:43)
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
> Caused by: java.lang.NullPointerException
> at org.eclipse.datatools.enablement.mysql.catalog.loaders.MySql TableLoader.createResultSet(MySqlTableLoader.java:145)
> ... 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.


Regards,

Vincent.


--
Vincent Zurczak
EBM WebSourcing
Re: Error while trying to get tables from a MySQL database [message #257188 is a reply to message #57457] Mon, 27 July 2009 21:23 Go to previous message
Brian Fitzpatrick is currently offline Brian FitzpatrickFriend
Messages: 500
Registered: July 2009
Senior Member
Vincent Zurczak wrote:
> 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.

Hi Vincent...

Please log a bugzilla and we'll try and get this resolved for 1.7.1.

--Fitz
Re: Error while trying to get tables from a MySQL database [message #596149 is a reply to message #57457] Mon, 27 July 2009 21:23 Go to previous message
Brian Fitzpatrick is currently offline Brian FitzpatrickFriend
Messages: 500
Registered: July 2009
Senior Member
Vincent Zurczak wrote:
> 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.

Hi Vincent...

Please log a bugzilla and we'll try and get this resolved for 1.7.1.

--Fitz
Previous Topic:Error while trying to get UDF, Stored Proc from a Oracle database(10g)
Next Topic:Error while trying to get UDF, Stored Proc from a Oracle database(10g)
Goto Forum:
  


Current Time: Tue Mar 19 07:06:52 GMT 2024

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

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

Back to the top