#46 Import Database - Null Pointer Exception

v1.0 (example)
closed-fixed
nobody
None
5
2013-12-10
2010-08-31
Anonymous
No

Imported Tables from Existing Oracle database. Eclipse showing Error with message Plugin generated Nullpointer Exception. I have selected around 6 tables and it imported only one with two relation lines. Whenever I try to move table on ER sheet Eclipse showing Nullpointer Exception. I am using Eclipse Helios Release.
Attached screenshot .

Discussion

  • Error Generated

     
    Attachments
  • Thank you for you bug report.

    I am sorry, the cause cannot be specified only by this information.
    Could you give me the log file at "%ECLIPSE INSTALLED PATH%\.metadata\.log"?

     
  • I would suggest you download the source code and step though the code with the debugger, your database schema may have DDL not handled by the import code or design to handle.

    You can always just write your own override to the import code

    I did it with HSQLDB

     
  • DMue
    DMue
    2011-01-20

    I have the same problem with MS SQL Server 2005; I found following stack traces in the log file:

    !ENTRY org.insightech.er 4 0 2011-01-20 14:25:07.477
    !MESSAGE
    !STACK 0
    java.lang.NullPointerException
    at org.insightech.er.db.DBManagerFactory.getDBManager(DBManagerFactory.java:53)
    at org.insightech.er.editor.model.diagram_contents.element.node.table.ERTable.getTableViewProperties(ERTable.java:67)
    at org.insightech.er.editor.model.diagram_contents.element.node.table.TableView.compareTo(TableView.java:387)
    at org.insightech.er.editor.model.diagram_contents.element.connection.Relation.compareTo(Relation.java:411)
    at org.insightech.er.editor.model.diagram_contents.element.connection.Relation.compareTo(Relation.java:1)
    at java.util.Arrays.mergeSort(Unknown Source)
    at java.util.Arrays.sort(Unknown Source)
    at java.util.Collections.sort(Unknown Source)
    at org.insightech.er.editor.model.diagram_contents.element.node.table.TableView.getOutgoingRelations(TableView.java:148)
    at org.insightech.er.editor.controller.command.dbimport.ImportTableCommand.setSelfRelation(ImportTableCommand.java:202)
    at org.insightech.er.editor.controller.command.dbimport.ImportTableCommand.doExecute(ImportTableCommand.java:173)
    at org.insightech.er.editor.controller.command.AbstractCommand.execute(AbstractCommand.java:14)
    at org.eclipse.gef.commands.CommandStack.execute(CommandStack.java:197)
    at org.insightech.er.editor.view.action.AbstractBaseAction.execute(AbstractBaseAction.java:90)
    at org.insightech.er.editor.view.action.dbimport.AbstractImportAction.showData(AbstractImportAction.java:40)
    at org.insightech.er.editor.view.action.dbimport.ImportFromDBAction.execute(ImportFromDBAction.java:168)
    at org.insightech.er.editor.view.action.AbstractBaseAction.runWithEvent(AbstractBaseAction.java:67)
    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
    at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
    at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
    at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    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(EclipseStarter.java:369)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.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:619)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1407)

    !ENTRY org.insightech.er 4 0 2011-01-20 14:27:01.789
    !MESSAGE
    !STACK 0
    java.lang.NullPointerException
    at org.insightech.er.editor.model.diagram_contents.element.node.table.TableView.setColumns(TableView.java:188)
    at org.insightech.er.editor.model.dbimport.ImportFromDBManagerBase.importView(ImportFromDBManagerBase.java:1096)
    at org.insightech.er.editor.model.dbimport.ImportFromDBManagerBase.importViews(ImportFromDBManagerBase.java:1050)
    at org.insightech.er.editor.model.dbimport.ImportFromDBManagerBase.run(ImportFromDBManagerBase.java:181)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)

     
  • kimu
    kimu
    2012-01-23

    Have similar problem and found it only happens if there ar tables in the import with a self FK e.g. a FK from one column in the table to the same table PK. This is extremely useful when create hierarchical structures such as orc chart.

    I have no clue how can I overcome it.
    It is a great tool however this is a showstopper for me.

     
  • I have exactly the same problem and can confirm that removing every self-relationship solves it, as mentioned by kimchiuri.

     
  • laurent v
    laurent v
    2013-04-23

    hello everybody
    I would to say thanks too for this software is very interesting and do many things great
    I have the same problem with the self referenced tables, there is some news about this bug i can do for solve this ?

    Thanks a lot see you Laurent

     
    • status: open --> closed-fixed
    • Group: --> v1.0 (example)