Bug 1016553 - DDL importer problems for both source and view models
DDL importer problems for both source and view models
Status: CLOSED NOTABUG
Product: JBoss Data Virtualization 6
Classification: JBoss
Component: Tooling (Show other bugs)
6.0.0
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: Van Halbert
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-08 06:42 EDT by Ken Johnson
Modified: 2013-11-21 10:15 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-28 17:16:42 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
sample ddl (1.02 KB, text/plain)
2013-10-08 06:42 EDT, Ken Johnson
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker TEIIDDES-1885 Major Closed DDL importer problems - TeiidServerManager initialization problem 2013-11-21 10:32:33 EST

  None (edit)
Description Ken Johnson 2013-10-08 06:42:53 EDT
Created attachment 809195 [details]
sample ddl

Description of problem:
When Importing from DDL to create a new view model (DDL File >> Source or View model), the following problems appear:

a) when choosing auto-select for dialect, the wizard raises the difference panel after hitting Next with generic "Error encountered importing DDL" message and a "No difference report was found" message. 

b) when leaving auto-select unchecked for dialect, clicking Next produces a DDL failed to parse error (as well as a 'No difference report was found" error.

The DDL in question works in JBDS 6 and earlier.


Version-Release number of selected component (if applicable):
JBDS 7 with JBDSIS 7 beta 4

How reproducible:
Consistent.

Steps to Reproduce:
Import attached DDL via importer.

Actual results:


Expected results:


Additional info:
Comment 1 JBoss JIRA Server 2013-10-10 10:15:13 EDT
Barry LaFond <blafond@jboss.org> made a comment on jira TEIIDDES-1885

I wasn't able to repeat the scenario as above... what I found was

1) Import attached DDL file
2) The DDL Importer comes up defaulted to TEIID dialect and Auto-Select == FALSE
* This results in a parsing error on Differences page since the DDL file does not contain Teiid Dialect and the importer was forced to try and parse the DDL using Modeshape DDL Parser
3) Turning Auto-select == TRUE and clicking NEXT
* This results in no error on the Differences page since the importer should have discovered/used the standard SQL92 dialect.
4) FINISH created the desired models
Comment 2 JBoss JIRA Server 2013-10-10 10:36:29 EDT
Barry LaFond <blafond@jboss.org> made a comment on jira TEIIDDES-1885

I wasn't able to repeat the scenario as above in my IDE ... what I found was

1) Import attached DDL file
2) The DDL Importer comes up defaulted to TEIID dialect and Auto-Select == FALSE
* This results in a parsing error on Differences page since the DDL file does not contain Teiid Dialect and the importer was forced to try and parse the DDL using Modeshape DDL Parser
3) Turning Auto-select == TRUE and clicking NEXT
* This results in no error on the Differences page since the importer should have discovered/used the standard SQL92 dialect.
4) FINISH created the desired models

Also tested in a JBDS 7.0 GA + Designer 8.2.Final and got same expected behavior
Comment 5 JBoss JIRA Server 2013-10-28 15:10:05 EDT
Barry LaFond <blafond@jboss.org> updated the status of jira TEIIDDES-1885 to Resolved
Comment 6 JBoss JIRA Server 2013-10-28 15:10:05 EDT
Barry LaFond <blafond@jboss.org> made a comment on jira TEIIDDES-1885

Simply change the default Teiid DDL dialect selection to Oracle and import works fine.
Comment 7 JBoss JIRA Server 2013-11-14 07:28:47 EST
Lucie Fabrikova <lfabriko@redhat.com> made a comment on jira TEIIDDES-1885

I observed this error again, on MacOS; the "No difference report was found, See the import messages for more info" occured for these combinations:
- Auto-select unchecked + any of dialects
- Auto-select checked
The option "TEIID" dialect generated a preview of DDL contents, but the error message is same.
Comment 8 JBoss JIRA Server 2013-11-14 08:19:50 EST
Lucie Fabrikova <lfabriko@redhat.com> made a comment on jira TEIIDDES-1885

I observed this error again, on MacOS; the "No difference report was found, See the import messages for more info" occured for these combinations:
- Auto-select unchecked + any of dialects
- Auto-select checked
The option "TEIID" dialect generated a preview of DDL contents, but the error message is same.
Observed on both java 1.6 apple, 1.7 oracle + MacOS 10.8.
Comment 9 JBoss JIRA Server 2013-11-14 11:28:42 EST
Barry LaFond <blafond@jboss.org> updated the status of jira TEIIDDES-1885 to Reopened
Comment 10 JBoss JIRA Server 2013-11-14 11:39:06 EST
Mark Drilling <mdrilling@redhat.com> made a comment on jira TEIIDDES-1885

