Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dali » Unable to create jpaDetailsView
Unable to create jpaDetailsView [message #434512] Fri, 06 July 2007 06:05 Go to next message
Florian Reiser is currently offline Florian ReiserFriend
Messages: 25
Registered: July 2009
Junior Member
Hello,

I have created a entity bean 3.0 in eclipse 3.3
When closing eclipse and restarting, I couldn't start it anymore because
I did not activate the autoconnect on my database connection.

After getting eclipse to work by manually deleting the editors section out
of workbench.xml, I now get the following error.

What can I do to get it working again?

With kind regards
Florian Reiser
http://www.ra-bc.de

---- Error display ---

Unable to create view ID org.eclipse.jpt.ui.jpaDetailsView:
org.eclipse.jdt.core.dom.InfixExpression

Stack trace:

java.lang.ClassCastException: org.eclipse.jdt.core.dom.InfixExpression
at
org.eclipse.jpt.core.internal.jdtutility.StringExpressionCon verter.convert_(StringExpressionConverter.java:1)
at
org.eclipse.jpt.core.internal.jdtutility.AbstractExpressionC onverter.convert(AbstractExpressionConverter.java:40)
at
org.eclipse.jpt.core.internal.jdtutility.ConversionDeclarati onAnnotationElementAdapter.getValue(ConversionDeclarationAnn otationElementAdapter.java:95)
at
org.eclipse.jpt.core.internal.jdtutility.MemberAnnotationEle mentAdapter.getValue(MemberAnnotationElementAdapter.java:43)
at
org.eclipse.jpt.core.internal.jdtutility.ShortCircuitAnnotat ionElementAdapter.getValue(ShortCircuitAnnotationElementAdap ter.java:47)
at
org.eclipse.jpt.core.internal.content.java.mappings.JavaAbst ractQuery.updateFromJava(JavaAbstractQuery.java:553)
at
org.eclipse.jpt.core.internal.content.java.mappings.JavaEnti ty.updateNamedQueriesFromJava(JavaEntity.java:2629)
at
org.eclipse.jpt.core.internal.content.java.mappings.JavaEnti ty.updateFromJava(JavaEntity.java:2377)
at
org.eclipse.jpt.core.internal.content.java.JavaPersistentTyp e.updateFromJava(JavaPersistentType.java:670)
at
org.eclipse.jpt.core.internal.content.java.JpaCompilationUni t.synchronizePersistentTypes(JpaCompilationUnit.java:406)
at
org.eclipse.jpt.core.internal.content.java.JpaCompilationUni t.setFile(JpaCompilationUnit.java:325)
at
org.eclipse.jpt.core.internal.content.java.JavaJpaFileConten tProvider.buildRootContent(JavaJpaFileContentProvider.java:3 0)
at
org.eclipse.jpt.core.internal.JpaFileContentRegistry.buildCo ntent(JpaFileContentRegistry.java:60)
at
org.eclipse.jpt.core.internal.JpaFileContentRegistry.getFile (JpaFileContentRegistry.java:44)
at
org.eclipse.jpt.core.internal.JpaProject.createJpaFile(JpaPr oject.java:630)
at org.eclipse.jpt.core.internal.JpaProject.getJpaFile(JpaProje ct.java:518)
at
org.eclipse.jpt.core.internal.JpaModelManager.getJpaFile(Jpa ModelManager.java:238)
at
org.eclipse.jpt.core.internal.JptCorePlugin.getJpaFile(JptCo rePlugin.java:91)
at
org.eclipse.jpt.ui.internal.selection.TextEditorSelectionPar ticipant.persistenceFileFor(TextEditorSelectionParticipant.j ava:115)
at
org.eclipse.jpt.ui.internal.selection.TextEditorSelectionPar ticipant.calculateSelection(TextEditorSelectionParticipant.j ava:88)
at
org.eclipse.jpt.ui.internal.selection.TextEditorSelectionPar ticipant. <init>(TextEditorSelectionParticipant.java:49)
at
org.eclipse.jpt.ui.internal.selection.SelectionParticipantFa ctory.getAdapter(SelectionParticipantFactory.java:30)
at
org.eclipse.core.internal.runtime.AdapterFactoryProxy.getAda pter(AdapterFactoryProxy.java:61)
at
org.eclipse.core.internal.runtime.AdapterManager.getAdapter( AdapterManager.java:277)
at org.eclipse.ui.part.WorkbenchPart.getAdapter(WorkbenchPart.j ava:150)
at
org.eclipse.ui.texteditor.AbstractTextEditor.getAdapter(Abst ractTextEditor.java:5786)
at
org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.getAda pter(AbstractDecoratedTextEditor.java:1175)
at
org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.getAdapter (JavaEditor.java:1826)
at
org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor .getAdapter(CompilationUnitEditor.java:1683)
at
org.eclipse.jpt.ui.internal.selection.SelectionManager.initP art(SelectionManager.java:87)
at
org.eclipse.jpt.ui.internal.selection.SelectionManager.initP age(SelectionManager.java:71)
at
org.eclipse.jpt.ui.internal.selection.SelectionManager.init( SelectionManager.java:63)
at
org.eclipse.jpt.ui.internal.selection.SelectionManagerFactor y.internalGetSelectionManager(SelectionManagerFactory.java:7 8)
at
org.eclipse.jpt.ui.internal.selection.SelectionManagerFactor y.getSelectionManager(SelectionManagerFactory.java:47)
at
org.eclipse.jpt.ui.internal.views.AbstractJpaView.createPart Control(AbstractJpaView.java:52)
at
org.eclipse.ui.internal.ViewReference.createPartHelper(ViewR eference.java:370)
at org.eclipse.ui.internal.ViewReference.createPart(ViewReferen ce.java:227)
at
org.eclipse.ui.internal.WorkbenchPartReference.getPart(Workb enchPartReference.java:592)
at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:29 9)
at org.eclipse.ui.internal.ViewPane.setVisible(ViewPane.java:53 1)
at
org.eclipse.ui.internal.presentations.PresentablePart.setVis ible(PresentablePart.java:179)
at
org.eclipse.ui.internal.presentations.util.PresentablePartFo lder.select(PresentablePartFolder.java:268)
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:400)
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 04)
at org.eclipse.ui.internal.PartStack.createControl(PartStack.ja va:649)
at org.eclipse.ui.internal.PartStack.createControl(PartStack.ja va:576)
at
org.eclipse.ui.internal.PartSashContainer.createControl(Part SashContainer.java:563)
at
org.eclipse.ui.internal.PerspectiveHelper.activate(Perspecti veHelper.java:270)
at org.eclipse.ui.internal.Perspective.onActivate(Perspective.j ava:931)
at
org.eclipse.ui.internal.WorkbenchPage.setPerspective(Workben chPage.java:3461)
at
org.eclipse.ui.internal.WorkbenchPage.busySetPerspective(Wor kbenchPage.java:988)
at org.eclipse.ui.internal.WorkbenchPage.access$17(WorkbenchPag e.java:972)
at org.eclipse.ui.internal.WorkbenchPage$18.run(WorkbenchPage.j ava:3560)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
at
org.eclipse.ui.internal.WorkbenchPage.setPerspective(Workben chPage.java:3558)
at
org.eclipse.ui.internal.ChangeToPerspectiveMenu.run(ChangeTo PerspectiveMenu.java:92)
at org.eclipse.ui.actions.PerspectiveMenu.run(PerspectiveMenu.j ava:336)
at
org.eclipse.ui.actions.PerspectiveMenu.runOther(PerspectiveM enu.java:352)
at
org.eclipse.ui.actions.PerspectiveMenu$3.runWithEvent(Perspe ctiveMenu.java:108)
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:545)
at
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:490)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:402)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3682)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3293)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 19)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:289)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:106)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:153)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:106)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:76)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:363)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:176)
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: 504)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
at org.eclipse.equinox.launcher.Main.run(Main.java:1169)
at org.eclipse.equinox.launcher.Main.main(Main.java:1144)
Re: Unable to create jpaDetailsView [message #434513 is a reply to message #434512] Fri, 06 July 2007 15:58 Go to previous messageGo to next message
Brian Vosburgh is currently offline Brian VosburghFriend
Messages: 137
Registered: July 2009
Senior Member
Hello, Florian.

This looks like a bug in Dali. I think you must have an infix expression
in an annotation where Dali is expecting a string expression. We have a
check for the expression type, but that check comes too late to prevent the
class cast exception that occurs when the class is fetched. We are not
quite to full understanding of the ramifications of Generics. :-)

