Message Boards
Threads [ Previous | Next ]
Import data types broken? Did I break it? Or is it PBKAC?
Import data types broken? Did I break it? Or is it PBKAC? Peter Berghold 9/29/08 10:24 AM
RE: Import data types broken? Did I break it? Or is it PBKAC? Heflin Hogan 9/29/08 11:28 AM
RE: Import data types broken? Did I break it? Or is it PBKAC? Peter Berghold 9/29/08 11:36 AM
RE: Import data types broken? Did I break it? Or is it PBKAC? Peter Berghold 9/29/08 11:43 AM
RE: Import data types broken? Did I break it? Or is it PBKAC? Heflin Hogan 9/29/08 11:55 AM
RE: Import data types broken? Did I break it? Or is it PBKAC? Jack Kennedy 9/29/08 12:27 PM
RE: Import data types broken? Did I break it? Or is it PBKAC? Peter Berghold 9/29/08 1:40 PM
RE: Import data types broken? Did I break it? Or is it PBKAC? Peter Berghold 9/29/08 2:13 PM
RE: Import data types broken? Did I break it? Or is it PBKAC? Cindy Conway 9/29/08 3:00 PM
RE: Import data types broken? Did I break it? Or is it PBKAC? Cindy Conway 9/29/08 3:51 PM
RE: Import data types broken? Did I break it? Or is it PBKAC? Peter Berghold 9/29/08 4:03 PM
Success at last! Peter Berghold 9/29/08 4:10 PM
RE: Import data types broken? Did I break it? Or is it PBKAC? Peter Berghold 9/29/08 3:53 PM
RE: Import data types broken? Did I break it? Or is it PBKAC? Cindy Conway 9/29/08 4:04 PM
RE: Import data types broken? Did I break it? Or is it PBKAC? Eric Rizzo 9/29/08 2:19 PM
Import data types broken? Did I break it? Or is it PBKAC?
9/29/08 10:24 AM
Hi folks,

Boldly going forward I set up a blank project for myself. As part of this project I set up a database on Postgresql with two very simple tables. The SQL definition for them is as follows:

 1
 2
 3create table venue (
 4      venue_id           SERIAL not null PRIMARY KEY,
 5      name                text
 6);
 7
 8create table trial   (
 9      trial_id             SERIAL not null PRIMARY KEY,
10      name               TEXT,
11      venue_id          integer not null references venue(venue_id) on delete cascade
12);


My purpose for this was two fold. One I wanted to actually start applying what the tutorials have taught me thus far and I wanted to see how Skyway data types map to the schema that I am going to use for my applicaiton that I'm eventually hoping to use Skyway to build. (See http://www.agilitysteards.org if you'd like)

I created a data store under a service and set up the connection to the database for it. I then clicked on the "import data types" link and lo and behold the drop down for schema gets populated as I'd expect but the public schema seems to be blank. A quick check of the database reveals that there are tables here (and data I might add) but the import wizard isn't seeing them.

Is this a Enterprise feature or is this supported in the CE version?


Peter L. Berghold
Unix Professional
Dazed and confused Skyway Newbie.
RE: Import data types broken? Did I break it? Or is it PBKAC?
9/29/08 11:28 AM as a reply to Peter Berghold.
Can you connect to the data source via the Data Source Explorer view and see the tables? If you don't see the tab, go to Window > Show View, and pick Data Source Explorer. Then right click on your data source and choose the connect option. You should get something like this:
RE: Import data types broken? Did I break it? Or is it PBKAC?
9/29/08 11:36 AM as a reply to Heflin Hogan.
Heflin Hogan:
Can you connect to the data source via the Data Source Explorer view and see the tables? :


Yes I can. Exactly the way I'd expect.


I don't know if this has any bearing on the matter but:

  • This is on a Linux platform
  • Skyway as installed via Pulse.



Peter L. Berghold
Unix Professional
RE: Import data types broken? Did I break it? Or is it PBKAC?
9/29/08 11:43 AM as a reply to Peter Berghold.
It seems to be getting worse...


Seems now the dropdown for schemas is not even getting populated....
RE: Import data types broken? Did I break it? Or is it PBKAC?
9/29/08 11:55 AM as a reply to Peter Berghold.
There is a known issue with mixed-case table names in postgres, but based on your DDL I don't think that is the cause. Someone reminded me that I had a similar problem with importing postgres tables a while back, but the only thing I can recall was adjusting how my connection URL looked. This is the format that's working for me: jdbc:postgresql://sandbox/qapg01. Also, are you using the driver that came with Skyway?
RE: Import data types broken? Did I break it? Or is it PBKAC?
9/29/08 12:27 PM as a reply to Heflin Hogan.
Do you see anything in the Errors view?

It may help us to trouble shoot the issue.

Thanks,
Jack
RE: Import data types broken? Did I break it? Or is it PBKAC?
9/29/08 1:40 PM as a reply to Jack Kennedy.
Jack Kennedy:
Do you see anything in the Errors view?

It may help us to trouble shoot the issue.



We should be so lucky!

However, that got me thinking about the log generated by eclipse itself in the .metadata directory of the worspace.

Here is what I'm seeing there:

 1
 2!ENTRY org.eclipse.emf.common 2 0 2008-09-29 14:36:50.554
 3!MESSAGE An exception was ignored during command execution
 4!STACK 0
 5org.eclipse.emf.common.util.WrappedException: An exception was ignored during command execution
 6        at org.eclipse.emf.common.command.BasicCommandStack.handleError(BasicCommandStack.java:281)
 7        at org.eclipse.emf.common.command.BasicCommandStack.execute(BasicCommandStack.java:99)
 8        at org.skyway.integration.data.persistence.ui.datastore.editor.DataStoreMappingPage.importTypes(DataStoreMappingPage.java:190)
 9        at org.skyway.integration.data.persistence.ui.datastore.editor.DataStoreMappingPage$1.widgetSelected(DataStoreMappingPage.java:118)
10        at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227)
11        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
12        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1101)
13        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1125)
14        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1110)
15        at org.eclipse.swt.widgets.Link.gtk_button_release_event(Link.java:328)
16        at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1475)
17        at org.eclipse.swt.widgets.Control.windowProc(Control.java:4234)
18        at org.eclipse.swt.widgets.Display.windowProc(Display.java:3973)
19        at org.eclipse.swt.internal.gtk.OS._gtk_main_do_event(Native Method)
20        at org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(OS.java:5593)
21        at org.eclipse.swt.widgets.Display.eventProc(Display.java:1192)
22        at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method)
23        at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:1487)
24        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2969)
25        at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
26        at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
27        at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
28        at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
29        at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
30        at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
31        at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
32        at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
33        at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169)
34        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
35        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
36        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
37        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
38        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
39        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
40        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
41        at java.lang.reflect.Method.invoke(Method.java:597)
42        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)
43        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
44        at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
45Caused by: java.util.NoSuchElementException
46        at org.eclipse.jpt.db.internal.DTPDatabaseWrapper.getDefaultCatalogName(DTPDatabaseWrapper.java:200)
47        at org.eclipse.jpt.db.internal.ConnectionProfile.setDefaultCatalogName(ConnectionProfile.java:158)
48        at org.eclipse.jpt.db.internal.ConnectionProfile.getDatabase(ConnectionProfile.java:102)
49        at org.skyway.integration.data.persistence.ui.datatype.wizards.SelectTablesWizardPage.populateSchemaCombo(SelectTablesWizardPage.java:432)
50        at org.skyway.integration.data.persistence.ui.datatype.wizards.SelectTablesWizardPage.createControl(SelectTablesWizardPage.java:180)
51        at org.eclipse.jface.wizard.Wizard.createPageControls(Wizard.java:170)
52        at org.skyway.integration.data.persistence.ui.datatype.wizards.ImportDataTypesWizard.createPageControls(ImportDataTypesWizard.java:85)
53        at org.eclipse.jface.wizard.WizardDialog.createPageControls(WizardDialog.java:669)
54        at org.eclipse.jface.wizard.WizardDialog.createContents(WizardDialog.java:543)
55        at org.eclipse.jface.window.Window.create(Window.java:426)
56        at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1083)
57        at org.eclipse.jface.window.Window.open(Window.java:785)
58        at org.skyway.integration.data.persistence.importer.RDBMSDataTypeImporter.generateDataTypes(RDBMSDataTypeImporter.java:86)
59        at org.skyway.integration.data.persistence.importer.RDBMSDataTypeImporter.importDataTypes(RDBMSDataTypeImporter.java:55)
60        at org.skyway.integration.data.persistence.ui.datastore.editor.DataStoreMappingPage$2.doExecute(DataStoreMappingPage.java:182)
61        at org.eclipse.emf.edit.command.ChangeCommand.execute(ChangeCommand.java:144)
62        at org.eclipse.emf.common.command.BasicCommandStack.execute(BasicCommandStack.java:92)
63        ... 37 more


No idea what that means, but there it is.