From the log, the root cause:
Root exception:
java.lang.RuntimeException: java.lang.RuntimeException: Programming error: The TeiidServerManager is being used before it has been initialised
	at org.teiid.designer.core.ModelerCore.getTeiidQueryService(ModelerCore.java:2199)
	at org.teiid.designer.metamodels.relational.util.RelationalTypeMappingImpl.getDatatype(RelationalTypeMappingImpl.java:156)
	at org.teiid.designer.metamodels.relational.util.RelationalTypeMappingImpl.getDatatype(RelationalTypeMappingImpl.java:133)
	at org.teiid.designer.ddl.importer.node.StandardImporter.getTeiidDataTypeName(StandardImporter.java:291)
	at org.teiid.designer.ddl.importer.node.StandardImporter.createColumn(StandardImporter.java:315)
	at org.teiid.designer.ddl.importer.node.StandardImporter.createObject(StandardImporter.java:602)
	at org.teiid.designer.ddl.importer.node.StandardImporter.importNode(StandardImporter.java:571)
	at org.teiid.designer.ddl.importer.DdlImporter.importDdl(DdlImporter.java:180)
	at org.teiid.designer.ddl.importer.DdlImporter$1.tryToDo(DdlImporter.java:106)
	at org.teiid.core.designer.util.OperationUtil.perform(OperationUtil.java:40)
	at org.teiid.designer.ddl.importer.DdlImporter.importDdl(DdlImporter.java:90)
	at org.teiid.designer.ddl.importer.ui.DdlImportDifferencesPage$1.run(DdlImportDifferencesPage.java:222)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Caused by: java.lang.RuntimeException: Programming error: The TeiidServerManager is being used before it has been initialised
	at org.teiid.designer.runtime.TeiidServerManager.checkStarted(TeiidServerManager.java:325)
	at org.teiid.designer.runtime.TeiidServerManager.getDefaultServerVersion(TeiidServerManager.java:418)
	at org.teiid.designer.core.ModelerCore.getTeiidQueryService(ModelerCore.java:2197)
	... 12 more
Comment 11 JBoss JIRA Server 2013-11-18 11:54:56 EST
Paul Richardson <p.g.richardson@phantomjinx.co.uk> made a comment on jira TEIIDDES-1885

[~lfabriko],

When you observed this error, did you have a server configured? Seems your setup never initialised the server manager.
Comment 12 JBoss JIRA Server 2013-11-19 09:56:18 EST
Lucie Fabrikova <lfabriko@redhat.com> made a comment on jira TEIIDDES-1885

No, the server wasn't configured (this test case didn't require the server)
Comment 13 JBoss JIRA Server 2013-11-20 08:29:42 EST
Paul Richardson <p.g.richardson@phantomjinx.co.uk> made a comment on jira TEIIDDES-1885

Debugging this on linux (so not quite the right platform) ...

Placing a breakpoint on TeiidServerManager's constructor demonstrates that an instance is being correctly instantiated once ModelerCore.getTeiidServerManager() is called. Likewise, a subsequent breakpoint on TeiidServerManager.getTeiidServerVersion() indicates a successful return of a version number.

[~lfabriko] are you able to apply similar breakpoints and test whether this is the case on macOs?
Comment 14 JBoss JIRA Server 2013-11-21 07:13:57 EST
Lucie Fabrikova <lfabriko@redhat.com> made a comment on jira TEIIDDES-1885

I debugged Teiid Designer on MacOS, applied given breakpoints - and the model was imported correctly. The error message didn't occur at all; and TeiidServerManager wasn't null.
Comment 15 JBoss JIRA Server 2013-11-21 09:47:25 EST
Lucie Fabrikova <lfabriko@redhat.com> made a comment on jira TEIIDDES-1885

The problem seems to be an issue with the automatized test environment setup, I couldn't reproduce it manually as a user. 

Workaround for the automatized test: switch to tab "Servers" and invoke the "New server definition" wizard. Next, the DDL can be imported...
Comment 16 JBoss JIRA Server 2013-11-21 10:15:01 EST
Lucie Fabrikova <lfabriko@redhat.com> updated the status of jira TEIIDDES-1885 to Closed

Note You need to log in before you can comment on or make changes to this bug.