Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dali » Generate Entities from Tables not working
Generate Entities from Tables not working [message #435461] Fri, 13 February 2009 16:02 Go to next message
Karl Stenerud is currently offline Karl Stenerud
Messages: 2
Registered: July 2009
Junior Member
I've just installed Dali 2.1 in eclipse 3.4.1 and I can't get the
"Generate entities from tables" function to work.

I have a database defined (I can see it in the Data Source Explorer, and I
can browse through the catalogs, schemas, tables etc) but when I try to
run the entity generator tool, it brings up a database connection dialog.

When I select my connection, it won't let me select a schema (it tells me
I must have an active connection to select a schema, but the connection
button is greyed out).
If I go back to the data source explorer and disconnect from the database,
the "connect" button will be selectable, but when I connect, I still can't
select a schema.

Dali is obviously able to see the schema because I can browse to it from
the data source explorer, so why can't the entity generator tool see it?
Re: Generate Entities from Tables not working [message #435463 is a reply to message #435461] Mon, 16 February 2009 14:55 Go to previous messageGo to next message
Neil Hauge is currently offline Neil Hauge
Messages: 469
Registered: July 2009
Senior Member
Karl,

Are you using PostgreSQL? If so, I think you may have run into bug 259534
- https://bugs.eclipse.org/bugs/show_bug.cgi?id=259534.

We have a fix for this coming out soon in 2.1 maintenance. There isn't a
good workaround for this issue, so rolling back to Dali 2.0.3 and waiting
for 2.1.1 might be your best option.

Neil



Karl Stenerud wrote:

> I've just installed Dali 2.1 in eclipse 3.4.1 and I can't get the
> "Generate entities from tables" function to work.

> I have a database defined (I can see it in the Data Source Explorer, and I
> can browse through the catalogs, schemas, tables etc) but when I try to
> run the entity generator tool, it brings up a database connection dialog.

> When I select my connection, it won't let me select a schema (it tells me
> I must have an active connection to select a schema, but the connection
> button is greyed out).
> If I go back to the data source explorer and disconnect from the database,
> the "connect" button will be selectable, but when I connect, I still can't
> select a schema.

> Dali is obviously able to see the schema because I can browse to it from
> the data source explorer, so why can't the entity generator tool see it?
Re: Generate Entities from Tables not working [message #435468 is a reply to message #435463] Tue, 10 March 2009 21:02 Go to previous messageGo to next message
Bill Blalock is currently offline Bill Blalock
Messages: 118
Registered: July 2009
Location: Alabama
Senior Member
I seem to be having a similar problem with DB2 for iSeries. The symptoms
match what Karl Stenerud described.

DB2 (any flavor) is no longer listed in "Connect Profile Types" list so I
used "Generic JDBC" and specified the JTOpen as400.jar file.

In the Data Source Explorer I can drill down through the system to the
schema I want. Everything works there.

Generate Entity from Table won't work because the schema's aren't listed.
If I could I'd override with the specific schema that I want but that
won't work either.

I looked over bug ID 259534. The problem could be is that i5 schemas
reported are the i5 "library names." An i5 "library name" allows the
characters @, #, $ as well as underscore. These non-standard characters
are shown in in the "data soure explorer" list of schemas.

I'd appreciate any suggestion to work around this.

So far I haven't come up with a any properties to specify to JDBC to limit
the schema which generate entities see. The "default schema filter" works
fine for the data source explorer but doesn't help the problem with
"generate entities".

Thanks all

Neil Hauge wrote:

> Karl,

> Are you using PostgreSQL? If so, I think you may have run into bug 259534
> - https://bugs.eclipse.org/bugs/show_bug.cgi?id=259534.

> We have a fix for this coming out soon in 2.1 maintenance. There isn't a
> good workaround for this issue, so rolling back to Dali 2.0.3 and waiting
> for 2.1.1 might be your best option.

> Neil



> Karl Stenerud wrote:

>> I've just installed Dali 2.1 in eclipse 3.4.1 and I can't get the
>> "Generate entities from tables" function to work.

>> I have a database defined (I can see it in the Data Source Explorer, and I
>> can browse through the catalogs, schemas, tables etc) but when I try to
>> run the entity generator tool, it brings up a database connection dialog.

>> When I select my connection, it won't let me select a schema (it tells me
>> I must have an active connection to select a schema, but the connection
>> button is greyed out).
>> If I go back to the data source explorer and disconnect from the database,
>> the "connect" button will be selectable, but when I connect, I still can't
>> select a schema.

>> Dali is obviously able to see the schema because I can browse to it from
>> the data source explorer, so why can't the entity generator tool see it?
Re: Generate Entities from Tables not working [message #435469 is a reply to message #435468] Wed, 11 March 2009 18:07 Go to previous messageGo to next message
Neil Hauge is currently offline Neil Hauge
Messages: 469
Registered: July 2009
Senior Member
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


Bill Blalock wrote:

> I seem to be having a similar problem with DB2 for iSeries. The symptoms
> match what Karl Stenerud described.

> DB2 (any flavor) is no longer listed in "Connect Profile Types" list so I
> used "Generic JDBC" and specified the JTOpen as400.jar file.

> In the Data Source Explorer I can drill down through the system to the
> schema I want. Everything works there.

> Generate Entity from Table won't work because the schema's aren't listed.
> If I could I'd override with the specific schema that I want but that
> won't work either.

> I looked over bug ID 259534. The problem could be is that i5 schemas
> reported are the i5 "library names." An i5 "library name" allows the
> characters @, #, $ as well as underscore. These non-standard characters
> are shown in in the "data soure explorer" list of schemas.

> I'd appreciate any suggestion to work around this.

> So far I haven't come up with a any properties to specify to JDBC to limit
> the schema which generate entities see. The "default schema filter" works
> fine for the data source explorer but doesn't help the problem with
> "generate entities".

> Thanks all

> Neil Hauge wrote:

>> Karl,

>> Are you using PostgreSQL? If so, I think you may have run into bug 259534
>> - https://bugs.eclipse.org/bugs/show_bug.cgi?id=259534.

>> We have a fix for this coming out soon in 2.1 maintenance. There isn't a
>> good workaround for this issue, so rolling back to Dali 2.0.3 and waiting
>> for 2.1.1 might be your best option.

>> Neil



>> Karl Stenerud wrote:

>>> I've just installed Dali 2.1 in eclipse 3.4.1 and I can't get the
>>> "Generate entities from tables" function to work.

>>> I have a database defined (I can see it in the Data Source Explorer, and I
>>> can browse through the catalogs, schemas, tables etc) but when I try to
>>> run the entity generator tool, it brings up a database connection dialog.

>>> When I select my connection, it won't let me select a schema (it tells me
>>> I must have an active connection to select a schema, but the connection
>>> button is greyed out).
>>> If I go back to the data source explorer and disconnect from the database,
>>> the "connect" button will be selectable, but when I connect, I still can't
>>> select a schema.

>>> Dali is obviously able to see the schema because I can browse to it from
>>> the data source explorer, so why can't the entity generator tool see it?
Re: Generate Entities from Tables not working [message #435470 is a reply to message #435469] Fri, 13 March 2009 18:58 Go to previous messageGo to next message
Bill Blalock is currently offline Bill Blalock
Messages: 118
Registered: July 2009
Location: Alabama
Senior Member
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
Re: Generate Entities from Tables not working [message #435473 is a reply to message #435470] Mon, 16 March 2009 23:05 Go to previous messageGo to next message
Brian Vosburgh is currently offline Brian Vosburgh
Messages: 132
Registered: July 2009
Senior Member
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
>
>
>
>
>
>
Re: Generate Entities from Tables not working [message #435474 is a reply to message #435473] Tue, 17 March 2009 18:30 Go to previous messageGo to next message
Bill Blalock is currently offline Bill Blalock
Messages: 118
Registered: July 2009
Location: Alabama
Senior Member
Thanks for your informative reply Brian:

> 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

DB2 UDB iSeries -- that is me!!!

> If the DTP model does not match any of these names, we use a "default"
adapter....

That may be the problem, the DTP model my iSeries (i5 as it is now called,
ver 5, release 4 of the OS) may not match what Dali expects for DB2 UDB
iSeries and falls through to the default.

> 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. :-)

I'd be happy to help out! I have extened the eclipselink DB2Platform
class for the iSeries and contributed it. Tell me what to do. I can also
test against an IBM iSeries V5R4 for you.

I set up a separate Eclipse with the latest for these test, see previous
post.

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

Is there anyway to tell Dali "hey use this adapter" instead of letting it
guess? Perhaps a property in persistence.xml?

I have to specify the database to eclipselink when I am not using
Dali(eclipselink.target-database) so coding a property isn't a hardship.

Regards
Bill Blalock

PS When opening persistence.xml with the database connection open I'll
get errors. No error when the connection is closed.

This is the stack trace in the detail view which is opened instead of the
persistence.xml editor. I've included them incase they are related (first
set of messages are from DTPDatabaseWrappers you mentioned).

java.lang.UnsupportedOperationException
at
org.eclipse.jpt.db.internal.DTPDatabaseWrapper$Vendor.getDef aultCatalog(DTPDatabaseWrapper.java:475)
at
org.eclipse.jpt.db.internal.DTPDatabaseWrapper.buildDefaultC atalog(DTPDatabaseWrapper.java:257)
at
org.eclipse.jpt.db.internal.DTPDatabaseWrapper.getDefaultCat alog(DTPDatabaseWrapper.java:251)
at
org.eclipse.jpt.db.internal.DTPDatabaseWrapper.getDefaultCat alog(DTPDatabaseWrapper.java:1)
at
org.eclipse.jpt.core.internal.GenericJpaProject.getDatabaseD efaultDbCatalog(GenericJpaProject.java:283)
at
org.eclipse.jpt.core.internal.GenericJpaProject.getDatabaseD efaultCatalog(GenericJpaProject.java:277)
at
org.eclipse.jpt.core.internal.GenericJpaProject.getDefaultCa talog(GenericJpaProject.java:273)
at
org.eclipse.jpt.core.internal.context.persistence.AbstractPe rsistenceUnit.buildDefaultCatalog(AbstractPersistenceUnit.ja va:1056)
at
org.eclipse.jpt.core.internal.context.persistence.AbstractPe rsistenceUnit.initializePersistenceUnitDefaults(AbstractPers istenceUnit.java:776)
at
org.eclipse.jpt.core.internal.context.persistence.AbstractPe rsistenceUnit.initialize(AbstractPersistenceUnit.java:735)
at
org.eclipse.jpt.eclipselink.core.internal.context.persistenc e.EclipseLinkPersistenceUnit. <init>(EclipseLinkPersistenceUnit.java:78)
at
org.eclipse.jpt.eclipselink.core.internal.EclipseLinkJpaFact ory.buildPersistenceUnit(EclipseLinkJpaFactory.java:129)
at
org.eclipse.jpt.core.internal.context.persistence.GenericPer sistence.createPersistenceUnit(GenericPersistence.java:155)
at
org.eclipse.jpt.core.internal.context.persistence.GenericPer sistence.initializePersistenceUnits(GenericPersistence.java: 128)
at
org.eclipse.jpt.core.internal.context.persistence.GenericPer sistence.initialize(GenericPersistence.java:122)
at
org.eclipse.jpt.core.internal.context.persistence.GenericPer sistence. <init>(GenericPersistence.java:43)
at
org.eclipse.jpt.core.internal.platform.GenericJpaFactory.bui ldPersistence(GenericJpaFactory.java:303)
at
org.eclipse.jpt.core.internal.context.persistence.GenericPer sistenceXml.buildPersistence(GenericPersistenceXml.java:161)
at
org.eclipse.jpt.core.internal.context.persistence.GenericPer sistenceXml.initialize(GenericPersistenceXml.java:120)
at
org.eclipse.jpt.core.internal.context.persistence.GenericPer sistenceXml. <init>(GenericPersistenceXml.java:44)
at
org.eclipse.jpt.core.internal.platform.GenericJpaFactory.bui ldPersistenceXml(GenericJpaFactory.java:299)
at
org.eclipse.jpt.core.internal.context.GenericRootContextNode .buildPersistenceXml(GenericRootContextNode.java:178)
at
org.eclipse.jpt.core.internal.context.GenericRootContextNode . <init>(GenericRootContextNode.java:60)
at
org.eclipse.jpt.core.internal.platform.GenericJpaFactory.bui ldRootContextNode(GenericJpaFactory.java:282)
at
org.eclipse.jpt.core.internal.GenericJpaProject.buildRootCon textNode(GenericJpaProject.java:200)
at
org.eclipse.jpt.core.internal.GenericJpaProject.<init>(GenericJpaProject.java:159)
at
org.eclipse.jpt.core.internal.platform.GenericJpaFactory.bui ldJpaProject(GenericJpaFactory.java:259)
at
org.eclipse.jpt.core.internal.GenericJpaModel$DefaultJpaProj ectHolder.buildJpaProject(GenericJpaModel.java:417)
at
org.eclipse.jpt.core.internal.GenericJpaModel$DefaultJpaProj ectHolder.jpaProject(GenericJpaModel.java:405)
at
org.eclipse.jpt.core.internal.GenericJpaModel.getJpaProject( GenericJpaModel.java:75)
at
org.eclipse.jpt.core.internal.JpaModelManager.getJpaProject( JpaModelManager.java:178)
at
org.eclipse.jpt.core.JptCorePlugin.getJpaProject(JptCorePlug in.java:156)
at
org.eclipse.jpt.ui.internal.editors.PersistenceEditor.jpaPro ject(PersistenceEditor.java:303)
at
org.eclipse.jpt.ui.internal.editors.PersistenceEditor.addPer sistenceUnitPages(PersistenceEditor.java:119)
at
org.eclipse.jpt.ui.internal.editors.PersistenceEditor.addPag es(PersistenceEditor.java:109)
at org.eclipse.ui.forms.editor.FormEditor.createPages(FormEdito r.java:146)
at
org.eclipse.ui.part.MultiPageEditorPart.createPartControl(Mu ltiPageEditorPart.java:310)
at
org.eclipse.ui.internal.EditorReference.createPartHelper(Edi torReference.java:661)
at
org.eclipse.ui.internal.EditorReference.createPart(EditorRef erence.java:428)
at
org.eclipse.ui.internal.WorkbenchPartReference.getPart(Workb enchPartReference.java:594)
at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:30 6)
at
org.eclipse.ui.internal.presentations.PresentablePart.setVis ible(PresentablePart.java:180)
at
org.eclipse.ui.internal.presentations.util.PresentablePartFo lder.select(PresentablePartFolder.java:270)
at
org.eclipse.ui.internal.presentations.util.LeftToRightTabOrd er.select(LeftToRightTabOrder.java:65)
at
org.eclipse.ui.internal.presentations.util.TabbedStackPresen tation.selectPart(TabbedStackPresentation.java:473)
at
org.eclipse.ui.internal.PartStack.refreshPresentationSelecti on(PartStack.java:1256)
at org.eclipse.ui.internal.PartStack.setSelection(PartStack.jav a:1209)
at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:16 08)
at org.eclipse.ui.internal.PartStack.add(PartStack.java:499)
at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:103 )
at org.eclipse.ui.internal.PartStack.add(PartStack.java:485)
at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:112 )
at
org.eclipse.ui.internal.EditorSashContainer.addEditor(Editor SashContainer.java:63)
at
org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorA reaHelper.java:217)
at
org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAre aHelper.java:207)
at
org.eclipse.ui.internal.EditorManager.createEditorTab(Editor Manager.java:779)
at
org.eclipse.ui.internal.EditorManager.openEditorFromDescript or(EditorManager.java:678)
at
org.eclipse.ui.internal.EditorManager.openEditor(EditorManag er.java:639)
at
org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched( WorkbenchPage.java:2817)
at
org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(Workben chPage.java:2729)
at
org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPag e.java:2721)
at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.j ava:2673)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:70)
at
org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2668)
at
org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2652)
at
org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2643)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:646)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:605)
at
org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInE ditor(EditorUtility.java:318)
at
org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInE ditor(EditorUtility.java:160)
at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:22 8)
at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:20 7)
at
org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchR un(SelectionDispatchAction.java:274)
at
org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(Selec tionDispatchAction.java:250)
at
org.eclipse.jdt.internal.ui.navigator.OpenAndExpand.run(Open AndExpand.java:50)
at org.eclipse.ui.actions.RetargetAction.run(RetargetAction.jav a:221)
at
org.eclipse.ui.internal.navigator.CommonNavigatorManager$3.o pen(CommonNavigatorManager.java:184)
at
org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredV iewer.java:820)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:880)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:17 5)
at
org.eclipse.jface.viewers.StructuredViewer.fireOpen(Structur edViewer.java:818)
at
org.eclipse.jface.viewers.StructuredViewer.handleOpen(Struct uredViewer.java:1079)
at org.eclipse.ui.navigator.CommonViewer.handleOpen(CommonViewe r.java:372)
at
org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(Stru cturedViewer.java:1183)
at
org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrate gy.java:263)
at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.ja va:257)
at
org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrate gy.java:297)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3823)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3422)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2384)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2348)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 00)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:495)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:288)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:490)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:113)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:193)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:386)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
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.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
Re: Generate Entities from Tables not working [message #435498 is a reply to message #435474] Wed, 18 March 2009 17:25 Go to previous messageGo to next message
Brian Vosburgh is currently offline Brian Vosburgh
Messages: 132
Registered: July 2009
Senior Member
Bill,

the Dali code surrounding all this DTP stuff has changed a lot over the last few
months; so you might encounter different problems (or maybe no problems at all
:) ) if you try out a more current release (e.g. WTP 3.1 M6 is set to be
released soon).

Anyway, if you would like to research what Dali is doing with your DB2
connection, you can look at whether we have a "vendor" defined for it by
debugging the call to VendorRepository.getVendor(String). This will tell you (1)
what your DTP DB2 "adapter" says its name is and (2) whether Dali has a vendor
defined with a matching name.

Are you using a vanilla Eclipse JEE workspace? Or are you using additional
plug-ins? Do these plug-ins provide the DB2 adapter for DTP? If you are
interested in working on a DB2 interface, it would be more of an extension of
DTP than an extension of Dali. Dali simply uses the metadata provided by the DTP
metadata model; sometimes successfully, sometimes not. :-)

Brian Vosburgh