Peter L. Berghold
Unix Professional
Totally bewildered Skyway Newbie.
RE: Import data types broken? Did I break it? Or is it PBKAC?
9/29/08 2:13 PM as a reply to Peter Berghold.
I took some more steps in generating useful information for debugging this problem.


I restarted the IDE while watching the output logged to the .metadata/.log file and copy pasted it to the file attached.

I created a new project, created a service for that project and then created a datastore for that service. Then I associated the same database to that datastore as I did the previously discussed project. Once I saved that I attempted to invoke the "import data types" function.

First time I clicked on the "import data types" link nothing happened. Second time I clicked it the wizard did come up but the contents of the drop down containing the name of the database connection went blank. I don't remember if it did that before and I failed to notice it or not.


I hope this helps pin down the issue.


Peter L. Berghold
Unix Professional.
RE: Import data types broken? Did I break it? Or is it PBKAC?
9/29/08 2:19 PM as a reply to Peter Berghold.
Peter Berghold:
Jack Kennedy:
Do you see anything in the Errors view?
It may help us to trouble shoot the issue.


We should be so lucky!

However, that got me thinking about the log generated by eclipse itself in the .metadata directory of the worspace.


For future reference, the Error Log view renders the same logging information that you find the the .metadata/.log files, just in a more user-friendly format. To see it, use the menu Window > Show View > Other..., then find and select the Error Log view in the dialog.
Some distributions of Eclipse may not have that view but I believe most do.

Hope this helps,
Eric
RE: Import data types broken? Did I break it? Or is it PBKAC?
9/29/08 3:00 PM as a reply to Peter Berghold.
Hi Peter,

Can you please check a couple of things for me?

1) Is there a database in your Postgres that has the same name as the user you are using in your database connection?
2) Does that database have a public schema?
3) Does your user have permission to access that public database and schema?

It looks like the method that's failing is not finding a "default" schema. It looks like the default schema is based on the userid specified in the database connection.

Please let me know what you find.

Thanks,

Cindy
RE: Import data types broken? Did I break it? Or is it PBKAC?
9/29/08 3:51 PM as a reply to Cindy Conway.
Peter,

As far as your log file is concerned, I see a couple of problems.

There are some pulse errors, but I would be very surprised if they are impacting the data type import. It looks like the pulse plugin is having problems loading. That plugin is not directly related to our plugins so we'll have to take a deeper look into that later.

The most interesting thing in the log (prior to the catalog problem) is that Eclipse had problems finding the AGSDS data store. Is that the datastore you were working with or is that the new one you just created? Did you delete, move or rename it? Or maybe you deleted, moved or renamed the project?
RE: Import data types broken? Did I break it? Or is it PBKAC?
9/29/08 3:53 PM as a reply to Cindy Conway.
Cindy Conway:


1) Is there a database in your Postgres that has the same name as the user you are using in your database connection?
2) Does that database have a public schema?
3) Does your user have permission to access that public database and schema?


Yes.. yes.. and yes...


However, based on your line of questioning I created a user with the same name as the database. This got me a bit further.

database name: agsdev
username : agsdev

Now I can pull up the public schema, see the tables and when I hit "finish" in the wizard a new problem pops up. See attached screen shot.

Stack trace as follows:

 1
 2ava.lang.RuntimeException: org.hibernate.HibernateException: Exception loading class loader to find driver:
 3    at org.skyway.integration.data.persistence.ui.datatype.wizards.ImportDataTypesWizard.generateModels(ImportDataTypesWizard.java:142)
 4    at org.skyway.integration.data.persistence.ui.datatype.wizards.ImportDataTypesWizard.performFinish(ImportDataTypesWizard.java:104)
 5    at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:742)
 6    at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:373)
 7    at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:618)
 8    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227)
 9    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
