[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.technology.dali] Re: Generate Entities from Tables not working

Bill,

I'm sorry you're suffering through this; but Dali's interface with the DTP model has been a constant challenge for us. The challenge is amplified by the need to test on all the various database servers and the various DTP "adapters" for those databases. Unfortunately, we are unable to test across *all* the various permutations. Our problem is there is no "standard" method for interacting with the contents of the DTP metadata model. Depending on the database and the specific adapter, some models have catalogs, some models have schemas, and some models have both. This is reasonable for a UI (like the Data Source Explorer) where the user simply pokes around the tree until s/he finds something useful. This is not so reasonable when you have to navigate the model programmatically and find things in expected places. On top of that, Dali has to determine the "default" catalog and/or schema for the particular database. Not pretty.

Currently, Dali has a number of database-specific adapters that allow us to know what to expect from the various databases. These adapters are keyed by the vendor name returned by the DTP model. Currently, we have 3 nearly identical adapters for DB2 with the following names:
DB2 UDB
DB2 UDB iSeries
DB2 UDB zSeries
If the DTP model does not match any of these names, we use a "default" adapter
that expects the DTP model to have catalogs (which, I think, DB2 does not have; but the DTP metadata might...). This might be the cause of your problems, since Dali would be looking for a "default" catalog (a catalog with the same name as the user name) and, not finding it, not be able to find any schemas in the non-existent catalog.


If you would like to help us out, you could debug the Dali code and determine what Dali has screwed up for your particular configuration. :-)

Also, hopefully, we will fix, or allow workarounds to, some of these sorts of problems when we add UI support for catalogs[1].

Brian Vosburgh

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=266535

Bill Blalock wrote:
Neil Hauge wrote:

Bill,

It sounds like you need to get the DB2 Enablement plugins from DTP, which you could do via the Ganymede update site. This should bring back the DB2 options in the connection wizard. I'm not sure if this will fix your problem, but we should probably start there.

Neil

Thanks for your time Neil!

No joy -- In a nut shell I loaded Dali R-2.1.11 in a fresh Eclipse. The DB2 enhancements are available but Dali can't run the Build entity from Table nor validate against the data base connection.

See the gorry details below.


get the DB2 Enablement plugins from DTP

I tried that and ended up disabling JPA in my working Eclipse. No errors in log but it no longer has a JPA perspective. Okay. Hmmm. Tried something else... This post mentioned the R-2.1.11 so I built a new Eclipse following the directions on http://download.eclipse.org/webtools/downloads/drops/R2.1/R-2.1.1-20090226062131/



Since this is all latest and greated I downloaded Eclipselink 1.1RC

I created a new workspace.

This one has a JPA perspective and it had the DB2 options in connection wizard. Hurray!!

But I get the same behavior of the JPA Tools create Entity from Tables is not showing any schema.

Boo!!!!!!!!!!!!

I manually built Entities.

After I build the Entites JPA has a bunch of errors when the data base is connected, Schema cannot be resolved and Column cannot be resolved.

I can disconnect the database, compile and run the tests successfully with these Entites. The Entities and persistence.xml works.

This isn't new for for R-2.1.11, I saw same thing before. I am assuming these error are part of the same symptom, JPA being unable to get to the databases to read the schemas and validate the tables.

Thanks
Bill Blalock