Bill Blalock wrote:
> Thanks for your informative reply Brian:
>
>> 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
>
> DB2 UDB iSeries -- that is me!!!
>
>> If the DTP model does not match any of these names, we use a "default"
> adapter....
>
> That may be the problem, the DTP model my iSeries (i5 as it is now
> called, ver 5, release 4 of the OS) may not match what Dali expects for
> DB2 UDB iSeries and falls through to the default.
>
>> 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. :-)
>
> I'd be happy to help out! I have extened the eclipselink DB2Platform
> class for the iSeries and contributed it. Tell me what to do. I can
> also test against an IBM iSeries V5R4 for you.
>
> I set up a separate Eclipse with the latest for these test, see previous
> post.
>> Also, hopefully, we will fix, or allow workarounds to, some of these
>> sorts
> of
>> problems when we add UI support for catalogs[1].
>
> Is there anyway to tell Dali "hey use this adapter" instead of letting
> it guess? Perhaps a property in persistence.xml?
>
> I have to specify the database to eclipselink when I am not using
> Dali(eclipselink.target-database) so coding a property isn't a hardship.
>
> Regards
> Bill Blalock
>
> PS When opening persistence.xml with the database connection open I'll
> get errors. No error when the connection is closed.
>
> This is the stack trace in the detail view which is opened instead of
> the persistence.xml editor. I've included them incase they are related
> (first set of messages are from DTPDatabaseWrappers you mentioned).
>
> java.lang.UnsupportedOperationException
> at
> org.eclipse.jpt.db.internal.DTPDatabaseWrapper$Vendor.getDef aultCatalog(DTPDatabaseWrapper.java:475)
>
> at
> org.eclipse.jpt.db.internal.DTPDatabaseWrapper.buildDefaultC atalog(DTPDatabaseWrapper.java:257)
>
> at
> org.eclipse.jpt.db.internal.DTPDatabaseWrapper.getDefaultCat alog(DTPDatabaseWrapper.java:251)
>
> at
> org.eclipse.jpt.db.internal.DTPDatabaseWrapper.getDefaultCat alog(DTPDatabaseWrapper.java:1)
>
> at
> org.eclipse.jpt.core.internal.GenericJpaProject.getDatabaseD efaultDbCatalog(GenericJpaProject.java:283)
>
> at
> org.eclipse.jpt.core.internal.GenericJpaProject.getDatabaseD efaultCatalog(GenericJpaProject.java:277)
>
> at
> org.eclipse.jpt.core.internal.GenericJpaProject.getDefaultCa talog(GenericJpaProject.java:273)
>
> at
> org.eclipse.jpt.core.internal.context.persistence.AbstractPe rsistenceUnit.buildDefaultCatalog(AbstractPersistenceUnit.ja va:1056)
>
> at
> org.eclipse.jpt.core.internal.context.persistence.AbstractPe rsistenceUnit.initializePersistenceUnitDefaults(AbstractPers istenceUnit.java:776)
>
> at
> org.eclipse.jpt.core.internal.context.persistence.AbstractPe rsistenceUnit.initialize(AbstractPersistenceUnit.java:735)
>
> at
> org.eclipse.jpt.eclipselink.core.internal.context.persistenc e.EclipseLinkPersistenceUnit. <init>(EclipseLinkPersistenceUnit.java:78)
>
> at
> org.eclipse.jpt.eclipselink.core.internal.EclipseLinkJpaFact ory.buildPersistenceUnit(EclipseLinkJpaFactory.java:129)
>
> at
> org.eclipse.jpt.core.internal.context.persistence.GenericPer sistence.createPersistenceUnit(GenericPersistence.java:155)
>
> at
> org.eclipse.jpt.core.internal.context.persistence.GenericPer sistence.initializePersistenceUnits(GenericPersistence.java: 128)
>
> at
> org.eclipse.jpt.core.internal.context.persistence.GenericPer sistence.initialize(GenericPersistence.java:122)
>
> at
> org.eclipse.jpt.core.internal.context.persistence.GenericPer sistence. <init>(GenericPersistence.java:43)
>
> at
> org.eclipse.jpt.core.internal.platform.GenericJpaFactory.bui ldPersistence(GenericJpaFactory.java:303)
>
> at
> org.eclipse.jpt.core.internal.context.persistence.GenericPer sistenceXml.buildPersistence(GenericPersistenceXml.java:161)
>
> at
> org.eclipse.jpt.core.internal.context.persistence.GenericPer sistenceXml.initialize(GenericPersistenceXml.java:120)
>
> at
> org.eclipse.jpt.core.internal.context.persistence.GenericPer sistenceXml. <init>(GenericPersistenceXml.java:44)
>
> at
> org.eclipse.jpt.core.internal.platform.GenericJpaFactory.bui ldPersistenceXml(GenericJpaFactory.java:299)
>
> at
> org.eclipse.jpt.core.internal.context.GenericRootContextNode .buildPersistenceXml(GenericRootContextNode.java:178)
>
> at
> org.eclipse.jpt.core.internal.context.GenericRootContextNode . <init>(GenericRootContextNode.java:60)
>
> at
> org.eclipse.jpt.core.internal.platform.GenericJpaFactory.bui ldRootContextNode(GenericJpaFactory.java:282)
>
> at
> org.eclipse.jpt.core.internal.GenericJpaProject.buildRootCon textNode(GenericJpaProject.java:200)
>
> at
> org.eclipse.jpt.core.internal.GenericJpaProject.<init>(GenericJpaProject.java:159)
>
> at
> org.eclipse.jpt.core.internal.platform.GenericJpaFactory.bui ldJpaProject(GenericJpaFactory.java:259)
>
> at
> org.eclipse.jpt.core.internal.GenericJpaModel$DefaultJpaProj ectHolder.buildJpaProject(GenericJpaModel.java:417)
>
> at
> org.eclipse.jpt.core.internal.GenericJpaModel$DefaultJpaProj ectHolder.jpaProject(GenericJpaModel.java:405)
>
> at
> org.eclipse.jpt.core.internal.GenericJpaModel.getJpaProject( GenericJpaModel.java:75)
>
> at
> org.eclipse.jpt.core.internal.JpaModelManager.getJpaProject( JpaModelManager.java:178)
>
> at
> org.eclipse.jpt.core.JptCorePlugin.getJpaProject(JptCorePlug in.java:156)
> at
> org.eclipse.jpt.ui.internal.editors.PersistenceEditor.jpaPro ject(PersistenceEditor.java:303)
>
> at
> org.eclipse.jpt.ui.internal.editors.PersistenceEditor.addPer sistenceUnitPages(PersistenceEditor.java:119)
>
> at
> org.eclipse.jpt.ui.internal.editors.PersistenceEditor.addPag es(PersistenceEditor.java:109)
>
> at
> org.eclipse.ui.forms.editor.FormEditor.createPages(FormEdito r.java:146)
> at
> org.eclipse.ui.part.MultiPageEditorPart.createPartControl(Mu ltiPageEditorPart.java:310)
>
> at
> org.eclipse.ui.internal.EditorReference.createPartHelper(Edi torReference.java:661)
>
> at
> org.eclipse.ui.internal.EditorReference.createPart(EditorRef erence.java:428)
>
> at
> org.eclipse.ui.internal.WorkbenchPartReference.getPart(Workb enchPartReference.java:594)
>
> at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:30 6)
> at
> org.eclipse.ui.internal.presentations.PresentablePart.setVis ible(PresentablePart.java:180)
>
> at
> org.eclipse.ui.internal.presentations.util.PresentablePartFo lder.select(PresentablePartFolder.java:270)
>
> at
> org.eclipse.ui.internal.presentations.util.LeftToRightTabOrd er.select(LeftToRightTabOrder.java:65)
>
> at
> org.eclipse.ui.internal.presentations.util.TabbedStackPresen tation.selectPart(TabbedStackPresentation.java:473)
>
> at
> org.eclipse.ui.internal.PartStack.refreshPresentationSelecti on(PartStack.java:1256)
>
> at org.eclipse.ui.internal.PartStack.setSelection(PartStack.jav a:1209)
> at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:16 08)
> at org.eclipse.ui.internal.PartStack.add(PartStack.java:499)
> at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:103 )
> at org.eclipse.ui.internal.PartStack.add(PartStack.java:485)
> at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:112 )
> at
> org.eclipse.ui.internal.EditorSashContainer.addEditor(Editor SashContainer.java:63)
>
> at
> org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorA reaHelper.java:217)
>
> at
> org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAre aHelper.java:207)
>
> at
> org.eclipse.ui.internal.EditorManager.createEditorTab(Editor Manager.java:779)
>
> at
> org.eclipse.ui.internal.EditorManager.openEditorFromDescript or(EditorManager.java:678)
>
> at
> org.eclipse.ui.internal.EditorManager.openEditor(EditorManag er.java:639)
> at
> org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched( WorkbenchPage.java:2817)
>
> at
> org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(Workben chPage.java:2729)
>
> at
> org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPag e.java:2721)
> at
> org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.j ava:2673)
> at
> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:70)
> at
> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2668)
> at
> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2652)
> at
> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2643)
> at org.eclipse.ui.ide.IDE.openEditor(IDE.java:646)
> at org.eclipse.ui.ide.IDE.openEditor(IDE.java:605)
> at
> org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInE ditor(EditorUtility.java:318)
>
> at
> org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInE ditor(EditorUtility.java:160)
>
> at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:22 8)
> at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:20 7)
> at
> org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchR un(SelectionDispatchAction.java:274)
>
> at
> org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(Selec tionDispatchAction.java:250)
>
> at
> org.eclipse.jdt.internal.ui.navigator.OpenAndExpand.run(Open AndExpand.java:50)
>
> at org.eclipse.ui.actions.RetargetAction.run(RetargetAction.jav a:221)
> at
> org.eclipse.ui.internal.navigator.CommonNavigatorManager$3.o pen(CommonNavigatorManager.java:184)
>
> at
> org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredV iewer.java:820)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
> at org.eclipse.core.runtime.Platform.run(Platform.java:880)
> at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48)
> at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:17 5)
> at
> org.eclipse.jface.viewers.StructuredViewer.fireOpen(Structur edViewer.java:818)
>
> at
> org.eclipse.jface.viewers.StructuredViewer.handleOpen(Struct uredViewer.java:1079)
>
> at
> org.eclipse.ui.navigator.CommonViewer.handleOpen(CommonViewe r.java:372)
> at
> org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(Stru cturedViewer.java:1183)
>
> at
> org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrate gy.java:263)
> at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.ja va:257)
> at
> org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrate gy.java:297)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3823)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3422)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2384)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2348)
> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 00)
> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:495)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:288)
>
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:490)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
> at
> org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:113)
>
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:193)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:386)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
>
> 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.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 549)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
>
>
>
>
Re: Generate Entities from Tables not working [message #435502 is a reply to message #435498] Wed, 18 March 2009 22:59 Go to previous messageGo to next message
Bill Blalock is currently offline Bill Blalock
Messages: 118
Registered: July 2009
Location: Alabama
Senior Member
Brian:

Thanks for the information.

> Are you using a vanilla Eclipse JEE workspace? Or are you us>ing additional
plug-ins? Do these plug-ins provide the DB2 adapter for DTP?

I built a new Eclipse using the downloads listed as required on the
release build R-3.0.4-20090213193639 page. I got this from the Dali
Project Summary Page, Release section, 2.2 link. The URL is:

http://download.eclipse.org/webtools/downloads/drops/R3.0/R- 3.0.4-20090213193639/

These are the parts I used to build this Eclipse:

Eclipse Platform (Platform, JDT) eclipse-SDK-3.4.2-win32.zip EMF 2.4.2
Runtime Minimum executable code. emf-runtime-2.4.2.zip
EMF XSD 2.4.2 Runtime Minimum executable code. xsd-runtime-2.4.2.zip
Graphical Editing Framework (GEF) GEF-SDK-3.4.2.zip
Data Tools Platform (DTP) (required only for EJB or JPT development)

> if you try out a more current release (e.g. WTP 3.1 M6 is set to be
> released soon).

I'll do that and try debugging as you suggested.

Thanks
Bill Blalock
Re: Generate Entities from Tables not working [message #435503 is a reply to message #435502] Thu, 19 March 2009 19:16 Go to previous messageGo to next message
Neil Hauge is currently offline Neil Hauge
Messages: 469
Registered: July 2009
Senior Member
Bill,

Just so you know, the version of Dali you are referencing does not contain
the recent changes that Brian was referring to. If you want to look at
how things used to work, use this version of WTP/Dali. If you want to
look at the way things work now, try Dali 2.1.1 -
http://download.eclipse.org/webtools/downloads/drops/R2.1/R- 2.1.1-20090226062131/.
Or WTP/Dali 3.1/2.2M6 -
http://download.eclipse.org/webtools/downloads/drops/R3.1/S- 3.1M6-20090318020101/

> I built a new Eclipse using the downloads listed as required on the
> release build R-3.0.4-20090213193639 page. I got this from the Dali
> Project Summary Page, Release section, 2.2 link. The URL is:

>
http://download.eclipse.org/webtools/downloads/drops/R3.0/R- 3.0.4-20090213193639/

Neil
Re: Generate Entities from Tables not working [message #435506 is a reply to message #435503] Mon, 23 March 2009 21:11 Go to previous messageGo to next message
Bill Blalock is currently offline Bill Blalock
Messages: 118
Registered: July 2009
Location: Alabama
Senior Member
Neil:

I tried WTP/Dali 3.1/2.2 M6 -

http://download.eclipse.org/webtools/downloads/drops/R3.1/S- 3.1M6-20090318020101/

with newly released Eclipselink 1.1

I am still getting similar results. Some of the problems:

Project > properties > Java Persistence
Override default catalog from connection DOES see the catalog on the i5
Override default schema from connection DOES NOT not any schemas.
It sees the catalog of the i5, that seems to indicate the connection is
partially working.

Java Editor throws validation errors when the database is connected.

New > JPA > Generate Entity From Table
Does not show any schemas when the database is connected.

The schema and table names on this i5 are not SQL friendly. Could that be
a problem? Our schema and table names include these special characters.

@ $ # and digits 0 - 9.

Our schema and table names start with a letter, @, $ or #. The data
source explorer handles this. Could this non-standard table and schema
names be the cause of the problem?

These are the key errors begin logged. It looks like each time the schema
is requested there is a failure logged. My experiments boil down to three
initial errors (for the three problems I listed above?)

java.lang.NullPointerException
at
org.eclipse.jpt.ui.internal.wizards.gen.TableAssociationsWiz ardPage.updateAssociationsListPanel(TableAssociationsWizardP age.java:560)

java.lang.NullPointerException
at
org.eclipse.jpt.ui.internal.wizards.gen.TablesAndColumnsCust omizationWizardPage.setVisible(TablesAndColumnsCustomization WizardPage.java:149)

java.lang.NullPointerException
at
org.eclipse.jpt.ui.internal.wizards.gen.GenerateEntitiesFrom SchemaWizard.performFinish(GenerateEntitiesFromSchemaWizard. java:206)


Over the next few days I am going to try debugging as suggested earlier in
this thread.


Thanks
Bill Blalock
Re: Generate Entities from Tables not working [message #435509 is a reply to message #435503] Thu, 02 April 2009 23:32 Go to previous messageGo to next message
Bill Blalock is currently offline Bill Blalock
Messages: 118
Registered: July 2009
Location: Alabama
Senior Member
Neil & Brian:

See previous message on 3/23...

I have build a M6 installation of Eclipse and added the Dali source from
dali-sdk-buildrepo-S-3.1M6-20090318020101.zip
(the repository in a zip is really cool -- thanks!)

I've tried to debug the problem by launching the Eclipse workbench as an
Eclipse application in debug mode. My thought was to duplicate the error
in the Eclipse workbench running under debug. The launching Eclipse is in
debug perspective, set to break on uncaught NullPointer exceptions.

No joy. I can't do this because the launched Eclipse workbench craps out
with a
"Java indexing" java.lang.OutOfMemoryError: Java heap space
error.

I googled a lot and and learned how to maximize the memory in eclipse.ini.
To conserve memory I closed down all the views that weren't needed to do
this. Still no joy.

Do you have any suggestions as to how I can duplicate this problem while
running in debug so I can provide more detail about it?

Thanks
Bill Blalock
Re: Generate Entities from Tables not working [message #435510 is a reply to message #435509] Fri, 03 April 2009 14:34 Go to previous messageGo to next message
Neil Hauge is currently offline Neil Hauge
Messages: 469
Registered: July 2009
Senior Member
Bill,

I run/debug with the following setting in my Run Config:

Main tab -> Program to Run: |X| Run a product: org.eclipse.platform.ide

Arguments tab -> VM Arguments: -Xmx1024M -XX:MaxPermSize=128m

Give that a try and see if you have better luck, and thanks for looking
into this.

Neil


Bill Blalock wrote:

> Neil & Brian:

> See previous message on 3/23...

> I have build a M6 installation of Eclipse and added the Dali source from
> dali-sdk-buildrepo-S-3.1M6-20090318020101.zip
> (the repository in a zip is really cool -- thanks!)

> I've tried to debug the problem by launching the Eclipse workbench as an
> Eclipse application in debug mode. My thought was to duplicate the error
> in the Eclipse workbench running under debug. The launching Eclipse is in
> debug perspective, set to break on uncaught NullPointer exceptions.

> No joy. I can't do this because the launched Eclipse workbench craps out
> with a
> "Java indexing" java.lang.OutOfMemoryError: Java heap space
> error.

> I googled a lot and and learned how to maximize the memory in eclipse.ini.
> To conserve memory I closed down all the views that weren't needed to do
> this. Still no joy.

> Do you have any suggestions as to how I can duplicate this problem while
> running in debug so I can provide more detail about it?

> Thanks
> Bill Blalock
Re: Generate Entities from Tables not working [message #435511 is a reply to message #435503] Mon, 06 April 2009 20:04 Go to previous messageGo to next message
Bill Blalock is currently offline Bill Blalock
Messages: 118
Registered: July 2009
Location: Alabama
Senior Member
Neil:

> Main tab -> Program to Run: |X| Run a product: org.eclipse.platform.ide

> Arguments tab -> VM Arguments: -Xmx1024M -XX:MaxPermSize=128m

That worked! I had
org.eclipse.sdk.ide
as the product to run. Thanks!

I have it all loaded up and am able to run it in debug.

Now I need sugestions as to which plug-ins projects I should import as
binary projects and classes I should watch in the debug view. I'd
appreciate any other advice or suggestions.

So far this is what I have learned:

For DB2 i5/OS the catalog must be specified in Preferences > Java
Persistence. The default catalog for the JTOpen driver is *SYSBASE. The
correct catalog is in the drop down box but it has to be selected.

If the catalog is specified in Preferences > Java Persistence
- JPA Tools > Generate Entities from Tables
- will default to the default schema and list the tables
- will list all the schemas (in the Schema drop down) but none will show
tables (except default)

The default schema can't be overriden in Preferences > Java Persistence.
If you try to do so only the default schema is listed in the schema drop
down, none of the other schemas are listed.

The default schema is the schema which corresponds to the user who makes
the connection.

For example if I signon as BLALOCK and the BLALOCK library (think schema)
is the default schema and the Build Entities will shows the tables in
BLALOCK. The other schemas come up in the drop down but none of them list
tables. The default schema can't be changed from BLALOCK.

If I connect as "e012676" there will be no default schema because there is
no library names E012676.

The default schema is controlled by using the "libraries" property of the
IBM JTOpen driver.

Specifying the "libraries" property in either the URL or the additional
properties (by choosing an "other driver" in the driver selection of DB2
for i5/OS) has no effect. I am very familiar with the use of this
property from other projects.

If no libraries property is specified the user becomes the default schema.
This behavior is documented at:

http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/ rzahh/jdbcproperties.htm

That being said JPA Tools > Generate Entities will generate entities for
tables in BLALOCK when the connection uses BLALOCK as the user. That is
progress.

What classes should I watch in the debugger to find the cause of this
behavior?

Where whould I look to see what meta data is being passed to Dali?

Thanks
Bill Blalock
Re: Generate Entities from Tables not working [message #435513 is a reply to message #435503] Fri, 08 May 2009 22:02 Go to previous messageGo to next message
Bill Blalock is currently offline Bill Blalock
Messages: 118
Registered: July 2009
Location: Alabama
Senior Member
Neil and all:

This problem for DB2 on i5 (iSeries aka AS400) continues in Galileo M6
(JEE package).

I would like to assist in correcting the problem but I need help in
determining where I should look, what to debug.

My prior post describes the problem Dali has finding schemas and tables
within schemas for the i5/JTOpen drivers.

This is very frustrating because Dali validation and generating entities
from tables works so well ... if I happen to be working with one schema
that happens to have the same name as the user profile that the connection
uses.

Thanks for all your hard work!

Bill Blalock
Re: Generate Entities from Tables not working [message #435540 is a reply to message #435513] Wed, 13 May 2009 16:50 Go to previous messageGo to next message
Neil Hauge is currently offline Neil Hauge
Messages: 469
Registered: July 2009
Senior Member
Hi Bill,

Lets see if we can figure this out. Take a look at the constructor for
org.eclipse.jpt.db.internal.DTPDatabaseWrapper. The last line of the
constructor is an attempt to resolve the vendor that we are working with.
Put a breakpoint in this constructor and let me know what Vendor you are
ending up with.

This first bit of information will let us know if we are starting off in
the right direction. If you are ending up with an UnrecognizedVendor, let
me know what is being returned from "this.getVendorName()".

Neil

Bill Blalock wrote:

> Neil and all:

> This problem for DB2 on i5 (iSeries aka AS400) continues in Galileo M6
> (JEE package).

> I would like to assist in correcting the problem but I need help in
> determining where I should look, what to debug.

> My prior post describes the problem Dali has finding schemas and tables
> within schemas for the i5/JTOpen drivers.

> This is very frustrating because Dali validation and generating entities
> from tables works so well ... if I happen to be working with one schema
> that happens to have the same name as the user profile that the connection
> uses.

> Thanks for all your hard work!

> Bill Blalock
Re: Generate Entities from Tables not working [message #479578 is a reply to message #435461] Tue, 11 August 2009 15:45 Go to previous messageGo to next message
yhovart  is currently offline yhovart
Messages: 6
Registered: August 2009
Junior Member
Hello,

I have the same kind of problem using Eclipse Galileo's integrated Dali plugin and connecting an MSSQL Server 2005 database.

Testing with postgre is allright but when connecting to MSSQL Server (with JTDS or Microsoft drivers) i can choose a catalog in the "generate entites from table" wizard but not the schema (the combo box is empty).

I thought the default schema would be used (dbo) but it is not.
I also tried to create a schema using my user connection name but it doesn't work either.

Any workaround or fix?
I will have to copy my database on postgre each time an evolution occuirs on the model ... this is not every handy. Or i may won't be able to use Dali at all.

Notice : the selection of catalog or schema doesn't work either by deault in JPA details or Java code. But i managed to "fix" it by specifying persistence-unit-defaults (catalog and schema) in orm.xml (which i don't need basically).

Any help will be appreciate,
Thx.
Re: Generate Entities from Tables not worki ng [message #479642 is a reply to message #479578] Tue, 11 August 2009 20:23 Go to previous messageGo to next message
Neil Hauge is currently offline Neil Hauge
Messages: 469
Registered: July 2009
Senior Member
Try setting the schema in the JPA Project Properties and then attempting
the Entity Generation. Also, please see
https://bugs.eclipse.org/bugs/show_bug.cgi?id=267343 for more info on this
problem, and details on related issues.

Let me know how it goes.

Neil
Re: Generate Entities from Tables not worki ng [message #479997 is a reply to message #479642] Thu, 13 August 2009 12:19 Go to previous messageGo to next message
yhovart  is currently offline yhovart
Messages: 6
Registered: August 2009
Junior Member
I've already tried: same behavior, i can choose the catalog but the schema list remains empty.

But the bug seems to be fixing this. I'll have to wait for the 2.2 realease of Dali i guess.

Thx.
Re: Generate Entities from Tables not worki ng [message #480018 is a reply to message #479997] Thu, 13 August 2009 13:52 Go to previous messageGo to next message
Neil Hauge is currently offline Neil Hauge
Messages: 469
Registered: July 2009
Senior Member
What version of Dali are you using? Dali 2.2 was released with Galileo
and WTP 3.1 at the end of June, so the version with this fix is available.

Neil


yhovart wrote:

> I've already tried: same behavior, i can choose the catalog but the schema
list remains empty.

> But the bug seems to be fixing this. I'll have to wait for the 2.2 realease
of Dali i guess.

> Thx.
Re: Generate Entities from Tables not worki ng [message #480169 is a reply to message #480018] Fri, 14 August 2009 08:54 Go to previous messageGo to next message
yhovart  is currently offline yhovart
Messages: 6
Registered: August 2009
Junior Member
Hi,

I am using galileo's default embedded Dali plugin which seems to be ... 2.2, you're right... (thought it was 2.1) ....

So, it should be working ....

I've give it a try again an hour ago with no more success.
Re: Generate Entities from Tables not work i ng [message #480270 is a reply to message #480169] Fri, 14 August 2009 15:45 Go to previous messageGo to next message
Neil Hauge is currently offline Neil Hauge
Messages: 469
Registered: July 2009
Senior Member
It sounds like we need to re-open bug 276768 -
https://bugs.eclipse.org/bugs/show_bug.cgi?id=276768.

Please re-open this bug and enter in all of the details you can regarding
your connection properties and database/catalog/schema structure.

Neil
Re: Generate Entities from Tables not working [message #480581 is a reply to message #479578] Mon, 17 August 2009 17:44 Go to previous messageGo to next message
Heiko Ahlig is currently offline Heiko Ahlig
Messages: 62
Registered: July 2009
Member
Hi,
I have the same problem with the wizard with database server Sybase 12.x
and 15.x
At the DataSourceExplorer I see all schmeas, tables, etc. but in the
wizard, the schema-combo is empty.

Greetings
Heiko


Am 11.08.2009 17:45, schrieb yhovart:
> Hello,
>
> I have the same kind of problem using Eclipse Galileo's integrated Dali
> plugin and connecting an MSSQL Server 2005 database.
>
> Testing with postgre is allright but when connecting to MSSQL Server
> (with JTDS or Microsoft drivers) i can choose a catalog in the "generate
> entites from table" wizard but not the schema (the combo box is empty).
>
> I thought the default schema would be used (dbo) but it is not.
> I also tried to create a schema using my user connection name but it
> doesn't work either.
>
> Any workaround or fix?
> I will have to copy my database on postgre each time an evolution
> occuirs on the model ... this is not every handy. Or i may won't be able
> to use Dali at all.
>
> Notice : the selection of catalog or schema doesn't work either by
> deault in JPA details or Java code. But i managed to "fix" it by
> specifying persistence-unit-defaults (catalog and schema) in orm.xml
> (which i don't need basically).
>
> Any help will be appreciate,
> Thx.
Re: Generate Entities from Tables not working [message #480604 is a reply to message #480581] Mon, 17 August 2009 20:03 Go to previous messageGo to next message
Neil Hauge is currently offline Neil Hauge
Messages: 469
Registered: July 2009
Senior Member
Thanks for letting us know. We'll look into this as well. If you are
able to provide any debug info that would be helpful, but either way we
will look into it.

Neil
icon8.gif  Re: Generate Entities from Tables not working [message #514742 is a reply to message #435461] Tue, 16 February 2010 14:17 Go to previous messageGo to next message
Guillermo Aldunate is currently offline Guillermo Aldunate
Messages: 15
Registered: February 2010
Junior Member
I reported this problem with the Galileo version to DTP around 6 months ago. At that time there were a lot of bugs outstanding for SQL Server and DTP, and all I got was that DTP team was lacking manpower to solve this problem, so they would fix it presumably in the 1.7.2 version.

Now I realise this is more a Dali matter than DTP's. However, the problem continues, no matter I'm using SR1 release of Galileo and Dali Java Persistence Tools 2.2.1.v200908270220. In fact, using jTDS one may even list the schemas in the SQL Server database and create the entities, but the Java output is surrounded by quotes in the bean's variables names, who have also escape backslash characters, and thus the code generated is quite useless and little legible.

If you use the standard SQL Server JDBC you don't get lists of schemas or anything else. My SQL Server version is 2000 (quite old); if you substitute the JDBC driver for that belonging to SQL Server 2005, the only schema you get is your own, for SQL Server 2005 began using schemas rather than user names for this function.

So, this seems to be a generalised problem. On Ganymede Dali version, it works fine with either the MSSQL 2000 or jTDS JDBC drivers.

Please fix this asap, for I cannot migrate to Galileo and thus I have no support for using Facelets in my code, which I really want to use for it will ease my job greatly!!! Thanks in advance.
Re: Generate Entities from Tables not working [message #517037 is a reply to message #514742] Thu, 25 February 2010 20:13 Go to previous messageGo to next message
Brian Vosburgh is currently offline Brian Vosburgh
Messages: 132
Registered: July 2009
Senior Member
Guillermo,

I'm not sure I understand your problem exactly.

When you create your DTP Connection Profile, what Connection Profile Type do you use? SQL Server?

Once you have created your Connection Profile and connected to your database server, do you see your databases and tables in the DTP Data Source Explorer?

Have you changed your project default catalog and schema (via the Project Properties dialog -> Java Persistence)? Are any catalogs or schemata listed in the drop-down lists in the Connection section of the Java Persistence properties page? The list of catalogs on this page should match the databases listed in the Data Source Explorer. (I'm not sure where the schemata can be found via DTP....)

Minus any bugs, Dali is simply displaying the catalogs and schemata provided by DTP. This is problematic because of the variety of DTP driver implementations.

Unfortunately, I don't have a MS SQL Server to test against; but I do have a Sybase Adaptive Server (which is very similar), and I can see the catalogs and schemata fine with that release of Dali.

Also, the reason you are seeing quoted identifiers when using jTDS is probably because Dali does not recognize the name of the vendor returned by DTP in that situation. Which DTP Connection Profile Type do you use? Are you using lowercase letters in your table and column names? By default, if Dali does not recognize the vendor, it will treat names according to the SQL Standard, which expects non-delimited identifiers to be folded to uppercase. As a result, any non-uppercase identifiers must be delimited.

Brian
Re: Generate Entities from Tables not working [message #538867 is a reply to message #514742] Tue, 08 June 2010 20:25 Go to previous messageGo to next message
Guillermo Aldunate is currently offline Guillermo Aldunate
Messages: 15
Registered: February 2010
Junior Member
Guillermo Aldunate wrote on Tue, 16 February 2010 09:17
I reported this problem with the Galileo version to DTP around 6 months ago. At that time there were a lot of bugs outstanding for SQL Server and DTP, and all I got was that DTP team was lacking manpower to solve this problem, so they would fix it presumably in the 1.7.2 version.

Now I realise this is more a Dali matter than DTP's. However, the problem continues, no matter I'm using SR1 release of Galileo and Dali Java Persistence Tools 2.2.1.v200908270220. In fact, using jTDS one may even list the schemas in the SQL Server database and create the entities, but the Java output is surrounded by quotes in the bean's variables names, who have also escape backslash characters, and thus the code generated is quite useless and little legible.

If you use the standard SQL Server JDBC you don't get lists of schemas or anything else. My SQL Server version is 2000 (quite old); if you substitute the JDBC driver for that belonging to SQL Server 2005, the only schema you get is your own, for SQL Server 2005 began using schemas rather than user names for this function.

So, this seems to be a generalised problem. On Ganymede Dali version, it works fine with either the MSSQL 2000 or jTDS JDBC drivers.

Please fix this asap, for I cannot migrate to Galileo and thus I have no support for using Facelets in my code, which I really want to use for it will ease my job greatly!!! Thanks in advance.

Re: Generate Entities from Tables not working [message #538869 is a reply to message #514742] Tue, 08 June 2010 20:26 Go to previous messageGo to next message
Guillermo Aldunate is currently offline Guillermo Aldunate
Messages: 15
Registered: February 2010
Junior Member
Guillermo Aldunate wrote on Tue, 16 February 2010 09:17
I reported this problem with the Galileo version to DTP around 6 months ago. At that time there were a lot of bugs outstanding for SQL Server and DTP, and all I got was that DTP team was lacking manpower to solve this problem, so they would fix it presumably in the 1.7.2 version.

Now I realise this is more a Dali matter than DTP's. However, the problem continues, no matter I'm using SR1 release of Galileo and Dali Java Persistence Tools 2.2.1.v200908270220. In fact, using jTDS one may even list the schemas in the SQL Server database and create the entities, but the Java output is surrounded by quotes in the bean's variables names, who have also escape backslash characters, and thus the code generated is quite useless and little legible.

If you use the standard SQL Server JDBC you don't get lists of schemas or anything else. My SQL Server version is 2000 (quite old); if you substitute the JDBC driver for that belonging to SQL Server 2005, the only schema you get is your own, for SQL Server 2005 began using schemas rather than user names for this function.

So, this seems to be a generalised problem. On Ganymede Dali version, it works fine with either the MSSQL 2000 or jTDS JDBC drivers.

Please fix this asap, for I cannot migrate to Galileo and thus I have no support for using Facelets in my code, which I really want to use for it will ease my job greatly!!! Thanks in advance.

Re: Generate Entities from Tables not working [message #538875 is a reply to message #517037] Tue, 08 June 2010 20:46 Go to previous messageGo to next message
Guillermo Aldunate is currently offline Guillermo Aldunate
Messages: 15
Registered: February 2010
Junior Member
Hello Brian, sorry but I didn't get your answer before. All I can say is things haven't improved regarding SQL Server 2000 and DTP.I "upgraded" to Galileo 3.5SR2 and it continues not to work. When you define a connection using MS SQL Server (with the same JDBC drivers and definitions I use with Eclipse 3.4.2, or Ganymede, which works fine), you may not see any tables other than those defined under your user defined under SQL Server.

It's funny, because in the meantime I developed an application using IBM DB2 LUW (that supports schemas and all those gadgets a true relational database should support) and it is working fine. I had no problems whatsoever to recognise and work with all sorts of database objects.

It seems to me that between the 2000 and 2005 versions of MS SQL Server there was a change in the way the schemas were addressed. Whereas in the 2000 version there were no schemas (only users), in 2005 and newer versions the schema facility was implemented (in fact, if you use the JDBC driver for 2005 with 2000 in Ganymede, it will work but it will give you the same problem I'm reporting here, which is equivalent to say that it doesn't work).

If you use the jTDS driver with both Ganymede and Galileo, you get exactly the same behaviour as with MS SQL Server 2000 JDBC driver.

Please reopen this issue and try to solve it for we are still using Ganymede and it lacks many features from Galileo we would like to have available.

Best regards, Guillermo Evil or Very Mad
Re: Generate Entities from Tables not working [message #539095 is a reply to message #538875] Wed, 09 June 2010 15:41 Go to previous messageGo to next message
Brian Vosburgh is currently offline Brian Vosburgh
Messages: 132
Registered: July 2009
Senior Member
Guillermo,

I would like to determine whether your issue is with DTP or Dali. Once you have created your Connection Profile and connected to your database server, do you see your databases and tables in the DTP Data Source Explorer? If you do *not* see them, we have a problem with DTP; if you *do* see them, we have a problem with Dali.

Brian
Re: Generate Entities from Tables not working [message #614914 is a reply to message #435461] Mon, 16 February 2009 14:55 Go to previous messageGo to next message
Neil Hauge is currently offline Neil Hauge
Messages: 469
Registered: July 2009
Senior Member
Karl,

Are you using PostgreSQL? If so, I think you may have run into bug 259534
- https://bugs.eclipse.org/bugs/show_bug.cgi?id=259534

We have a fix for this coming out soon in 2.1 maintenance. There isn't a
good workaround for this issue, so rolling back to Dali 2.0.3 and waiting
for 2.1.1 might be your best option.

Neil



Karl Stenerud wrote:

> I've just installed Dali 2.1 in eclipse 3.4.1 and I can't get the
> "Generate entities from tables" function to work.

> I have a database defined (I can see it in the Data Source Explorer, and I
> can browse through the catalogs, schemas, tables etc) but when I try to
> run the entity generator tool, it brings up a database connection dialog.

> When I select my connection, it won't let me select a schema (it tells me
> I must have an active connection to select a schema, but the connection
> button is greyed out).
> If I go back to the data source explorer and disconnect from the database,
> the "connect" button will be selectable, but when I connect, I still can't
> select a schema.

> Dali is obviously able to see the schema because I can browse to it from
> the data source explorer, so why can't the entity generator tool see it?
Re: Generate Entities from Tables not working [message #614924 is a reply to message #435463] Tue, 10 March 2009 21:02 Go to previous messageGo to next message
Bill Blalock is currently offline Bill Blalock
Messages: 118
Registered: July 2009
Location: Alabama
Senior Member
I seem to be having a similar problem with DB2 for iSeries. The symptoms
match what Karl Stenerud described.

DB2 (any flavor) is no longer listed in "Connect Profile Types" list so I
used "Generic JDBC" and specified the JTOpen as400.jar file.

In the Data Source Explorer I can drill down through the system to the
schema I want. Everything works there.

Generate Entity from Table won't work because the schema's aren't listed.
If I could I'd override with the specific schema that I want but that
won't work either.

I looked over bug ID 259534. The problem could be is that i5 schemas
reported are the i5 "library names." An i5 "library name" allows the
characters @, #, $ as well as underscore. These non-standard characters
are shown in in the "data soure explorer" list of schemas.

I'd appreciate any suggestion to work around this.

So far I haven't come up with a any properties to specify to JDBC to limit
the schema which generate entities see. The "default schema filter" works
fine for the data source explorer but doesn't help the problem with
"generate entities".

Thanks all

Neil Hauge wrote:

> Karl,

> Are you using PostgreSQL? If so, I think you may have run into bug 259534
> - https://bugs.eclipse.org/bugs/show_bug.cgi?id=259534

> We have a fix for this coming out soon in 2.1 maintenance. There isn't a
> good workaround for this issue, so rolling back to Dali 2.0.3 and waiting
> for 2.1.1 might be your best option.

> Neil



> Karl Stenerud wrote:

>> I've just installed Dali 2.1 in eclipse 3.4.1 and I can't get the
>> "Generate entities from tables" function to work.

>> I have a database defined (I can see it in the Data Source Explorer, and I
>> can browse through the catalogs, schemas, tables etc) but when I try to
>> run the entity generator tool, it brings up a database connection dialog.

>> When I select my connection, it won't let me select a schema (it tells me
>> I must have an active connection to select a schema, but the connection
>> button is greyed out).
>> If I go back to the data source explorer and disconnect from the database,
>> the "connect" button will be selectable, but when I connect, I still can't
>> select a schema.

>> Dali is obviously able to see the schema because I can browse to it from
>> the data source explorer, so why can't the entity generator tool see it?
Re: Generate Entities from Tables not working [message #614927 is a reply to message #435468] Wed, 11 March 2009 18:07 Go to previous messageGo to next message
Neil Hauge is currently offline Neil Hauge
Messages: 469
Registered: July 2009
Senior Member
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


Bill Blalock wrote:

> I seem to be having a similar problem with DB2 for iSeries. The symptoms
> match what Karl Stenerud described.

> DB2 (any flavor) is no longer listed in "Connect Profile Types" list so I
> used "Generic JDBC" and specified the JTOpen as400.jar file.

> In the Data Source Explorer I can drill down through the system to the
> schema I want. Everything works there.

> Generate Entity from Table won't work because the schema's aren't listed.
> If I could I'd override with the specific schema that I want but that
> won't work either.

> I looked over bug ID 259534. The problem could be is that i5 schemas
> reported are the i5 "library names." An i5 "library name" allows the
> characters @, #, $ as well as underscore. These non-standard characters
> are shown in in the "data soure explorer" list of schemas.

> I'd appreciate any suggestion to work around this.

> So far I haven't come up with a any properties to specify to JDBC to limit
> the schema which generate entities see. The "default schema filter" works
> fine for the data source explorer but doesn't help the problem with
> "generate entities".

> Thanks all

> Neil Hauge wrote:

>> Karl,

>> Are you using PostgreSQL? If so, I think you may have run into bug 259534
>> - https://bugs.eclipse.org/bugs/show_bug.cgi?id=259534

>> We have a fix for this coming out soon in 2.1 maintenance. There isn't a
>> good workaround for this issue, so rolling back to Dali 2.0.3 and waiting
>> for 2.1.1 might be your best option.

>> Neil



>> Karl Stenerud wrote:

>>> I've just installed Dali 2.1 in eclipse 3.4.1 and I can't get the
>>> "Generate entities from tables" function to work.

>>> I have a database defined (I can see it in the Data Source Explorer, and I
>>> can browse through the catalogs, schemas, tables etc) but when I try to
>>> run the entity generator tool, it brings up a database connection dialog.

>>> When I select my connection, it won't let me select a schema (it tells me
>>> I must have an active connection to select a schema, but the connection
>>> button is greyed out).
>>> If I go back to the data source explorer and disconnect from the database,
>>> the "connect" button will be selectable, but when I connect, I still can't
>>> select a schema.

>>> Dali is obviously able to see the schema because I can browse to it from
>>> the data source explorer, so why can't the entity generator tool see it?
Re: Generate Entities from Tables not working [message #614930 is a reply to message #435469] Fri, 13 March 2009 18:58 Go to previous messageGo to next message
Bill Blalock is currently offline Bill Blalock
Messages: 118
Registered: July 2009
Location: Alabama
Senior Member
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
Re: Generate Entities from Tables not working [message #614938 is a reply to message #435470] Mon, 16 March 2009 23:05 Go to previous messageGo to next message
Brian Vosburgh is currently offline Brian Vosburgh
Messages: 132
Registered: July 2009
Senior Member
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
>
>
>
>
>
>
Re: Generate Entities from Tables not working [message #614941 is a reply to message #435473] Tue, 17 March 2009 18:30 Go to previous messageGo to next message
Bill Blalock is currently offline Bill Blalock
Messages: 118
Registered: July 2009
Location: Alabama
Senior Member
Thanks for your informative reply Brian:

> 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

DB2 UDB iSeries -- that is me!!!

> If the DTP model does not match any of these names, we use a "default"
adapter....

That may be the problem, the DTP model my iSeries (i5 as it is now called,
ver 5, release 4 of the OS) may not match what Dali expects for DB2 UDB
iSeries and falls through to the default.

> 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. :-)

I'd be happy to help out! I have extened the eclipselink DB2Platform
class for the iSeries and contributed it. Tell me what to do. I can also
test against an IBM iSeries V5R4 for you.

I set up a separate Eclipse with the latest for these test, see previous
post.

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

Is there anyway to tell Dali "hey use this adapter" instead of letting it
guess? Perhaps a property in persistence.xml?

I have to specify the database to eclipselink when I am not using
Dali(eclipselink.target-database) so coding a property isn't a hardship.

Regards
Bill Blalock

PS When opening persistence.xml with the database connection open I'll
get errors. No error when the connection is closed.

This is the stack trace in the detail view which is opened instead of the
persistence.xml editor. I've included them incase they are related (first
set of messages are from DTPDatabaseWrappers you mentioned).

java.lang.UnsupportedOperationException
at
org.eclipse.jpt.db.internal.DTPDatabaseWrapper$Vendor.getDef aultCatalog(DTPDatabaseWrapper.java:475)
at
org.eclipse.jpt.db.internal.DTPDatabaseWrapper.buildDefaultC atalog(DTPDatabaseWrapper.java:257)
at
org.eclipse.jpt.db.internal.DTPDatabaseWrapper.getDefaultCat alog(DTPDatabaseWrapper.java:251)
at
org.eclipse.jpt.db.internal.DTPDatabaseWrapper.getDefaultCat alog(DTPDatabaseWrapper.java:1)
at
org.eclipse.jpt.core.internal.GenericJpaProject.getDatabaseD efaultDbCatalog(GenericJpaProject.java:283)
at
org.eclipse.jpt.core.internal.GenericJpaProject.getDatabaseD efaultCatalog(GenericJpaProject.java:277)
at
org.eclipse.jpt.core.internal.GenericJpaProject.getDefaultCa talog(GenericJpaProject.java:273)
at
org.eclipse.jpt.core.internal.context.persistence.AbstractPe rsistenceUnit.buildDefaultCatalog(AbstractPersistenceUnit.ja va:1056)
at
org.eclipse.jpt.core.internal.context.persistence.AbstractPe rsistenceUnit.initializePersistenceUnitDefaults(AbstractPers istenceUnit.java:776)
at
org.eclipse.jpt.core.internal.context.persistence.AbstractPe rsistenceUnit.initialize(AbstractPersistenceUnit.java:735)
at
org.eclipse.jpt.eclipselink.core.internal.context.persistenc e.EclipseLinkPersistenceUnit. <init>(EclipseLinkPersistenceUnit.java:78)
at
org.eclipse.jpt.eclipselink.core.internal.EclipseLinkJpaFact ory.buildPersistenceUnit(EclipseLinkJpaFactory.java:129)
at
org.eclipse.jpt.core.internal.context.persistence.GenericPer sistence.createPersistenceUnit(GenericPersistence.java:155)
at
org.eclipse.jpt.core.internal.context.persistence.GenericPer sistence.initializePersistenceUnits(GenericPersistence.java: 128)
at
org.eclipse.jpt.core.internal.context.persistence.GenericPer sistence.initialize(GenericPersistence.java:122)
at
org.eclipse.jpt.core.internal.context.persistence.GenericPer sistence. <init>(GenericPersistence.java:43)
at
org.eclipse.jpt.core.internal.platform.GenericJpaFactory.bui ldPersistence(GenericJpaFactory.java:303)
at
org.eclipse.jpt.core.internal.context.persistence.GenericPer sistenceXml.buildPersistence(GenericPersistenceXml.java:161)
at
org.eclipse.jpt.core.internal.context.persistence.GenericPer sistenceXml.initialize(GenericPersistenceXml.java:120)
at
org.eclipse.jpt.core.internal.context.persistence.GenericPer sistenceXml. <init>(GenericPersistenceXml.java:44)
at
org.eclipse.jpt.core.internal.platform.GenericJpaFactory.bui ldPersistenceXml(GenericJpaFactory.java:299)
at
org.eclipse.jpt.core.internal.context.GenericRootContextNode .buildPersistenceXml(GenericRootContextNode.java:178)
at
org.eclipse.jpt.core.internal.context.GenericRootContextNode . <init>(GenericRootContextNode.java:60)
at
org.eclipse.jpt.core.internal.platform.GenericJpaFactory.bui ldRootContextNode(GenericJpaFactory.java:282)
at
org.eclipse.jpt.core.internal.GenericJpaProject.buildRootCon textNode(GenericJpaProject.java:200)
at
org.eclipse.jpt.core.internal.GenericJpaProject.<init>(GenericJpaProject.java:159)
at
org.eclipse.jpt.core.internal.platform.GenericJpaFactory.bui ldJpaProject(GenericJpaFactory.java:259)
at
org.eclipse.jpt.core.internal.GenericJpaModel$DefaultJpaProj ectHolder.buildJpaProject(GenericJpaModel.java:417)
at
org.eclipse.jpt.core.internal.GenericJpaModel$DefaultJpaProj ectHolder.jpaProject(GenericJpaModel.java:405)
at
org.eclipse.jpt.core.internal.GenericJpaModel.getJpaProject( GenericJpaModel.java:75)
at
org.eclipse.jpt.core.internal.JpaModelManager.getJpaProject( JpaModelManager.java:178)
at
org.eclipse.jpt.core.JptCorePlugin.getJpaProject(JptCorePlug in.java:156)
at
org.eclipse.jpt.ui.internal.editors.PersistenceEditor.jpaPro ject(PersistenceEditor.java:303)
at
org.eclipse.jpt.ui.internal.editors.PersistenceEditor.addPer sistenceUnitPages(PersistenceEditor.java:119)
at
org.eclipse.jpt.ui.internal.editors.PersistenceEditor.addPag es(PersistenceEditor.java:109)
at org.eclipse.ui.forms.editor.FormEditor.createPages(FormEdito r.java:146)
at
org.eclipse.ui.part.MultiPageEditorPart.createPartControl(Mu ltiPageEditorPart.java:310)
at
org.eclipse.ui.internal.EditorReference.createPartHelper(Edi torReference.java:661)
at
org.eclipse.ui.internal.EditorReference.createPart(EditorRef erence.java:428)
at
org.eclipse.ui.internal.WorkbenchPartReference.getPart(Workb enchPartReference.java:594)
at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:30 6)
at
org.eclipse.ui.internal.presentations.PresentablePart.setVis ible(PresentablePart.java:180)
at
org.eclipse.ui.internal.presentations.util.PresentablePartFo lder.select(PresentablePartFolder.java:270)
at
org.eclipse.ui.internal.presentations.util.LeftToRightTabOrd er.select(LeftToRightTabOrder.java:65)
at
org.eclipse.ui.internal.presentations.util.TabbedStackPresen tation.selectPart(TabbedStackPresentation.java:473)
at
org.eclipse.ui.internal.PartStack.refreshPresentationSelecti on(PartStack.java:1256)
at org.eclipse.ui.internal.PartStack.setSelection(PartStack.jav a:1209)
at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:16 08)
at org.eclipse.ui.internal.PartStack.add(PartStack.java:499)
at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:103 )
at org.eclipse.ui.internal.PartStack.add(PartStack.java:485)
at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:112 )
at
org.eclipse.ui.internal.EditorSashContainer.addEditor(Editor SashContainer.java:63)
at
org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorA reaHelper.java:217)
at
org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAre aHelper.java:207)
at
org.eclipse.ui.internal.EditorManager.createEditorTab(Editor Manager.java:779)
at
org.eclipse.ui.internal.EditorManager.openEditorFromDescript or(EditorManager.java:678)
at
org.eclipse.ui.internal.EditorManager.openEditor(EditorManag er.java:639)
at
org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched( WorkbenchPage.java:2817)
at
org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(Workben chPage.java:2729)
at
org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPag e.java:2721)
at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.j ava:2673)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:70)
at
org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2668)
at
org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2652)
at
org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2643)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:646)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:605)
at
org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInE ditor(EditorUtility.java:318)
at
org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInE ditor(EditorUtility.java:160)
at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:22 8)
at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:20 7)
at
org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchR un(SelectionDispatchAction.java:274)
at
org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(Selec tionDispatchAction.java:250)
at
org.eclipse.jdt.internal.ui.navigator.OpenAndExpand.run(Open AndExpand.java:50)
at org.eclipse.ui.actions.RetargetAction.run(RetargetAction.jav a:221)
at
org.eclipse.ui.internal.navigator.CommonNavigatorManager$3.o pen(CommonNavigatorManager.java:184)
at
org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredV iewer.java:820)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:880)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:17 5)
at
org.eclipse.jface.viewers.StructuredViewer.fireOpen(Structur edViewer.java:818)
at
org.eclipse.jface.viewers.StructuredViewer.handleOpen(Struct uredViewer.java:1079)
at org.eclipse.ui.navigator.CommonViewer.handleOpen(CommonViewe r.java:372)
at
org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(Stru cturedViewer.java:1183)
at
org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrate gy.java:263)
at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.ja va:257)
at
org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrate gy.java:297)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3823)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3422)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2384)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2348)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 00)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:495)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:288)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:490)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:113)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:193)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:386)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
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.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
Re: Generate Entities from Tables not working [message #615746 is a reply to message #435474] Wed, 18 March 2009 17:25 Go to previous messageGo to next message
Brian Vosburgh is currently offline Brian Vosburgh
Messages: 132
Registered: July 2009
Senior Member
Bill,

the Dali code surrounding all this DTP stuff has changed a lot over the last few
months; so you might encounter different problems (or maybe no problems at all
:) ) if you try out a more current release (e.g. WTP 3.1 M6 is set to be
released soon).