You might look for an annotation that looks like this:

@NamedQuery(query=5+3)

the 'query' should be string expression:

@NamedQuery(query="5+3")

Could you please file a bug for this problem. Thanks.

Brian

Florian Reiser wrote:
> Hello,
>
> I have created a entity bean 3.0 in eclipse 3.3
> When closing eclipse and restarting, I couldn't start it anymore because
> I did not activate the autoconnect on my database connection.
>
> After getting eclipse to work by manually deleting the editors section
> out of workbench.xml, I now get the following error.
>
> What can I do to get it working again?
>
> With kind regards
> Florian Reiser
> http://www.ra-bc.de
>
> ---- Error display ---
>
> Unable to create view ID org.eclipse.jpt.ui.jpaDetailsView:
> org.eclipse.jdt.core.dom.InfixExpression
>
> Stack trace:
>
> java.lang.ClassCastException: org.eclipse.jdt.core.dom.InfixExpression
> at
> org.eclipse.jpt.core.internal.jdtutility.StringExpressionCon verter.convert_(StringExpressionConverter.java:1)
>
> at
> org.eclipse.jpt.core.internal.jdtutility.AbstractExpressionC onverter.convert(AbstractExpressionConverter.java:40)
>
> at
> org.eclipse.jpt.core.internal.jdtutility.ConversionDeclarati onAnnotationElementAdapter.getValue(ConversionDeclarationAnn otationElementAdapter.java:95)
>
> at
> org.eclipse.jpt.core.internal.jdtutility.MemberAnnotationEle mentAdapter.getValue(MemberAnnotationElementAdapter.java:43)
>
> at
> org.eclipse.jpt.core.internal.jdtutility.ShortCircuitAnnotat ionElementAdapter.getValue(ShortCircuitAnnotationElementAdap ter.java:47)
>
> at
> org.eclipse.jpt.core.internal.content.java.mappings.JavaAbst ractQuery.updateFromJava(JavaAbstractQuery.java:553)
>
> at
> org.eclipse.jpt.core.internal.content.java.mappings.JavaEnti ty.updateNamedQueriesFromJava(JavaEntity.java:2629)
>
> at
> org.eclipse.jpt.core.internal.content.java.mappings.JavaEnti ty.updateFromJava(JavaEntity.java:2377)
>
> at
> org.eclipse.jpt.core.internal.content.java.JavaPersistentTyp e.updateFromJava(JavaPersistentType.java:670)
>
> at
> org.eclipse.jpt.core.internal.content.java.JpaCompilationUni t.synchronizePersistentTypes(JpaCompilationUnit.java:406)
>
> at
> org.eclipse.jpt.core.internal.content.java.JpaCompilationUni t.setFile(JpaCompilationUnit.java:325)
>
> at
> org.eclipse.jpt.core.internal.content.java.JavaJpaFileConten tProvider.buildRootContent(JavaJpaFileContentProvider.java:3 0)
>
> at
> org.eclipse.jpt.core.internal.JpaFileContentRegistry.buildCo ntent(JpaFileContentRegistry.java:60)
>
> at
> org.eclipse.jpt.core.internal.JpaFileContentRegistry.getFile (JpaFileContentRegistry.java:44)
>
> at
> org.eclipse.jpt.core.internal.JpaProject.createJpaFile(JpaPr oject.java:630)
> at org.eclipse.jpt.core.internal.JpaProject.getJpaFile(JpaProje ct.java:518)
> at
> org.eclipse.jpt.core.internal.JpaModelManager.getJpaFile(Jpa ModelManager.java:238)
>
> at
> org.eclipse.jpt.core.internal.JptCorePlugin.getJpaFile(JptCo rePlugin.java:91)
>
> at
> org.eclipse.jpt.ui.internal.selection.TextEditorSelectionPar ticipant.persistenceFileFor(TextEditorSelectionParticipant.j ava:115)
>
> at
> org.eclipse.jpt.ui.internal.selection.TextEditorSelectionPar ticipant.calculateSelection(TextEditorSelectionParticipant.j ava:88)
>
> at
> org.eclipse.jpt.ui.internal.selection.TextEditorSelectionPar ticipant. <init>(TextEditorSelectionParticipant.java:49)
>
> at
> org.eclipse.jpt.ui.internal.selection.SelectionParticipantFa ctory.getAdapter(SelectionParticipantFactory.java:30)
>
> at
> org.eclipse.core.internal.runtime.AdapterFactoryProxy.getAda pter(AdapterFactoryProxy.java:61)
>
> at
> org.eclipse.core.internal.runtime.AdapterManager.getAdapter( AdapterManager.java:277)
>
> at org.eclipse.ui.part.WorkbenchPart.getAdapter(WorkbenchPart.j ava:150)
> at
> org.eclipse.ui.texteditor.AbstractTextEditor.getAdapter(Abst ractTextEditor.java:5786)
>
> at
> org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.getAda pter(AbstractDecoratedTextEditor.java:1175)
>
> at
> org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.getAdapter (JavaEditor.java:1826)
>
> at
> org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor .getAdapter(CompilationUnitEditor.java:1683)
>
> at
> org.eclipse.jpt.ui.internal.selection.SelectionManager.initP art(SelectionManager.java:87)
>
> at
> org.eclipse.jpt.ui.internal.selection.SelectionManager.initP age(SelectionManager.java:71)
>
> at
> org.eclipse.jpt.ui.internal.selection.SelectionManager.init( SelectionManager.java:63)
>
> at
> org.eclipse.jpt.ui.internal.selection.SelectionManagerFactor y.internalGetSelectionManager(SelectionManagerFactory.java:7 8)
>
> at
> org.eclipse.jpt.ui.internal.selection.SelectionManagerFactor y.getSelectionManager(SelectionManagerFactory.java:47)
>
> at
> org.eclipse.jpt.ui.internal.views.AbstractJpaView.createPart Control(AbstractJpaView.java:52)
>
> at
> org.eclipse.ui.internal.ViewReference.createPartHelper(ViewR eference.java:370)
>
> at org.eclipse.ui.internal.ViewReference.createPart(ViewReferen ce.java:227)
> at
> org.eclipse.ui.internal.WorkbenchPartReference.getPart(Workb enchPartReference.java:592)
>
> at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:29 9)
> at org.eclipse.ui.internal.ViewPane.setVisible(ViewPane.java:53 1)
> at
> org.eclipse.ui.internal.presentations.PresentablePart.setVis ible(PresentablePart.java:179)
>
> at
> org.eclipse.ui.internal.presentations.util.PresentablePartFo lder.select(PresentablePartFolder.java:268)
>
> 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:400)
>
> 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 04)
> at org.eclipse.ui.internal.PartStack.createControl(PartStack.ja va:649)
> at org.eclipse.ui.internal.PartStack.createControl(PartStack.ja va:576)
> at
> org.eclipse.ui.internal.PartSashContainer.createControl(Part SashContainer.java:563)
>
> at
> org.eclipse.ui.internal.PerspectiveHelper.activate(Perspecti veHelper.java:270)
>
> at org.eclipse.ui.internal.Perspective.onActivate(Perspective.j ava:931)
> at
> org.eclipse.ui.internal.WorkbenchPage.setPerspective(Workben chPage.java:3461)
>
> at
> org.eclipse.ui.internal.WorkbenchPage.busySetPerspective(Wor kbenchPage.java:988)
>
> at org.eclipse.ui.internal.WorkbenchPage.access$17(WorkbenchPag e.java:972)
> at org.eclipse.ui.internal.WorkbenchPage$18.run(WorkbenchPage.j ava:3560)
> at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
> at
> org.eclipse.ui.internal.WorkbenchPage.setPerspective(Workben chPage.java:3558)
>
> at
> org.eclipse.ui.internal.ChangeToPerspectiveMenu.run(ChangeTo PerspectiveMenu.java:92)
>
> at org.eclipse.ui.actions.PerspectiveMenu.run(PerspectiveMenu.j ava:336)
> at
> org.eclipse.ui.actions.PerspectiveMenu.runOther(PerspectiveM enu.java:352)
> at
> org.eclipse.ui.actions.PerspectiveMenu$3.runWithEvent(Perspe ctiveMenu.java:108)
>
> at
> org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:545)
>
> at
> org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:490)
>
> at
> org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:402)
>
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3682)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3293)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2389)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 19)
> at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:289)
>
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:461)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
> at
> org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:106)
>
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:153)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:106)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:76)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:363)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:176)
>
> 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: 504)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1169)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1144)
>
>
Re: A Dali full of bugs [message #434514 is a reply to message #434513] Sat, 14 July 2007 00:05 Go to previous messageGo to next message
Sanjay Kumar is currently offline Sanjay KumarFriend
Messages: 13
Registered: July 2009
Junior Member
I am getting similar and lots of other errors using Dali 1.0.

I am running WTP 2.0 on Vista 64-bit with JDK 1.5.12 (32-bit) VM.

I have a working JPA project in JDeveloper that I am trying to migrate to
Dali.(I have same project setup in NetBeans and I use it to generate
generated entities).

First exception occurs when I start Eclipse with JPA project.
It says error "Initializing JPA model - an error occured while traversing
resources." Stack trace shows "java.lang.ClassCastException:
org.eclipse.jdt.core.dom.InfixExpression". Apparantly its a known bug.

Then I get "unhandled event loop exception" trying to create entities from
database. I have valid connection to Postgres and Data Source explorer
shows tables. Yet, stacktrace shows:

java.util.NoSuchElementException
at
org.eclipse.jpt.db.internal.DTPDatabaseWrapper.getDefaultCat alogName(DTPDatabaseWrapper.java:200)

Does this thing work with anything other than Oracle ?

Then tons of errors like "xyz" (Entity class name) is not spelled corectly
in persistence.xml file. Why ? The same persistence.xml works perfectly
fine in JDeveloper and NetBeans. This may be result of above errors but
messages are certainly not very helpfully.

Similarly can't specify "provider" in persistence.xml (under
persistence-unit) either. Not compliant with schema. News to me.

I would have thought after three years of development and a production
release label "1.0" - Dali would be a useful tool. Unfortunately I am
little disappointed.

-Sanjay
Re: A Dali full of bugs [message #434515 is a reply to message #434514] Mon, 16 July 2007 16:21 Go to previous messageGo to next message
Neil Hauge is currently offline Neil HaugeFriend
Messages: 475
Registered: July 2009
Senior Member
Hi Sanjay,

Sorry that you are having a number of issues with the latest code. Let me
try to address some of them and hopefully get a little more feedback on
some of the issues.

> First exception occurs when I start Eclipse with JPA project.
> It says error "Initializing JPA model - an error occured while traversing
> resources." Stack trace shows "java.lang.ClassCastException:
> org.eclipse.jdt.core.dom.InfixExpression". Apparantly its a known bug.

This is something that we hadn't encountered before the release by us or
apparently by the community. It seems that since we do have a 1.0 out
now, we are getting more diverse usage of the tools, and this is driving
out some new issues. Given the severity of this item, we will work to fix
it quickly.

> Then I get "unhandled event loop exception" trying to create entities from
> database. I have valid connection to Postgres and Data Source explorer
> shows tables. Yet, stacktrace shows:

> java.util.NoSuchElementException
> at
>
org.eclipse.jpt.db.internal.DTPDatabaseWrapper.getDefaultCat alogName(DTPDatabaseWrapper.java:200)

> Does this thing work with anything other than Oracle ?

We have done testing with PostgreSQL and have successfully worked with and
generated entities from PostgreSQL and many other databases. We actually
fixed a related problem with PostgreSQL late in the release cycle, but I
assume you are running the final release. What version of PostgreSQL are
you using, and is there any more error information you can provide from
the log?

> Then tons of errors like "xyz" (Entity class name) is not spelled corectly
> in persistence.xml file. Why ? The same persistence.xml works perfectly
> fine in JDeveloper and NetBeans. This may be result of above errors but
> messages are certainly not very helpfully.

This is actually new functionality in the Platform and can be
altered/disabled in the preferences under General->Editors->Text
Editors->Spelling.

> Similarly can't specify "provider" in persistence.xml (under
> persistence-unit) either. Not compliant with schema. News to me.

