- This topic has 10 replies, 3 voices, and was last updated 19 years, 3 months ago by Brian Fernandes.
-
AuthorPosts
-
Oliver HesselMemberWhen try to create the ER-Diagram I get an error.
I’m using a psql (PostgreSQL) 7.4.7 database.
I had to specify my own driver, because the one in MyEclipse does not work. I used: pg74.215.jdbc3.jarIt stopped to work after adding some tables (there are now 59)
I’m using the latest MyEclipse 4.0 with eclipse 3.1, tried it wiht MyE 3.8… and it didn’t work too.
thanks.
PS: the Errormessage (comes after fetching all metadata, when teh ER window is opened, there is no ER-file written):
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1444)
at java.lang.String.substring(String.java:1411)
at com.genuitec.eclipse.erdesigner.model.ERRelationship.getLabel(ERRelationship.java:170)
at com.genuitec.eclipse.erdesigner.part.ERRelationshipEditPart.createFigure(ERRelationshipEditPart.java:182)
at org.eclipse.gef.editparts.AbstractGraphicalEditPart.getFigure(AbstractGraphicalEditPart.java:435)
at org.eclipse.gef.editparts.AbstractConnectionEditPart.activateFigure(AbstractConnectionEditPart.java:95)
at org.eclipse.gef.editparts.AbstractConnectionEditPart.addNotify(AbstractConnectionEditPart.java:102)
at org.eclipse.gef.editparts.AbstractConnectionEditPart.setParent(AbstractConnectionEditPart.java:261)
at org.eclipse.gef.editparts.AbstractConnectionEditPart.setTarget(AbstractConnectionEditPart.java:291)
at org.eclipse.gef.editparts.AbstractGraphicalEditPart.addTargetConnection(AbstractGraphicalEditPart.java:261)
at org.eclipse.gef.editparts.AbstractGraphicalEditPart.refreshTargetConnections(AbstractGraphicalEditPart.java:657)
at org.eclipse.gef.editparts.AbstractGraphicalEditPart.refresh(AbstractGraphicalEditPart.java:556)
at org.eclipse.gef.editparts.AbstractEditPart.addNotify(AbstractEditPart.java:232)
at org.eclipse.gef.editparts.AbstractGraphicalEditPart.addNotify(AbstractGraphicalEditPart.java:212)
at org.eclipse.gef.editparts.AbstractEditPart.addChild(AbstractEditPart.java:195)
at org.eclipse.gef.editparts.AbstractEditPart.refreshChildren(AbstractEditPart.java:734)
at org.eclipse.gef.editparts.AbstractEditPart.refresh(AbstractEditPart.java:684)
at org.eclipse.gef.editparts.AbstractGraphicalEditPart.refresh(AbstractGraphicalEditPart.java:554)
at org.eclipse.gef.editparts.AbstractEditPart.addNotify(AbstractEditPart.java:232)
at org.eclipse.gef.editparts.AbstractGraphicalEditPart.addNotify(AbstractGraphicalEditPart.java:212)
at org.eclipse.gef.editparts.AbstractEditPart.addChild(AbstractEditPart.java:195)
at org.eclipse.gef.editparts.FreeformGraphicalRootEditPart.setContents(FreeformGraphicalRootEditPart.java:303)
at org.eclipse.gef.ui.parts.AbstractEditPartViewer.setContents(AbstractEditPartViewer.java:583)
at org.eclipse.gef.ui.parts.AbstractEditPartViewer.setContents(AbstractEditPartViewer.java:592)
at com.genuitec.eclipse.erdesigner.ERDesignerEditor.initializeGraphicalViewer(ERDesignerEditor.java:299)
at com.genuitec.eclipse.erdesigner.ERDesignerEditor.createGraphicalViewer(ERDesignerEditor.java:151)
at org.eclipse.gef.ui.parts.GraphicalEditor.createPartControl(GraphicalEditor.java:148)
at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:585)
at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:365)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:552)
at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:214)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2325)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2258)
at org.eclipse.ui.internal.WorkbenchPage.access$9(WorkbenchPage.java:2250)
at org.eclipse.ui.internal.WorkbenchPage$9.run(WorkbenchPage.java:2236)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2231)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2204)
at com.genuitec.eclipse.sqlexplorer.actions.CreateERD$1.run(CreateERD.java:155)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3057)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2716)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1699)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:367)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:163)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334)
at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
at org.eclipse.core.launcher.Main.run(Main.java:973)
at org.eclipse.core.launcher.Main.main(Main.java:948)
Riyad KallaMemberCheck all your FK’s, do they all have names? Do any of your tables have fields or keys without names?
Oliver HesselMemberThank you, after your hint I dumped the Schema and tried it on anoter database, the problem is gone, I think the Problem were the Functions, I didn’d replicate them to the new database.
Oliver HesselMemberSo,
Months afer it worked, I wanted to create an ER-Diagram again, same Error, also with the latest MyEclipse.Is there any log File where I can locate the Table/FK/Function which causes this Error, (only as a workaround)
My Data Record:
*** Date: Mon Oct 10 09:03:14 CEST 2005
*** System properties:
OS=WindowsXP
OS version=5.1
Java version=1.4.2_08*** MyEclipse details:
MyEclipse Enterprise WorkbenchVersion: 4.0.2 GA
Build id: 20051010-4.0.2-GA*** Eclipse details:
Eclipse SDKVersion: 3.1.0
Build id: I20050627-1435Eclipse Platform
Version: 3.1.0
Build id: I20050627-1435Eclipse RCP
Version: 3.1.0
Build id: I20050627-1435Eclipse Java Development Tools
Version: 3.1.0
Build id: I20050627-1435Eclipse Plug-in Development Environment
Version: 3.1.0
Build id: I20050627-1435Eclipse Project SDK
Version: 3.1.0
Build id: I20050627-1435Eclipse startup command=-os
win32
-ws
win32
-arch
x86
-launcher
C:\Programme\eclipse3.1\eclipse.exe
-name
Eclipse
-showsplash
600
-exitdata
d68_38
-vm
C:\j2sdk1.4.2_08\jre\bin\javaw.exe
Brian FernandesModeratorollih,
Sorry you had to run into this again. We already have an issue filed against this but I incorrectly assumed this was far from the norm.
Nothing but your Tables should matter (Functions are irrelevant), so open up a connection to your DB and select each table, keep the Table Info view open with the Foreign Key tab selected.
If you notice a Row without an entry (or a blank) in the Foreign Key column, that would likely be the relationship causing all the trouble. I’m afraid there isnt’ a log with this particular information.If you give that relationship a name, the diagram will be created just fine. I’m unaware of how this condition would occur since I know that PostgreSQL would name your relationships for you – how was the schema created?
Please let us know if you find anything, that’ll help us fix this issue asap.
Best,
Brian.
Oliver HesselMemberSo,
I checked.
All of our Primary / Foreign Keys have names.
At least $1 or similar, like PostgreSQL names them by default.best,
Oliver
Oliver HesselMemberForgot to mention…
All have names and it does not work.
Brian FernandesModeratorollith,
That is strange. Would it be possible for you to recreate the problematic schema in another temp schema adding a few tables at a time to see what causes it to break down?
Another idea is to explicitly name all the relationships which have default names.I understand if this is not possible, since it can be a time sink, we’ll take care of this issue in our next release. Any further information you can provide would be appreciated.
Best,
Brian.
Oliver HesselMemberI already tried it,
But as you say, its Time-Consuming, we habe 81 Tables and I don’t know how many Foreign keys,
so I gave up, I’ll try once more, when I have some time.
Only the tables, without PK/FK it worked, also some of the $ named ones worked, but I don’t know when the Problem occurs.
Oliver HesselMemberI found the problem,
After 2 hours of testing.
I have a foreign key that references a the oid-column of a table, this isn’t supported by your ER-Designer :-).
…but i think it should be, because Postgresql supports it.
best,
Oliver
Brian FernandesModeratorOliver,
Great! Thank you for taking the time to nail that for us, highly appreciated.
I can see why OID references would cause this error and I’ve revised our internal report on this issue.
Yes, we should / will be taking care of OIDs; in any case, they shouldn’t cause the diagram creation to fail.Thanks for the support,
Brian. -
AuthorPosts