10    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1101)
11    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3319)
12    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2971)
13    at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
14    at org.eclipse.jface.window.Window.open(Window.java:796)
15    at org.skyway.integration.data.persistence.importer.RDBMSDataTypeImporter.generateDataTypes(RDBMSDataTypeImporter.java:86)
16    at org.skyway.integration.data.persistence.importer.RDBMSDataTypeImporter.importDataTypes(RDBMSDataTypeImporter.java:55)
17    at org.skyway.integration.data.persistence.ui.datastore.editor.DataStoreMappingPage$2.doExecute(DataStoreMappingPage.java:182)
18    at org.eclipse.emf.edit.command.ChangeCommand.execute(ChangeCommand.java:144)
19    at org.eclipse.emf.common.command.BasicCommandStack.execute(BasicCommandStack.java:92)
20    at org.skyway.integration.data.persistence.ui.datastore.editor.DataStoreMappingPage.importTypes(DataStoreMappingPage.java:190)
21    at org.skyway.integration.data.persistence.ui.datastore.editor.DataStoreMappingPage$1.widgetSelected(DataStoreMappingPage.java:118)
22    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227)
23    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
24    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1101)
25    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1125)
26    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1110)
27    at org.eclipse.swt.widgets.Link.gtk_button_release_event(Link.java:328)
28    at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1475)
29    at org.eclipse.swt.widgets.Control.windowProc(Control.java:4234)
30    at org.eclipse.swt.widgets.Display.windowProc(Display.java:3973)
31    at org.eclipse.swt.internal.gtk.OS._gtk_main_do_event(Native Method)
32    at org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(OS.java:5593)
33    at org.eclipse.swt.widgets.Display.eventProc(Display.java:1192)
34    at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method)
35    at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:1487)
36    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2969)
37    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
38    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
39    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
40    at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
41    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
42    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
43    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
44    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
45    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169)
46    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
47    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
48    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
49    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
50    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
51    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
52    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
53    at java.lang.reflect.Method.invoke(Method.java:597)
54    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)
55    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
56    at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
57Caused by: org.hibernate.HibernateException: Exception loading class loader to find driver:
58    at org.skyway.integration.data.persistence.importer.hibernate.JDTConnectionProvider.configure(JDTConnectionProvider.java:81)
59    at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:124)
60    at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:56)
61    at org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:414)
62    at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:62)
63    at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2005)
64    at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:40)
65    at org.skyway.integration.data.persistence.importer.hibernate.HibernateModelGenerator.createJDBCConfiguration(HibernateModelGenerator.java:202)
66    at org.skyway.integration.data.persistence.importer.hibernate.HibernateModelGenerator.generateModel(HibernateModelGenerator.java:104)
67    at org.skyway.integration.data.persistence.ui.datatype.wizards.ImportDataTypesWizard$1.execute(ImportDataTypesWizard.java:129)
68    at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:101)
69    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1797)
70    at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:113)
71    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)
72Caused by: org.hibernate.HibernateException: JDBC Driver class not found:
73    at org.skyway.integration.data.persistence.importer.hibernate.JDTConnectionProvider.sub_configure(JDTConnectionProvider.java:111)
74    at org.skyway.integration.data.persistence.importer.hibernate.JDTConnectionProvider.configure(JDTConnectionProvider.java:78)
75    ... 13 more
76Caused by: java.lang.ClassNotFoundException:
77    at java.lang.Class.forName0(Native Method)
78    at java.lang.Class.forName(Class.java:169)
79    at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:100)
80    at org.skyway.integration.data.persistence.importer.hibernate.JDTConnectionProvider.sub_configure(JDTConnectionProvider.java:106)
81    ... 14 more



Peter L. Berghold
Unix Professional
RE: Import data types broken? Did I break it? Or is it PBKAC?
9/29/08 4:03 PM as a reply to Cindy Conway.
Cindy Conway:



There are some pulse errors, but I would be very surprised if they are impacting the data type import.


Cindy, I've noticed that Pulse seems to have some quirks to work out. I have a post outstanding with the Pulse forums trying to figure some of that out.

Cindy Conway:

The most interesting thing in the log (prior to the catalog problem) is that Eclipse had problems finding the AGSDS data store. Is that the datastore you were working with or is that the new one you just created? Did you delete, move or rename it? Or maybe you deleted, moved or renamed the project?


AGSDS was never renamed, deleted or moved. It got created once and I've been working with that ever since.

Peter L. Berghold
Unix Professional
RE: Import data types broken? Did I break it? Or is it PBKAC?
9/29/08 4:04 PM as a reply to Peter Berghold.
It's complaining that it can't find the JDBC driver. Where are you referencing the driver from? Is it in the project's build path? Right-click on the project, select Properties, then look at the Java Build Path. It should appear on the libraries tab.
Success at last!
9/29/08 4:10 PM as a reply to Peter Berghold.
Given the last error I ran into I went out to the PostgreSQL site and downloaded the newest driver:

1
2 postgresql-8.3-603.jdbc4.jar


This seems to have cured the lingering problem. I have other questions, but I'll post them under the correct category.


Thanks for all the help everybody!


Peter L. Berghold
Unix Professiona
Skyway Newbie trying to feel his way around in the dark....
© Copyright 2001-2010 Skyway Software Inc. All Rights Reserved