Anyway, if you would like to research what Dali is doing with your DB2
connection, you can look at whether we have a "vendor" defined for it by
debugging the call to VendorRepository.getVendor(String). This will tell you (1)
what your DTP DB2 "adapter" says its name is and (2) whether Dali has a vendor
defined with a matching name.

Are you using a vanilla Eclipse JEE workspace? Or are you using additional
plug-ins? Do these plug-ins provide the DB2 adapter for DTP? If you are
interested in working on a DB2 interface, it would be more of an extension of
DTP than an extension of Dali. Dali simply uses the metadata provided by the DTP
metadata model; sometimes successfully, sometimes not. :-)

Brian Vosburgh

Bill Blalock wrote:
> Thanks for your informative reply Brian:
>
>> 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
>
> DB2 UDB iSeries -- that is me!!!
>
>> If the DTP model does not match any of these names, we use a "default"
> adapter....
>
> That may be the problem, the DTP model my iSeries (i5 as it is now
> called, ver 5, release 4 of the OS) may not match what Dali expects for
> DB2 UDB iSeries and falls through to the default.
>
>> 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. :-)
>
> I'd be happy to help out! I have extened the eclipselink DB2Platform
> class for the iSeries and contributed it. Tell me what to do. I can
> also test against an IBM iSeries V5R4 for you.
>
> I set up a separate Eclipse with the latest for these test, see previous
> post.
>> Also, hopefully, we will fix, or allow workarounds to, some of these
>> sorts
> of
>> problems when we add UI support for catalogs[1].
>
> Is there anyway to tell Dali "hey use this adapter" instead of letting
> it guess? Perhaps a property in persistence.xml?
>
> I have to specify the database to eclipselink when I am not using
> Dali(eclipselink.target-database) so coding a property isn't a hardship.
>
> Regards
> Bill Blalock
>
> PS When opening persistence.xml with the database connection open I'll
> get errors. No error when the connection is closed.
>
> This is the stack trace in the detail view which is opened instead of
> the persistence.xml editor. I've included them incase they are related
> (first set of messages are from DTPDatabaseWrappers you mentioned).
>
> java.lang.UnsupportedOperationException
> at
> org.eclipse.jpt.db.internal.DTPDatabaseWrapper$Vendor.getDef aultCatalog(DTPDatabaseWrapper.java:475)
>
> at
> org.eclipse.jpt.db.internal.DTPDatabaseWrapper.buildDefaultC atalog(DTPDatabaseWrapper.java:257)
>
> at
> org.eclipse.jpt.db.internal.DTPDatabaseWrapper.getDefaultCat alog(DTPDatabaseWrapper.java:251)
>
> at
> org.eclipse.jpt.db.internal.DTPDatabaseWrapper.getDefaultCat alog(DTPDatabaseWrapper.java:1)
>
> at
> org.eclipse.jpt.core.internal.GenericJpaProject.getDatabaseD efaultDbCatalog(GenericJpaProject.java:283)
>
> at
> org.eclipse.jpt.core.internal.GenericJpaProject.getDatabaseD efaultCatalog(GenericJpaProject.java:277)
>
> at
> org.eclipse.jpt.core.internal.GenericJpaProject.getDefaultCa talog(GenericJpaProject.java:273)
>
> at
> org.eclipse.jpt.core.internal.context.persistence.AbstractPe rsistenceUnit.buildDefaultCatalog(AbstractPersistenceUnit.ja va:1056)
>
> at
> org.eclipse.jpt.core.internal.context.persistence.AbstractPe rsistenceUnit.initializePersistenceUnitDefaults(AbstractPers istenceUnit.java:776)
>
> at
> org.eclipse.jpt.core.internal.context.persistence.AbstractPe rsistenceUnit.initialize(AbstractPersistenceUnit.java:735)
>
> at
> org.eclipse.jpt.eclipselink.core.internal.context.persistenc e.EclipseLinkPersistenceUnit. <init>(EclipseLinkPersistenceUnit.java:78)
>
> at
> org.eclipse.jpt.eclipselink.core.internal.EclipseLinkJpaFact ory.buildPersistenceUnit(EclipseLinkJpaFactory.java:129)
>
> at
> org.eclipse.jpt.core.internal.context.persistence.GenericPer sistence.createPersistenceUnit(GenericPersistence.java:155)
>
> at
> org.eclipse.jpt.core.internal.context.persistence.GenericPer sistence.initializePersistenceUnits(GenericPersistence.java: 128)
>
> at
> org.eclipse.jpt.core.internal.context.persistence.GenericPer sistence.initialize(GenericPersistence.java:122)
>
> at
> org.eclipse.jpt.core.internal.context.persistence.GenericPer sistence. <init>(GenericPersistence.java:43)
>
> at
> org.eclipse.jpt.core.internal.platform.GenericJpaFactory.bui ldPersistence(GenericJpaFactory.java:303)
>
> at
> org.eclipse.jpt.core.internal.context.persistence.GenericPer sistenceXml.buildPersistence(GenericPersistenceXml.java:161)
>
> at
> org.eclipse.jpt.core.internal.context.persistence.GenericPer sistenceXml.initialize(GenericPersistenceXml.java:120)
>
> at
> org.eclipse.jpt.core.internal.context.persistence.GenericPer sistenceXml. <init>(GenericPersistenceXml.java:44)
>
> at
> org.eclipse.jpt.core.internal.platform.GenericJpaFactory.bui ldPersistenceXml(GenericJpaFactory.java:299)
>
> at
> org.eclipse.jpt.core.internal.context.GenericRootContextNode .buildPersistenceXml(GenericRootContextNode.java:178)
>
> at
> org.eclipse.jpt.core.internal.context.GenericRootContextNode . <init>(GenericRootContextNode.java:60)
>
> at
> org.eclipse.jpt.core.internal.platform.GenericJpaFactory.bui ldRootContextNode(GenericJpaFactory.java:282)
>
> at
> org.eclipse.jpt.core.internal.GenericJpaProject.buildRootCon textNode(GenericJpaProject.java:200)
>
> at
> org.eclipse.jpt.core.internal.GenericJpaProject.<init>(GenericJpaProject.java:159)
>
> at
> org.eclipse.jpt.core.internal.platform.GenericJpaFactory.bui ldJpaProject(GenericJpaFactory.java:259)
>
> at
> org.eclipse.jpt.core.internal.GenericJpaModel$DefaultJpaProj ectHolder.buildJpaProject(GenericJpaModel.java:417)
>
> at
> org.eclipse.jpt.core.internal.GenericJpaModel$DefaultJpaProj ectHolder.jpaProject(GenericJpaModel.java:405)
>
> at
> org.eclipse.jpt.core.internal.GenericJpaModel.getJpaProject( GenericJpaModel.java:75)
>
> at
> org.eclipse.jpt.core.internal.JpaModelManager.getJpaProject( JpaModelManager.java:178)
>
> at
> org.eclipse.jpt.core.JptCorePlugin.getJpaProject(JptCorePlug in.java:156)
> at
> org.eclipse.jpt.ui.internal.editors.PersistenceEditor.jpaPro ject(PersistenceEditor.java:303)
>
> at
> org.eclipse.jpt.ui.internal.editors.PersistenceEditor.addPer sistenceUnitPages(PersistenceEditor.java:119)
>
> at
> org.eclipse.jpt.ui.internal.editors.PersistenceEditor.addPag es(PersistenceEditor.java:109)
>
> at
> org.eclipse.ui.forms.editor.FormEditor.createPages(FormEdito r.java:146)
> at
> org.eclipse.ui.part.MultiPageEditorPart.createPartControl(Mu ltiPageEditorPart.java:310)
>
> at
> org.eclipse.ui.internal.EditorReference.createPartHelper(Edi torReference.java:661)
>
> at
> org.eclipse.ui.internal.EditorReference.createPart(EditorRef erence.java:428)
>
> at
> org.eclipse.ui.internal.WorkbenchPartReference.getPart(Workb enchPartReference.java:594)
>
> at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:30 6)
> at
> org.eclipse.ui.internal.presentations.PresentablePart.setVis ible(PresentablePart.java:180)
>
> at
> org.eclipse.ui.internal.presentations.util.PresentablePartFo lder.select(PresentablePartFolder.java:270)
>
> at
> org.eclipse.ui.internal.presentations.util.LeftToRightTabOrd er.select(LeftToRightTabOrder.java:65)
>
> at
> org.eclipse.ui.internal.presentations.util.TabbedStackPresen tation.selectPart(TabbedStackPresentation.java:473)
>
> at
> org.eclipse.ui.internal.PartStack.refreshPresentationSelecti on(PartStack.java:1256)
>
> at org.eclipse.ui.internal.PartStack.setSelection(PartStack.jav a:1209)
> at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:16 08)
> at org.eclipse.ui.internal.PartStack.add(PartStack.java:499)
> at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:103 )
> at org.eclipse.ui.internal.PartStack.add(PartStack.java:485)
> at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:112 )
> at
> org.eclipse.ui.internal.EditorSashContainer.addEditor(Editor SashContainer.java:63)
>
> at
> org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorA reaHelper.java:217)
>
> at
> org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAre aHelper.java:207)
>
> at
> org.eclipse.ui.internal.EditorManager.createEditorTab(Editor Manager.java:779)
>
> at
> org.eclipse.ui.internal.EditorManager.openEditorFromDescript or(EditorManager.java:678)
>
> at
> org.eclipse.ui.internal.EditorManager.openEditor(EditorManag er.java:639)
> at
> org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched( WorkbenchPage.java:2817)
>
> at
> org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(Workben chPage.java:2729)
>
> at
> org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPag e.java:2721)
> at
> org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.j ava:2673)
> at
> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:70)
> at
> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2668)
> at
> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2652)
> at
> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2643)
> at org.eclipse.ui.ide.IDE.openEditor(IDE.java:646)
> at org.eclipse.ui.ide.IDE.openEditor(IDE.java:605)
> at
> org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInE ditor(EditorUtility.java:318)
>
> at
> org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInE ditor(EditorUtility.java:160)
>
> at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:22 8)
> at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:20 7)
> at
> org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchR un(SelectionDispatchAction.java:274)
>
> at
> org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(Selec tionDispatchAction.java:250)
>
> at
> org.eclipse.jdt.internal.ui.navigator.OpenAndExpand.run(Open AndExpand.java:50)
>
> at org.eclipse.ui.actions.RetargetAction.run(RetargetAction.jav a:221)
> at
> org.eclipse.ui.internal.navigator.CommonNavigatorManager$3.o pen(CommonNavigatorManager.java:184)
>
> at
> org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredV iewer.java:820)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
> at org.eclipse.core.runtime.Platform.run(Platform.java:880)
> at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48)
> at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:17 5)
> at
> org.eclipse.jface.viewers.StructuredViewer.fireOpen(Structur edViewer.java:818)
>
> at
> org.eclipse.jface.viewers.StructuredViewer.handleOpen(Struct uredViewer.java:1079)
>
> at
> org.eclipse.ui.navigator.CommonViewer.handleOpen(CommonViewe r.java:372)
> at
> org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(Stru cturedViewer.java:1183)
>
> at
> org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrate gy.java:263)
> at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.ja va:257)
> at
> org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrate gy.java:297)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3823)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3422)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2384)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2348)
> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 00)
> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:495)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:288)
>
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:490)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
> at
> org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:113)
>
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:193)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:386)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
>
> 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.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 549)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
>
>
>
>
Re: Generate Entities from Tables not working [message #615754 is a reply to message #435498] Wed, 18 March 2009 22:59 Go to previous messageGo to next message
Bill Blalock is currently offline Bill Blalock
Messages: 118
Registered: July 2009
Location: Alabama
Senior Member
Brian:

Thanks for the information.

> Are you using a vanilla Eclipse JEE workspace? Or are you us>ing additional
plug-ins? Do these plug-ins provide the DB2 adapter for DTP?

I built a new Eclipse using the downloads listed as required on the
release build R-3.0.4-20090213193639 page. I got this from the Dali
Project Summary Page, Release section, 2.2 link. The URL is:

http://download.eclipse.org/webtools/downloads/drops/R3.0/R- 3.0.4-20090213193639/

These are the parts I used to build this Eclipse:

Eclipse Platform (Platform, JDT) eclipse-SDK-3.4.2-win32.zip EMF 2.4.2
Runtime Minimum executable code. emf-runtime-2.4.2.zip
EMF XSD 2.4.2 Runtime Minimum executable code. xsd-runtime-2.4.2.zip
Graphical Editing Framework (GEF) GEF-SDK-3.4.2.zip
Data Tools Platform (DTP) (required only for EJB or JPT development)

> if you try out a more current release (e.g. WTP 3.1 M6 is set to be
> released soon).

I'll do that and try debugging as you suggested.

Thanks
Bill Blalock
Re: Generate Entities from Tables not working [message #615755 is a reply to message #435502] Thu, 19 March 2009 19:16 Go to previous messageGo to next message
Neil Hauge is currently offline Neil Hauge
Messages: 469
Registered: July 2009
Senior Member
Bill,

Just so you know, the version of Dali you are referencing does not contain
the recent changes that Brian was referring to. If you want to look at
how things used to work, use this version of WTP/Dali. If you want to
look at the way things work now, try Dali 2.1.1 -
http://download.eclipse.org/webtools/downloads/drops/R2.1/R- 2.1.1-20090226062131/
Or WTP/Dali 3.1/2.2M6 -
http://download.eclipse.org/webtools/downloads/drops/R3.1/S- 3.1M6-20090318020101/

> I built a new Eclipse using the downloads listed as required on the
> release build R-3.0.4-20090213193639 page. I got this from the Dali
> Project Summary Page, Release section, 2.2 link. The URL is:

>
http://download.eclipse.org/webtools/downloads/drops/R3.0/R- 3.0.4-20090213193639/

Neil
Re: Generate Entities from Tables not working [message #615761 is a reply to message #435503] Mon, 23 March 2009 21:11 Go to previous messageGo to previous message
Bill Blalock is currently offline Bill Blalock
Messages: 118
Registered: July 2009
Location: Alabama
Senior Member
Neil:

I tried WTP/Dali 3.1/2.2 M6 -

http://download.eclipse.org/webtools/downloads/drops/R3.1/S- 3.1M6-20090318020101/

with newly released Eclipselink 1.1

I am still getting similar results. Some of the problems:

Project > properties > Java Persistence
Override default catalog from connection DOES see the catalog on the i5
Override default schema from connection DOES NOT not any schemas.
It sees the catalog of the i5, that seems to indicate the connection is
partially working.

Java Editor throws validation errors when the database is connected.

New > JPA > Generate Entity From Table
Does not show any schemas when the database is connected.

The schema and table names on this i5 are not SQL friendly. Could that be
a problem? Our schema and table names include these special characters.

@ $ # and digits 0 - 9.

Our schema and table names start with a letter, @, $ or #. The data
source explorer handles this. Could this non-standard table and schema
names be the cause of the problem?

These are the key errors begin logged. It looks like each time the schema
is requested there is a failure logged. My experiments boil down to three
initial errors (for the three problems I listed above?)

java.lang.NullPointerException
at
org.eclipse.jpt.ui.internal.wizards.gen.TableAssociationsWiz ardPage.updateAssociationsListPanel(TableAssociationsWizardP age.java:560)

java.lang.NullPointerException
at
org.eclipse.jpt.ui.internal.wizards.gen.TablesAndColumnsCust omizationWizardPage.setVisible(TablesAndColumnsCustomization WizardPage.java:149)

java.lang.NullPointerException
at
org.eclipse.jpt.ui.internal.wizards.gen.GenerateEntitiesFrom SchemaWizard.performFinish(GenerateEntitiesFromSchemaWizard. java:206)


Over the next few days I am going to try debugging as suggested earlier in
this thread.


Thanks
Bill Blalock
Previous Topic:[SOLVED] MySql Mapping BOOL -> byte must involve in BOOL -> Boolean
Next Topic:orphanRemoval=true
Goto Forum:
  


Current Time: Fri Oct 24 08:32:17 GMT 2014

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

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