- This topic has 17 replies, 4 voices, and was last updated 14 years, 2 months ago by davemeurer.
-
AuthorPosts
-
invantixMemberI am able to scaffold from the derby database but not from a MS SQLServer database. When I get to the third page “Select Database Tables” the controls are all disabled. I looked at the databases in MyExlipse Database Explorer and I notice something different about the SQL Server hierarchy.There is another level (database) above the schema level. This is shown below with the level (TestDatabae)
MyEclipse Derby Connected to MyEclipse Derby APP CLASSICCARS MYBLOG MySQL Server Connected to MySQL Server TestDatabase SALES SYSADM SYS
Heflin HoganMemberWhich version of MS SQLServer are you using?
invantixMemberWell in that case it was SQLServer 2008 but I just tried with a SQL 2000 instance and the behavbior is the same.
invantixMemberWell in that case it was SQLServer 2008 but I just tried with a SQL 2000 instance and the behavbior is the same.
invantixMemberTried a different SQLServer JDBC driver and that did not work either. Both driver are from microsoft and are pure java drivers. I can access the databases and query them just fine with the MyEclipse Database explorer.
In either case when trying to scaffold, there is no error just a screen with disabled controls.
Heflin HoganMemberCan you send me a link to the driver(s) you’ve tried? I just tested with the jTDS driver and I have no issues. Also, have you opened the Error View to see if there is any messaging?
The behavior looks a little bit like an issue we’ve had with MySQL, where failing to supply a database name on the JDBC connection URL, or a database that is not the default for the user, results in a panel that doesn’t let you select anything.
invantixMemberHere is a link to the driver download
invantixMember@hhogan wrote:
Also, have you opened the Error View to see if there is any messaging?
I checked the log and found this:
org.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 com.skyway.scaffolding.crud.action.CrudAction.run(CrudAction.java:59) 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.core.persistence.tools.myeclipse.MyEclipseConnectionProfile.getDefaultCatalogName(MyEclipseConnectionProfile.java:183) at com.skyway.core.persistence.tools.myeclipse.MyEclipseConnectionProfile.getDefaultCatalog(MyEclipseConnectionProfile.java:174) at org.skyway.integration.data.persistence.ui.controls.SourceTargetTableSelectionComposite.populateCatalogCombo(SourceTargetTableSelectionComposite.java:361) at org.skyway.integration.data.persistence.ui.controls.SourceTargetTableSelectionComposite.populate(SourceTargetTableSelectionComposite.java:223) at org.skyway.integration.data.persistence.ui.controls.SourceTargetTableSelectionComposite.setInput(SourceTargetTableSelectionComposite.java:214) at org.skyway.integration.data.persistence.ui.datatype.wizards.SourceTargetTableSelectionWizardPage$2.run(SourceTargetTableSelectionWizardPage.java:74) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134) ... 33 more
Thanks
Heflin HoganMemberThat looks like our known issue. We have a fixed scheduled for the next release for the behavior, but you can work around the problem. I used the jdbc4 driver from the package you linked to, with the URL format “jdbc:sqlserver://testhost;databaseName=testdb”. The user I connected with has testdb as login default database. I was able to scaffold with issue this way. Failing to provide the database will result in a blank table selection panel, and chosing a non-default database will generate the stack trace you’ve posted.
jzengelMemberI am happy that I came across this post. I am experiencing the same problem with the jtds jdbc driver. My url is jdbc:jtds:sqlserver://127.0.0.1:1433/Consultant. I can successfully do everything else in MyEclipse such as view/edit table data and reverse engineer hibernate objects with MyEclipse. I just tried the suggestion provided by creating a new user that is assigned the database needed as the default database. I still get the same exception listed by the other poster. If there are any more suggestions, please contact me:
org.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:174)
at com.skyway.scaffolding.crud.action.GenerateCrudApplicationAction.invokeUserInterface(GenerateCrudApplicationAction.java:36)
at org.skyway.core.generate.execute.GenerationInvoker.invoke(GenerationInvoker.java:62)
at com.skyway.scaffolding.crud.action.GenerateCrudApplicationAction.invoke(GenerateCrudApplicationAction.java:45)
at org.skyway.core.generate.execute.GenerationActionInvoker.run(GenerationActionInvoker.java:38)
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:199)
at com.skyway.myeclipseforspring.persistence.MyEclipseConnectionProfile.getDefaultCatalog(MyEclipseConnectionProfile.java:190)
at org.skyway.integration.data.persistence.ui.controls.SourceTargetTableSelectionComposite.populateCatalogCombo(SourceTargetTableSelectionComposite.java:374)
at org.skyway.integration.data.persistence.ui.controls.SourceTargetTableSelectionComposite.populate(SourceTargetTableSelectionComposite.java:242)
at org.skyway.integration.data.persistence.ui.controls.SourceTargetTableSelectionComposite.setInput(SourceTargetTableSelectionComposite.java:214)
at org.skyway.integration.data.persistence.ui.datatype.wizards.SourceTargetTableSelectionWizardPage$4.run(SourceTargetTableSelectionWizardPage.java:95)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
… 38 moreRegards
John
jzengelMemberI went back and just tried the Microsoft JDBC provided driver with success, in the context of brining up the database artifacts in the scaffold wizard. There’s just something about JTDS that is not playing nice.
Heflin HoganMemberI’m glad the MS driver worked for you. I was trying to reproduce your issue with the JTDS driver, and while I am not getting the stack trace you supplied, I am getting some inconsistent behavior.
Please let us know if you need any further assistance.
invantixMemberI decided to give this spring scaffold thing a try again. I am still not able to get it working with either driver (jtds or SQLServerDriver )
For the connectios I creates I can do everything else in myEclipse, browse, view table.object info…I tried with a user defaulted to the database and naming the database on the URL and that tit not help.
This looks to be a great tool in the demo but I just cannot get it working.Any ideas?
davemeurerMemberHello,
Apologies for the continued issues.
Since it’s been a couple months since the last time you tried, can we assume that you are trying the same driver and getting the same error in the error log?
In August, we pushed out 8.6. If you can also confirm that you are using the latest ME4S version, I would appreciate it. I did try using a different databaseName in my URL and scaffolding did not work. So, the databaseName property definitely needs to be in the connection string with the schema that you intend to use in scaffolding.
Also, most of the time you will need to do the “Reconnect & Refresh” right-click option after making changes to the connection for it to take with scaffolding.
Let me know – thanks for your patience.
Dave
invantixMember@davemeurer wrote:
Since it’s been a couple months since the last time you tried, can we assume that you are trying the same driver and getting the same error in the error log?
Yes I am using that driver and also tried JTDS…
@davemeurer wrote:
In August, we pushed out 8.6. If you can also confirm that you are using the latest ME4S version, I would appreciate it. I did try using a different databaseName in my URL and scaffolding did not work. So, the databaseName property definitely needs to be in the connection string with the schema that you intend to use in scaffolding.
Also, most of the time you will need to do the “Reconnect & Refresh” right-click option after making changes to the connection for it to take with scaffolding.
I am ysing 8.6 and have done the reconnect and even restarted myEclipse.
Has anyone tried to trace the problem by stepping through the code. I could be wrong but I imagine there just needs to be some logic to get the correct hierarchy to the tables in the metadata. I see that mssql has an extra level that mySQL and derby do not. -
AuthorPosts