This is not a Dali error, but is coming from the default schema
validation. Not sure how you are specifying the provider, but I don't get
any complaints with:

<persistence-unit name="FooUnit">
<provider>Foo</provider>
...

Perhaps you are picking up an invalid schema?

> I would have thought after three years of development and a production
> release label "1.0" - Dali would be a useful tool. Unfortunately I am
> little disappointed.

The project was actually created in the summer of 2005, so we've only been
going for about 2 years. Even though that seems like a decent amount of
time, the scope and complexity of building tools for JPA (in the way we
have chosen to do so) is impressive, especially when you add the
requirement of extensibility. We are happy to have something out that
will provide more feedback and bug reports so we can improve Dali as the
project progresses.

Thanks for your feedback,
Neil


> -Sanjay
Re: A Dali full of bugs [message #434517 is a reply to message #434515] Tue, 17 July 2007 10:19 Go to previous messageGo to next message
Sanjay Kumar is currently offline Sanjay KumarFriend
Messages: 13
Registered: July 2009
Junior Member
Neil Hauge wrote:

> Hi Sanjay,

> We have done testing with PostgreSQL and have successfully worked with and
> generated entities from PostgreSQL and many other databases. We actually
> fixed a related problem with PostgreSQL late in the release cycle, but I
> assume you are running the final release. What version of PostgreSQL are
> you using, and is there any more error information you can provide from
> the log?

Here is the stack trace of "Unhandled event loop exception" I am getting
trying to generate Entities from tables in a JPA project created from
scratch. I am using Vista 64-bit with JDK 1.5.12 going against Postgres
8.1 on Linux. Data source explorer shows the data source and its tables.
Any help would be appreciated. Thanks.

-Sanjay

eclipse.buildId=I20070625-1500
java.version=1.5.0_12
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments: -os win32 -ws win32 -arch x86

Error
Tue Jul 17 06:10:26 EDT 2007
Unhandled event loop exception

java.util.NoSuchElementException
at
org.eclipse.jpt.db.internal.DTPDatabaseWrapper.getDefaultCat alogName(DTPDatabaseWrapper.java:200)
at
org.eclipse.jpt.db.internal.ConnectionProfile.setDefaultCata logName(ConnectionProfile.java:156)
at
org.eclipse.jpt.db.internal.ConnectionProfile.getDatabase(Co nnectionProfile.java:102)
at
org.eclipse.jpt.ui.internal.wizards.GenerateEntitiesWizard.g etProjectUserSchema(GenerateEntitiesWizard.java:125)
at
org.eclipse.jpt.ui.internal.wizards.GenerateEntitiesWizard.p rojectUserSchemaExists(GenerateEntitiesWizard.java:157)
at
org.eclipse.jpt.ui.internal.wizards.GenerateEntitiesWizard.a ddPages(GenerateEntitiesWizard.java:58)
at
org.eclipse.jface.wizard.WizardDialog.createContents(WizardD ialog.java:540)
at org.eclipse.jface.window.Window.create(Window.java:426)
at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1081)
at
org.eclipse.jpt.ui.internal.generic.EntitiesGenerator.genera te(EntitiesGenerator.java:75)
at
org.eclipse.jpt.ui.internal.generic.EntitiesGenerator.genera te(EntitiesGenerator.java:56)
at
org.eclipse.jpt.ui.internal.BaseJpaPlatformUi.generateEntiti es(BaseJpaPlatformUi.java:66)
at
org.eclipse.jpt.ui.internal.actions.GenerateEntitiesAction.e xecute(GenerateEntitiesAction.java:27)
at
org.eclipse.jpt.ui.internal.actions.ProjectAction.execute(Pr ojectAction.java:90)
at
org.eclipse.jpt.ui.internal.actions.ProjectAction.execute(Pr ojectAction.java:71)
at
org.eclipse.jpt.ui.internal.actions.ProjectAction.run(Projec tAction.java:63)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginActi on.java:256)
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:545)
at
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:490)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:402)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3682)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3293)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 19)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:289)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:106)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:153)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:106)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:76)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:363)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:176)
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: 504)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
at org.eclipse.equinox.launcher.Main.run(Main.java:1169)
Re: A Dali full of bugs [message #434518 is a reply to message #434517] Wed, 18 July 2007 12:20 Go to previous messageGo to next message
Sanjay Kumar is currently offline Sanjay KumarFriend
Messages: 13
Registered: July 2009
Junior Member
Guys,

any clues on this ?
I get unhandled loop exception trying to generate entities from tables.
Connection seems fine in Data Source explorer - but Dali doesn't see that
its connecteds. It says "Must have an active connection to see schema".
"Reconnect" doesn't do anything either.

thanks,

-Sanjay
Re: A Dali full of bugs [message #434519 is a reply to message #434518] Wed, 18 July 2007 16:36 Go to previous messageGo to next message
Neil Hauge is currently offline Neil HaugeFriend
Messages: 475
Registered: July 2009
Senior Member
Sanjay,

Give this a try. Create or use an existing orm.xml file and set the
Catalog field in the Persistent Unit Defaults to your database catalog
name. By default this is the same as the database name for PostgreSQL,
but perhaps it is not in your case, which is what is causing the default
not to work for entity gen.

Make sure you have a live connection to the DB and then try to generate
Entities.

It would be helpful to know the following connection information so we can
try to determine what the problem is.

Database Name:
Catalog Name:
Schema Name:
User Name:

Thanks,
Neil


Sanjay Kumar wrote:

> Guys,

> any clues on this ?
> I get unhandled loop exception trying to generate entities from tables.
> Connection seems fine in Data Source explorer - but Dali doesn't see that
> its connecteds. It says "Must have an active connection to see schema".
> "Reconnect" doesn't do anything either.

> thanks,

> -Sanjay
Re: A Dali full of bugs [message #434535 is a reply to message #434519] Thu, 02 August 2007 01:57 Go to previous messageGo to next message
Sanjay Kumar is currently offline Sanjay KumarFriend
Messages: 13
Registered: July 2009
Junior Member
Neil,

In my case it appears unless username = database name ( which in turn is
same as catalog name) it doesn't work. When I bring up Entity gen, it
fails to show drop down for schema and throws the exception.

database: custinfo
catalog: custinfo
schema: public
username: skumar

This fails.

But when I create a new user custinfo, Entity Gen works fine.

I see your comments in Bug 193879. This may be related. I have added my
vote.

thanks,

-Sanjay
Re: A Dali full of bugs [message #434542 is a reply to message #434535] Tue, 07 August 2007 20:01 Go to previous message
Neil Hauge is currently offline Neil HaugeFriend
Messages: 475
Registered: July 2009
Senior Member
Sanjay,

Sorry for the delay but I missed your response below. I think part of the
problem might be your database name setting in your connection info. Can
you verify that the database name in your connection definition is
"custinfo"?

This won't help with the bug your referenced, but it should at least allow
you to generate entities.

Neil

Sanjay Kumar wrote:

> Neil,

> In my case it appears unless username = database name ( which in turn is
> same as catalog name) it doesn't work. When I bring up Entity gen, it
> fails to show drop down for schema and throws the exception.

> database: custinfo
> catalog: custinfo
> schema: public
> username: skumar

> This fails.

> But when I create a new user custinfo, Entity Gen works fine.

> I see your comments in Bug 193879. This may be related. I have added my
> vote.

> thanks,

> -Sanjay
Re: Unable to create jpaDetailsView [message #602425 is a reply to message #434512] Fri, 06 July 2007 15:58 Go to previous message
Brian Vosburgh is currently offline Brian VosburghFriend
Messages: 137
Registered: July 2009
Senior Member
Hello, Florian.

This looks like a bug in Dali. I think you must have an infix expression
in an annotation where Dali is expecting a string expression. We have a
check for the expression type, but that check comes too late to prevent the
class cast exception that occurs when the class is fetched. We are not
quite to full understanding of the ramifications of Generics. :-)

You might look for an annotation that looks like this:

@NamedQuery(query=5+3)

the 'query' should be string expression:

@NamedQuery(query="5+3")

Could you please file a bug for this problem. Thanks.

Brian

Florian Reiser wrote:
> Hello,
>
> I have created a entity bean 3.0 in eclipse 3.3
> When closing eclipse and restarting, I couldn't start it anymore because
> I did not activate the autoconnect on my database connection.
>
> After getting eclipse to work by manually deleting the editors section
> out of workbench.xml, I now get the following error.
>
> What can I do to get it working again?
>
> With kind regards
> Florian Reiser
> http://www.ra-bc.de
>
> ---- Error display ---
>
> Unable to create view ID org.eclipse.jpt.ui.jpaDetailsView:
> org.eclipse.jdt.core.dom.InfixExpression
>
> Stack trace:
>
> java.lang.ClassCastException: org.eclipse.jdt.core.dom.InfixExpression
> at
> org.eclipse.jpt.core.internal.jdtutility.StringExpressionCon verter.convert_(StringExpressionConverter.java:1)
>
> at
> org.eclipse.jpt.core.internal.jdtutility.AbstractExpressionC onverter.convert(AbstractExpressionConverter.java:40)
>
> at
> org.eclipse.jpt.core.internal.jdtutility.ConversionDeclarati onAnnotationElementAdapter.getValue(ConversionDeclarationAnn otationElementAdapter.java:95)
>
> at
> org.eclipse.jpt.core.internal.jdtutility.MemberAnnotationEle mentAdapter.getValue(MemberAnnotationElementAdapter.java:43)
>
> at
> org.eclipse.jpt.core.internal.jdtutility.ShortCircuitAnnotat ionElementAdapter.getValue(ShortCircuitAnnotationElementAdap ter.java:47)
>
> at
> org.eclipse.jpt.core.internal.content.java.mappings.JavaAbst ractQuery.updateFromJava(JavaAbstractQuery.java:553)
>
> at
> org.eclipse.jpt.core.internal.content.java.mappings.JavaEnti ty.updateNamedQueriesFromJava(JavaEntity.java:2629)
>
> at
> org.eclipse.jpt.core.internal.content.java.mappings.JavaEnti ty.updateFromJava(JavaEntity.java:2377)
>
> at
> org.eclipse.jpt.core.internal.content.java.JavaPersistentTyp e.updateFromJava(JavaPersistentType.java:670)
>
> at
> org.eclipse.jpt.core.internal.content.java.JpaCompilationUni t.synchronizePersistentTypes(JpaCompilationUnit.java:406)
>
> at
> org.eclipse.jpt.core.internal.content.java.JpaCompilationUni t.setFile(JpaCompilationUnit.java:325)
>
> at
> org.eclipse.jpt.core.internal.content.java.JavaJpaFileConten tProvider.buildRootContent(JavaJpaFileContentProvider.java:3 0)
>
> at
> org.eclipse.jpt.core.internal.JpaFileContentRegistry.buildCo ntent(JpaFileContentRegistry.java:60)
>
> at
> org.eclipse.jpt.core.internal.JpaFileContentRegistry.getFile (JpaFileContentRegistry.java:44)
>
> at
> org.eclipse.jpt.core.internal.JpaProject.createJpaFile(JpaPr oject.java:630)
> at org.eclipse.jpt.core.internal.JpaProject.getJpaFile(JpaProje ct.java:518)
> at
> org.eclipse.jpt.core.internal.JpaModelManager.getJpaFile(Jpa ModelManager.java:238)
>
> at
> org.eclipse.jpt.core.internal.JptCorePlugin.getJpaFile(JptCo rePlugin.java:91)
>
> at
> org.eclipse.jpt.ui.internal.selection.TextEditorSelectionPar ticipant.persistenceFileFor(TextEditorSelectionParticipant.j ava:115)
>
> at
> org.eclipse.jpt.ui.internal.selection.TextEditorSelectionPar ticipant.calculateSelection(TextEditorSelectionParticipant.j ava:88)
>
> at
> org.eclipse.jpt.ui.internal.selection.TextEditorSelectionPar ticipant. <init>(TextEditorSelectionParticipant.java:49)
>
> at
> org.eclipse.jpt.ui.internal.selection.SelectionParticipantFa ctory.getAdapter(SelectionParticipantFactory.java:30)
>
> at
> org.eclipse.core.internal.runtime.AdapterFactoryProxy.getAda pter(AdapterFactoryProxy.java:61)
>
> at
> org.eclipse.core.internal.runtime.AdapterManager.getAdapter( AdapterManager.java:277)
>
> at org.eclipse.ui.part.WorkbenchPart.getAdapter(WorkbenchPart.j ava:150)
> at
> org.eclipse.ui.texteditor.AbstractTextEditor.getAdapter(Abst ractTextEditor.java:5786)
>
> at
> org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.getAda pter(AbstractDecoratedTextEditor.java:1175)
>
> at
> org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.getAdapter (JavaEditor.java:1826)
>
> at
> org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor .getAdapter(CompilationUnitEditor.java:1683)
>
> at
> org.eclipse.jpt.ui.internal.selection.SelectionManager.initP art(SelectionManager.java:87)
>
> at
> org.eclipse.jpt.ui.internal.selection.SelectionManager.initP age(SelectionManager.java:71)
>
> at
> org.eclipse.jpt.ui.internal.selection.SelectionManager.init( SelectionManager.java:63)
>
> at
> org.eclipse.jpt.ui.internal.selection.SelectionManagerFactor y.internalGetSelectionManager(SelectionManagerFactory.java:7 8)
>
> at
> org.eclipse.jpt.ui.internal.selection.SelectionManagerFactor y.getSelectionManager(SelectionManagerFactory.java:47)
>
> at
> org.eclipse.jpt.ui.internal.views.AbstractJpaView.createPart Control(AbstractJpaView.java:52)
>
> at
> org.eclipse.ui.internal.ViewReference.createPartHelper(ViewR eference.java:370)
>
> at org.eclipse.ui.internal.ViewReference.createPart(ViewReferen ce.java:227)
> at
> org.eclipse.ui.internal.WorkbenchPartReference.getPart(Workb enchPartReference.java:592)
>
> at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:29 9)
> at org.eclipse.ui.internal.ViewPane.setVisible(ViewPane.java:53 1)
> at
> org.eclipse.ui.internal.presentations.PresentablePart.setVis ible(PresentablePart.java:179)
>
> at
> org.eclipse.ui.internal.presentations.util.PresentablePartFo lder.select(PresentablePartFolder.java:268)
>
> 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:400)
>
> 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 04)
> at org.eclipse.ui.internal.PartStack.createControl(PartStack.ja va:649)
> at org.eclipse.ui.internal.PartStack.createControl(PartStack.ja va:576)
> at
> org.eclipse.ui.internal.PartSashContainer.createControl(Part SashContainer.java:563)
>
> at
> org.eclipse.ui.internal.PerspectiveHelper.activate(Perspecti veHelper.java:270)
>
> at org.eclipse.ui.internal.Perspective.onActivate(Perspective.j ava:931)
> at
> org.eclipse.ui.internal.WorkbenchPage.setPerspective(Workben chPage.java:3461)
>
> at
> org.eclipse.ui.internal.WorkbenchPage.busySetPerspective(Wor kbenchPage.java:988)
>
> at org.eclipse.ui.internal.WorkbenchPage.access$17(WorkbenchPag e.java:972)
> at org.eclipse.ui.internal.WorkbenchPage$18.run(WorkbenchPage.j ava:3560)
> at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
> at
> org.eclipse.ui.internal.WorkbenchPage.setPerspective(Workben chPage.java:3558)
>
> at
> org.eclipse.ui.internal.ChangeToPerspectiveMenu.run(ChangeTo PerspectiveMenu.java:92)
>
> at org.eclipse.ui.actions.PerspectiveMenu.run(PerspectiveMenu.j ava:336)
> at
> org.eclipse.ui.actions.PerspectiveMenu.runOther(PerspectiveM enu.java:352)
> at
> org.eclipse.ui.actions.PerspectiveMenu$3.runWithEvent(Perspe ctiveMenu.java:108)
>
> at
> org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:545)
>
> at
> org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:490)
>
> at
> org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:402)
>
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3682)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3293)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2389)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 19)
> at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:289)
>
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:461)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
> at
> org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:106)
>
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:153)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:106)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:76)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:363)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:176)
>
> 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: 504)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1169)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1144)
>
>
Re: A Dali full of bugs [message #602431 is a reply to message #434513] Sat, 14 July 2007 00:05 Go to previous message
Sanjay Kumar is currently offline Sanjay KumarFriend
Messages: 13
Registered: July 2009
Junior Member
I am getting similar and lots of other errors using Dali 1.0.

I am running WTP 2.0 on Vista 64-bit with JDK 1.5.12 (32-bit) VM.

I have a working JPA project in JDeveloper that I am trying to migrate to
Dali.(I have same project setup in NetBeans and I use it to generate
generated entities).

First exception occurs when I start Eclipse with JPA project.
It says error "Initializing JPA model - an error occured while traversing
resources." Stack trace shows "java.lang.ClassCastException:
org.eclipse.jdt.core.dom.InfixExpression". Apparantly its a known bug.

Then I get "unhandled event loop exception" trying to create entities from
database. I have valid connection to Postgres and Data Source explorer
shows tables. Yet, stacktrace shows:

java.util.NoSuchElementException
at
org.eclipse.jpt.db.internal.DTPDatabaseWrapper.getDefaultCat alogName(DTPDatabaseWrapper.java:200)

Does this thing work with anything other than Oracle ?

Then tons of errors like "xyz" (Entity class name) is not spelled corectly
in persistence.xml file. Why ? The same persistence.xml works perfectly
fine in JDeveloper and NetBeans. This may be result of above errors but
messages are certainly not very helpfully.

Similarly can't specify "provider" in persistence.xml (under
persistence-unit) either. Not compliant with schema. News to me.

