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

Bug 363484

Summary: getting table content - error
Product: z_Archived Reporter: Chris Houben <cho>
Component: EDTAssignee: Project Inbox <edt.compiler-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: jvincens
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Chris Houben CLA 2011-11-10 10:42:16 EST
Build Identifier: 20110916-0149 (nighly build)

// basic library
library customerLib
	
	connUrl string = "jdbc:derby:C:\\Users\\ASIST\\Desktop\\EGLDerbyR7\\EGLDerbyR7;create=true";
	ds SQLDataSource = new SQLDataSource(connUrl);
	function functionName()
		
		cUSTOMER CUSTOMER?;
		
		get cUSTOMER from ds
			with
				#sql{
					select
						*
					from
						CUSTOMER t1
			--		where
			--			* = ?
					order by
						CUSTOMER.CUSTOMER_ID asc
				};
	end

record CUSTOMER type Entity{@table{name = "CUSTOMER"}}
    CUSTOMER_ID int{@id};
    FIRST_NAME string?;
    LAST_NAME string?;
    PASSWORD string?;
    PHONE string?;
    EMAIL_ADDRESS string?;
    STREET string?;
    APARTMENT string?;
    CITY string?;
    STATE string?;
    POSTALCODE string?;
    DIRECTIONS string?;
end

error on the get statement:

IWN.JavascriptGen.9998.e 14/282 Exception occurred: No such method genStatementBody(org.eclipse.edt.mof.eglx.persistence.sql.impl.SqlGetByKeyStatementImpl, 
 org.eclipse.edt.gen.javascript.Context, org.eclipse.edt.mof.codegen.api.TabbedWriter, ) for any template for Class org.eclipse.edt.mof.eglx.persistence.sql.impl.SqlGetByKeyStatementImpl

Reproducible: Sometimes
Comment 1 Joseph Vincens CLA 2011-11-10 11:33:30 EST
The problem is the library is being generated for javascript and JS gen does not support SQL.
To eliminate the problem you will need to turn off the JavaScript generator for the library, package, or project. Select the library, package, or project right click and select properties. Under EGL Compiler check Override generation settings and uncheck the JavaScript generator save, then rebuild the project.

We already have a general bug open for JavaScript generation validation.

*** This bug has been marked as a duplicate of bug 363498 ***