- This topic has 10 replies, 7 voices, and was last updated 13 years, 7 months ago by jkennedy.
-
AuthorPosts
-
jet3723ParticipantAttempting to scaffold for an HSQLDB database fails on the “Select Database Tables” dialog.
— Database connection works from the Database Explorer
— Same connection template is used during scaffoldingNo reported errors. The dialog just never shows any tables and all fields in the dialog are not accessible.
Any hints here?
davemeurerMemberHello,
This may be due to the driver used in the database connection. We’ve seen similar issues with the MS SQL server driver due to bugs in the driver not being able to retrieve the schema information.
Would you be able to reply with what driver you are using, and I can try to reproduce?
Kind regards,
Dave
Brian TiemanMemberI’m experiencing this same problem.
MyEclipse for Spring 8.6
HSQLDB 2.0.0Driver connects to data base using database explorer. When trying to scaffold I get to the “Select Database Tables” dialog and it fails. Error is:
<snip>
Unhandled event loop exceptionorg.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException)
at org.eclipse.swt.SWT.error(SWT.java:3884)
at org.eclipse.swt.SWT.error(SWT.java:3799)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:137)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3885)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3506)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
at org.eclipse.jface.window.Window.open(Window.java:801)
at org.skyway.core.generate.ui.wizard.WizardUserInterface.show(WizardUserInterface.java:50)
at org.skyway.core.generate.execute.GenerationInvoker.invokeUserInterface(GenerationInvoker.java:58)
at org.skyway.core.generate.execute.GenerationInvoker.invoke(GenerationInvoker.java:46)
at org.skyway.core.generate.execute.CustomizationAwareGenerationInvoker.invoke(CustomizationAwareGenerationInvoker.java:53)
at com.skyway.scaffolding.crud.action.GenerateCrudApplicationAction.invoke(GenerateCrudApplicationAction.java:31)
at org.skyway.core.generate.ui.action.GenerationObjectActionDelegate.run(GenerationObjectActionDelegate.java:40)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
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:1003)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3910)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3503)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
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:368)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
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:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
Caused by: java.lang.NullPointerException
at com.skyway.myeclipseforspring.persistence.MyEclipseConnectionProfile.getDefaultCatalogName(MyEclipseConnectionProfile.java:211)
at org.skyway.integration.data.persistence.ui.controls.SourceTargetTableSelectionComposite.populateCatalogCombo(SourceTargetTableSelectionComposite.java:366)
at org.skyway.integration.data.persistence.ui.controls.SourceTargetTableSelectionComposite.populate(SourceTargetTableSelectionComposite.java:229)
at org.skyway.integration.data.persistence.ui.controls.SourceTargetTableSelectionComposite.setInput(SourceTargetTableSelectionComposite.java:201)
at org.skyway.integration.data.persistence.ui.datatype.wizards.SourceTargetTableSelectionWizardPage$4.run(SourceTargetTableSelectionWizardPage.java:96)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
… 38 more
</snip>Thoughts?
jayperkinsMemberHi,
Unfortunately, there is a bug in the scaffolding engine when using this database. I have created a JIRA to get it fixed.
One thing you could try, although not optimal, would probably work. Reverse engineer your tables into jpa entities and then scaffold from those entities.
Let me know if you have any questions.
Jay
RickSudsMemberJay
Thanks for the help, I will give it a try. Any estimate on when the fix will be available?
jayperkinsMemberThis issue was fixed in the latest release (My Eclipse For Spring 9.0).
FYI – for some databases, you may have to pick the hibernate dialect manually on the “Select Database Tables” wizard page.
RickSudsMemberThanks
DrmoodleMemberI am having a similar problem but with MySQL. I get the following error and I am using me4s v9. I have tried using local as well as on server with same problem.
Caused by: java.sql.SQLException: No database selected
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:946)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3283)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1332)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1467)
at org.hibernate.cfg.reveng.dialect.MySQLMetaDataDialect.getSuggestedPrimaryKeyStrategyName(MySQLMetaDataDialect.java:29)
… 31 moreAny ideas? Also, I have selected the Schema and one table as it goes through the dialogs. It fails at the end. Also, I verified connection etc in DB Viewer
jkennedyMemberCan you verify that on the Connection / Driver screen where it asks for the URL and the username / pwd that you have a DB Name filled in and that this DBName matches any DBName you are putting in the connect String?
We have found that for certain DB’s that if the Database name differs in these two spots, that it will fail to return the DB meta data.
Thanks,
Jack
DrmoodleMemberWhat I had was general connection to MySQL and then in the CRUD generator selected the DB and table resulting in failed generation. So based on your comment, I defined the connection direct to the DB and then in CRUD generator it worked.
So on CRUD generator you have to have it specific to the DB connection in the Driver perspective.
Thanks for your post.
Thanks, Randy
jkennedyMemberGlad to hear this resolved the issue, thanks for posting your results for others who may run into the same issue.
Thanks,
Jack -
AuthorPosts