I would have thought after three years of development and a production
release label "1.0" - Dali would be a useful tool. Unfortunately I am
little disappointed.

-Sanjay
Re: A Dali full of bugs [message #602434 is a reply to message #434514] Mon, 16 July 2007 16:21 Go to previous message
Neil Hauge is currently offline Neil HaugeFriend
Messages: 475
Registered: July 2009
Senior Member
Hi Sanjay,

Sorry that you are having a number of issues with the latest code. Let me
try to address some of them and hopefully get a little more feedback on
some of the issues.

> First exception occurs when I start Eclipse with JPA project.
> It says error "Initializing JPA model - an error occured while traversing
> resources." Stack trace shows "java.lang.ClassCastException:
> org.eclipse.jdt.core.dom.InfixExpression". Apparantly its a known bug.

This is something that we hadn't encountered before the release by us or
apparently by the community. It seems that since we do have a 1.0 out
now, we are getting more diverse usage of the tools, and this is driving
out some new issues. Given the severity of this item, we will work to fix
it quickly.

> Then I get "unhandled event loop exception" trying to create entities from
> database. I have valid connection to Postgres and Data Source explorer
> shows tables. Yet, stacktrace shows:

> java.util.NoSuchElementException
> at
>
org.eclipse.jpt.db.internal.DTPDatabaseWrapper.getDefaultCat alogName(DTPDatabaseWrapper.java:200)

> Does this thing work with anything other than Oracle ?

We have done testing with PostgreSQL and have successfully worked with and
generated entities from PostgreSQL and many other databases. We actually
fixed a related problem with PostgreSQL late in the release cycle, but I
assume you are running the final release. What version of PostgreSQL are
you using, and is there any more error information you can provide from
the log?

> Then tons of errors like "xyz" (Entity class name) is not spelled corectly
> in persistence.xml file. Why ? The same persistence.xml works perfectly
> fine in JDeveloper and NetBeans. This may be result of above errors but
> messages are certainly not very helpfully.

This is actually new functionality in the Platform and can be
altered/disabled in the preferences under General->Editors->Text
Editors->Spelling.

> Similarly can't specify "provider" in persistence.xml (under
> persistence-unit) either. Not compliant with schema. News to me.

