Uploaded image for project: 'Forge'
  1. Forge
  2. FORGE-2669

Improve error message for JPA: Generate Entities From Table

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • 3.2.3.Final
    • 3.2.2.Final
    • Database Tools
    • None

      Error message when generating JPA entities is not explaining what can be wrong (java.lang.IllegalArgumentException: Error Message cannot be null).

      Steps to reproduce:
      1. Create new project
      2. Create connection profile (sakila) (do not check checkbox Verify database connection) - enter incorrect DB address
      3. Create jboss data source
      4. Crl+4 -> jpa-setup
      5. Crl+4 -> jpa generate entities from tables - select sakila Connection Profile - first error occurs in Error Log: Unhandled event loop exception
      Stacktrace:

      java.lang.IllegalArgumentException: Error Message cannot be null
      	at org.jboss.forge.furnace.util.Assert.notNull(Assert.java:24)
      	at org.jboss.forge.addon.ui.impl.context.UIValidationContextImpl.addValidationError(UIValidationContextImpl.java:37)
      	at org.jboss.forge.addon.database.tools.generate.DatabaseTableSelectionStep.validate(DatabaseTableSelectionStep.java:140)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.jboss.forge.furnace.proxy.ClassLoaderInterceptor$1.call(ClassLoaderInterceptor.java:87)
      	at org.jboss.forge.furnace.util.ClassLoaders.executeIn(ClassLoaders.java:42)
      	at org.jboss.forge.furnace.proxy.ClassLoaderInterceptor.invoke(ClassLoaderInterceptor.java:103)
      	at org.jboss.forge.addon.database.tools.generate.DatabaseTableSelectionStep_$$_javassist_4d2ecb6e-c986-4bca-a61a-9eb7f976eab2.validate(DatabaseTableSelectionStep_$$_javassist_4d2ecb6e-c986-4bca-a61a-9eb7f976eab2.java)
      	at org.jboss.forge.addon.ui.impl.controller.SingleCommandControllerImpl.validate(SingleCommandControllerImpl.java:186)
      	at org.jboss.forge.addon.ui.impl.controller.SingleCommandControllerImpl.isValid(SingleCommandControllerImpl.java:198)
      	at org.jboss.forge.addon.ui.impl.controller.WizardCommandControllerImpl.isValid(WizardCommandControllerImpl.java:228)
      	at org.jboss.forge.addon.ui.impl.controller.WizardCommandControllerImpl.canMoveToNextStep(WizardCommandControllerImpl.java:299)
      	at org.jboss.forge.addon.ui.impl.controller.WizardCommandControllerImpl.refreshFlow(WizardCommandControllerImpl.java:99)
      	at org.jboss.forge.addon.ui.impl.controller.WizardCommandControllerImpl.canExecute(WizardCommandControllerImpl.java:319)
      	at org.jboss.forge.addon.ui.impl.controller.NoUIWizardControllerDecorator.canExecute(NoUIWizardControllerDecorator.java:230)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.jboss.forge.furnace.proxy.ClassLoaderAdapterCallback$2.call(ClassLoaderAdapterCallback.java:124)
      	at org.jboss.forge.furnace.util.ClassLoaders.executeIn(ClassLoaders.java:42)
      	at org.jboss.forge.furnace.proxy.ClassLoaderAdapterCallback.invoke(ClassLoaderAdapterCallback.java:97)
      	at org.jboss.forge.addon.ui.controller.CommandController_$$_javassist_e425a401-5f72-4870-b93c-2707c10e3fff.canExecute(CommandController_$$_javassist_e425a401-5f72-4870-b93c-2707c10e3fff.java)
      	at org.jboss.tools.forge.ui.internal.ext.wizards.ForgeWizard.canFinish(ForgeWizard.java:80)
      	at org.eclipse.jface.wizard.WizardDialog.updateButtons(WizardDialog.java:1300)
      	at org.eclipse.jface.wizard.WizardPage.setPageComplete(WizardPage.java:293)
      	at org.jboss.tools.forge.ui.internal.ext.wizards.ForgeWizardPage.handleEvent(ForgeWizardPage.java:158)
      	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
      	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5219)
      	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1340)
      	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1366)
      	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1345)
      	at org.eclipse.swt.widgets.Combo.gtk_changed(Combo.java:1250)
      	at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1933)
      	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5484)
      	at org.eclipse.swt.internal.gtk.OS._gtk_main_do_event(Native Method)
      	at org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(OS.java:9545)
      	at org.eclipse.swt.widgets.Display.eventProc(Display.java:1275)
      	at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method)
      	at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:2495)
      	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4141)
      	at org.eclipse.jface.window.Window.runEventLoop(Window.java:818)
      	at org.eclipse.jface.window.Window.open(Window.java:794)
      	at org.jboss.tools.forge.ui.internal.ext.dialog.WizardDialogHelper.openWizard(WizardDialogHelper.java:198)
      	at org.jboss.tools.forge.ui.internal.ext.dialog.WizardDialogHelper.openWizard(WizardDialogHelper.java:97)
      	at org.jboss.tools.forge.ui.internal.ext.dialog.UICommandListDialog$1$1.handleElementSelected(UICommandListDialog.java:235)
      	at org.jboss.tools.forge.ui.internal.ext.quickaccess.QuickAccessContents.handleSelection(QuickAccessContents.java:322)
      	at org.jboss.tools.forge.ui.internal.ext.quickaccess.QuickAccessContents.access$0(QuickAccessContents.java:312)
      	at org.jboss.tools.forge.ui.internal.ext.quickaccess.QuickAccessContents$1.keyPressed(QuickAccessContents.java:343)
      	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:168)
      	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
      	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5219)
      	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1340)
      	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1366)
      	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1349)
      	at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1378)
      	at org.eclipse.swt.widgets.Widget.gtk_key_press_event(Widget.java:764)
      	at org.eclipse.swt.widgets.Control.gtk_key_press_event(Control.java:3457)
      	at org.eclipse.swt.widgets.Text.gtk_key_press_event(Text.java:1869)
      	at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:2000)
      	at org.eclipse.swt.widgets.Control.windowProc(Control.java:5819)
      	at org.eclipse.swt.widgets.Text.windowProc(Text.java:2896)
      	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5490)
      	at org.eclipse.swt.internal.gtk.OS._gtk_main_do_event(Native Method)
      	at org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(OS.java:9545)
      	at org.eclipse.swt.widgets.Display.eventProc(Display.java:1275)
      	at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method)
      	at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:2495)
      	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4141)
      	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121)
      	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
      	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022)
      	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150)
      	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:687)
      	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
      	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:604)
      	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
      	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138)
      	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
      	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
      	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
      	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
      	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
      	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
      	at org.eclipse.equinox.launcher.Main.run(Main.java:1519)
      	at org.eclipse.equinox.launcher.Main.main(Main.java:1492)
      
      

      6. Click on Next - second error occurs: Error Logged from Forge Plugin

      java.lang.IllegalArgumentException: Error Message cannot be null
      	at org.jboss.forge.furnace.util.Assert.notNull(Assert.java:24)
      	at org.jboss.forge.addon.ui.impl.context.UIValidationContextImpl.addValidationError(UIValidationContextImpl.java:37)
      	at org.jboss.forge.addon.database.tools.generate.DatabaseTableSelectionStep.validate(DatabaseTableSelectionStep.java:140)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.jboss.forge.furnace.proxy.ClassLoaderInterceptor$1.call(ClassLoaderInterceptor.java:87)
      	at org.jboss.forge.furnace.util.ClassLoaders.executeIn(ClassLoaders.java:42)
      	at org.jboss.forge.furnace.proxy.ClassLoaderInterceptor.invoke(ClassLoaderInterceptor.java:103)
      	at org.jboss.forge.addon.database.tools.generate.DatabaseTableSelectionStep_$$_javassist_4d2ecb6e-c986-4bca-a61a-9eb7f976eab2.validate(DatabaseTableSelectionStep_$$_javassist_4d2ecb6e-c986-4bca-a61a-9eb7f976eab2.java)
      	at org.jboss.forge.addon.ui.impl.controller.SingleCommandControllerImpl.validate(SingleCommandControllerImpl.java:186)
      	at org.jboss.forge.addon.ui.impl.controller.WizardCommandControllerImpl.validate(WizardCommandControllerImpl.java:222)
      	at org.jboss.forge.addon.ui.impl.controller.NoUIWizardControllerDecorator.validate(NoUIWizardControllerDecorator.java:157)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.jboss.forge.furnace.proxy.ClassLoaderAdapterCallback$2.call(ClassLoaderAdapterCallback.java:124)
      	at org.jboss.forge.furnace.util.ClassLoaders.executeIn(ClassLoaders.java:42)
      	at org.jboss.forge.furnace.proxy.ClassLoaderAdapterCallback.invoke(ClassLoaderAdapterCallback.java:97)
      	at org.jboss.forge.addon.ui.controller.CommandController_$$_javassist_e425a401-5f72-4870-b93c-2707c10e3fff.validate(CommandController_$$_javassist_e425a401-5f72-4870-b93c-2707c10e3fff.java)
      	at org.jboss.tools.forge.ui.internal.ext.wizards.ForgeWizardPage.validatePage(ForgeWizardPage.java:238)
      	at org.jboss.tools.forge.ui.internal.ext.wizards.ForgeWizardPage.initValidatePage(ForgeWizardPage.java:222)
      	at org.jboss.tools.forge.ui.internal.ext.wizards.ForgeWizardPage.createControl(ForgeWizardPage.java:111)
      	at org.eclipse.jface.wizard.WizardDialog.updateForPage(WizardDialog.java:1202)
      	at org.eclipse.jface.wizard.WizardDialog.lambda$2(WizardDialog.java:1185)
      	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
      	at org.eclipse.jface.wizard.WizardDialog.showPage(WizardDialog.java:1185)
      	at org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDialog.java:876)
      	at org.jboss.tools.forge.ui.internal.ext.dialog.ForgeWizardDialog.nextPressed(ForgeWizardDialog.java:50)
      	at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:419)
      	at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:618)
      	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:249)
      	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
      	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5219)
      	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1340)
      	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4553)
      	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4143)
      	at org.eclipse.jface.window.Window.runEventLoop(Window.java:818)
      	at org.eclipse.jface.window.Window.open(Window.java:794)
      	at org.jboss.tools.forge.ui.internal.ext.dialog.WizardDialogHelper.openWizard(WizardDialogHelper.java:198)
      	at org.jboss.tools.forge.ui.internal.ext.dialog.WizardDialogHelper.openWizard(WizardDialogHelper.java:97)
      	at org.jboss.tools.forge.ui.internal.ext.dialog.UICommandListDialog$1$1.handleElementSelected(UICommandListDialog.java:235)
      	at org.jboss.tools.forge.ui.internal.ext.quickaccess.QuickAccessContents.handleSelection(QuickAccessContents.java:322)
      	at org.jboss.tools.forge.ui.internal.ext.quickaccess.QuickAccessContents.access$0(QuickAccessContents.java:312)
      	at org.jboss.tools.forge.ui.internal.ext.quickaccess.QuickAccessContents$1.keyPressed(QuickAccessContents.java:343)
      	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:168)
      	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
      	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5219)
      	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1340)
      	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1366)
      	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1349)
      	at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1378)
      	at org.eclipse.swt.widgets.Widget.gtk_key_press_event(Widget.java:764)
      	at org.eclipse.swt.widgets.Control.gtk_key_press_event(Control.java:3457)
      	at org.eclipse.swt.widgets.Text.gtk_key_press_event(Text.java:1869)
      	at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:2000)
      	at org.eclipse.swt.widgets.Control.windowProc(Control.java:5819)
      	at org.eclipse.swt.widgets.Text.windowProc(Text.java:2896)
      	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5490)
      	at org.eclipse.swt.internal.gtk.OS._gtk_main_do_event(Native Method)
      	at org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(OS.java:9545)
      	at org.eclipse.swt.widgets.Display.eventProc(Display.java:1275)
      	at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method)
      	at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:2495)
      	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4141)
      	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121)
      	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
      	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022)
      	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150)
      	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:687)
      	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
      	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:604)
      	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
      	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138)
      	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
      	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
      	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
      	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
      	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
      	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
      	at org.eclipse.equinox.launcher.Main.run(Main.java:1519)
      	at org.eclipse.equinox.launcher.Main.main(Main.java:1492)
      

              rhn-support-ggastald George Gastaldi
              jkopriva@redhat.com Josef Kopriva
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: