Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 370641

Summary: Unable to create records with New Record > SQL Database wizard
Product: z_Archived Reporter: Will Smythe <smythew>
Component: EDTAssignee: Justin Spadea <jspadea>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jeffdouglas, jspadea, svihovec
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Will Smythe CLA 2012-02-04 14:17:58 EST
I have tried both a DB2 9 and Derby database with the same results: the Preview in the 'Record from SQL Database' is empty (you should see X number of record definitions) after selecting a table(s) in the previous page of the wizard. If you press Finish, you end up with a single generic record:

record MyRecords

    itemName string;

end

So, net-net: the wizard to create entity records from a SQL database table/view is broken.

I am using 0.8.0.v201202022101
Comment 1 Brian Svihovec CLA 2012-02-07 16:34:07 EST
Changed EGLSourceGenerator, DataToolsObjectsToEglSource, and RecordFromSqlDatabaseWizard to use the new generation contribution framework.
Comment 2 Will Smythe CLA 2012-02-11 07:53:35 EST
The preview page is now correctly showing my Entity records, but when I click Finish, this is what gets added to the file:

record CommonRecords

    itemName string;

end

I am using 0.8.0.v201202102101
Comment 3 Brian Svihovec CLA 2012-02-13 09:59:55 EST
Justin,

The latest issue seems to be related to the changes you made for JNDI in BindingSQLDatabaseConfiguration::executeAddBinding.  In this particular test case I am using Derby, and the 'uri' field is NULL.  There is a block of code in this method that says, "if (useUri()) {", but JNDI code was added above this that says, "if (!getUri().startsWith("jndi://")) {".  This is causing an NPE to be thrown, so the wizard defaults to the standard record template.
Comment 4 Justin Spadea CLA 2012-02-13 10:51:48 EST
Fixed BindingSQLDatabaseConfiguration.java
Comment 5 Will Smythe CLA 2012-02-21 07:50:52 EST
Verified in 2/20 nightly build.