This is not a Dali error, but is coming from the default schema
validation. Not sure how you are specifying the provider, but I don't get
any complaints with:

<persistence-unit name="FooUnit">
<provider>Foo</provider>
...

Perhaps you are picking up an invalid schema?

> I would have thought after three years of development and a production
> release label "1.0" - Dali would be a useful tool. Unfortunately I am
> little disappointed.

The project was actually created in the summer of 2005, so we've only been
going for about 2 years. Even though that seems like a decent amount of
time, the scope and complexity of building tools for JPA (in the way we
have chosen to do so) is impressive, especially when you add the
requirement of extensibility. We are happy to have something out that
will provide more feedback and bug reports so we can improve Dali as the
project progresses.

Thanks for your feedback,
Neil


> -Sanjay
Re: A Dali full of bugs [message #602446 is a reply to message #434515] Tue, 17 July 2007 10:19 Go to previous message
Sanjay Kumar is currently offline Sanjay KumarFriend
Messages: 13
Registered: July 2009
Junior Member
Neil Hauge wrote:

> Hi Sanjay,

> We have done testing with PostgreSQL and have successfully worked with and
> generated entities from PostgreSQL and many other databases. We actually
> fixed a related problem with PostgreSQL late in the release cycle, but I
> assume you are running the final release. What version of PostgreSQL are
> you using, and is there any more error information you can provide from
> the log?

Here is the stack trace of "Unhandled event loop exception" I am getting
trying to generate Entities from tables in a JPA project created from
scratch. I am using Vista 64-bit with JDK 1.5.12 going against Postgres
8.1 on Linux. Data source explorer shows the data source and its tables.
Any help would be appreciated. Thanks.

-Sanjay

eclipse.buildId=I20070625-1500
java.version=1.5.0_12
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments: -os win32 -ws win32 -arch x86

Error
Tue Jul 17 06:10:26 EDT 2007
Unhandled event loop exception

java.util.NoSuchElementException
at
org.eclipse.jpt.db.internal.DTPDatabaseWrapper.getDefaultCat alogName(DTPDatabaseWrapper.java:200)
at
org.eclipse.jpt.db.internal.ConnectionProfile.setDefaultCata logName(ConnectionProfile.java:156)
at
org.eclipse.jpt.db.internal.ConnectionProfile.getDatabase(Co nnectionProfile.java:102)
at
org.eclipse.jpt.ui.internal.wizards.GenerateEntitiesWizard.g etProjectUserSchema(GenerateEntitiesWizard.java:125)
at
org.eclipse.jpt.ui.internal.wizards.GenerateEntitiesWizard.p rojectUserSchemaExists(GenerateEntitiesWizard.java:157)
at
org.eclipse.jpt.ui.internal.wizards.GenerateEntitiesWizard.a ddPages(GenerateEntitiesWizard.java:58)
at
org.eclipse.jface.wizard.WizardDialog.createContents(WizardD ialog.java:540)
at org.eclipse.jface.window.Window.create(Window.java:426)
at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1081)
at
org.eclipse.jpt.ui.internal.generic.EntitiesGenerator.genera te(EntitiesGenerator.java:75)
at
org.eclipse.jpt.ui.internal.generic.EntitiesGenerator.genera te(EntitiesGenerator.java:56)
at
org.eclipse.jpt.ui.internal.BaseJpaPlatformUi.generateEntiti es(BaseJpaPlatformUi.java:66)
at
org.eclipse.jpt.ui.internal.actions.GenerateEntitiesAction.e xecute(GenerateEntitiesAction.java:27)
at
org.eclipse.jpt.ui.internal.actions.ProjectAction.execute(Pr ojectAction.java:90)
at
org.eclipse.jpt.ui.internal.actions.ProjectAction.execute(Pr ojectAction.java:71)
at
org.eclipse.jpt.ui.internal.actions.ProjectAction.run(Projec tAction.java:63)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginActi on.java:256)
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:545)
at
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:490)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:402)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3682)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3293)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 19)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:289)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:106)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:153)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:106)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:76)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:363)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:176)
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: 504)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
at org.eclipse.equinox.launcher.Main.run(Main.java:1169)
Re: A Dali full of bugs [message #602449 is a reply to message #434517] Wed, 18 July 2007 12:20 Go to previous message
Sanjay Kumar is currently offline Sanjay KumarFriend
Messages: 13
Registered: July 2009
Junior Member
Guys,

any clues on this ?
I get unhandled loop exception trying to generate entities from tables.
Connection seems fine in Data Source explorer - but Dali doesn't see that
its connecteds. It says "Must have an active connection to see schema".
"Reconnect" doesn't do anything either.

thanks,

-Sanjay
Re: A Dali full of bugs [message #602454 is a reply to message #434518] Wed, 18 July 2007 16:36 Go to previous message
Neil Hauge is currently offline Neil HaugeFriend
Messages: 475
Registered: July 2009
Senior Member
Sanjay,

Give this a try. Create or use an existing orm.xml file and set the
Catalog field in the Persistent Unit Defaults to your database catalog
name. By default this is the same as the database name for PostgreSQL,
but perhaps it is not in your case, which is what is causing the default
not to work for entity gen.

Make sure you have a live connection to the DB and then try to generate
Entities.

It would be helpful to know the following connection information so we can
try to determine what the problem is.

Database Name:
Catalog Name:
Schema Name:
User Name:

Thanks,
Neil


Sanjay Kumar wrote:

> Guys,

> any clues on this ?
> I get unhandled loop exception trying to generate entities from tables.
> Connection seems fine in Data Source explorer - but Dali doesn't see that
> its connecteds. It says "Must have an active connection to see schema".
> "Reconnect" doesn't do anything either.

> thanks,

> -Sanjay
Re: A Dali full of bugs [message #605106 is a reply to message #434519] Thu, 02 August 2007 01:57 Go to previous message
Sanjay Kumar is currently offline Sanjay KumarFriend
Messages: 13
Registered: July 2009
Junior Member
Neil,

In my case it appears unless username = database name ( which in turn is
same as catalog name) it doesn't work. When I bring up Entity gen, it
fails to show drop down for schema and throws the exception.

database: custinfo
catalog: custinfo
schema: public
username: skumar

This fails.

But when I create a new user custinfo, Entity Gen works fine.

I see your comments in Bug 193879. This may be related. I have added my
vote.

thanks,

-Sanjay
Re: A Dali full of bugs [message #605140 is a reply to message #434535] Tue, 07 August 2007 20:01 Go to previous message
Neil Hauge is currently offline Neil HaugeFriend
Messages: 475
Registered: July 2009
Senior Member
Sanjay,

Sorry for the delay but I missed your response below. I think part of the
problem might be your database name setting in your connection info. Can
you verify that the database name in your connection definition is
"custinfo"?

This won't help with the bug your referenced, but it should at least allow
you to generate entities.

Neil

Sanjay Kumar wrote:

> Neil,

> In my case it appears unless username = database name ( which in turn is
> same as catalog name) it doesn't work. When I bring up Entity gen, it
> fails to show drop down for schema and throws the exception.

> database: custinfo
> catalog: custinfo
> schema: public
> username: skumar

> This fails.

> But when I create a new user custinfo, Entity Gen works fine.

> I see your comments in Bug 193879. This may be related. I have added my
> vote.

> thanks,

> -Sanjay
Previous Topic:WTP 2.0 released!
Next Topic:BEA releases WebLogic Server Tools for Eclipse 3.3
Goto Forum:
  


Current Time: Thu Mar 28 23:20:27 GMT 2024

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

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

Back to the top