We keep getting the following exception when running our SEAM web application. The SEAM entities were generated using the command line tool, seam generate. The issue seems to be the select count() being created by SEAM/Hibernate:
- JDK 1.6.0, 12
- SEAM 2.1.2.GA
- JBoss 4.2.3.GA
- SQL Server 2005
11:00:36,017 INFO [STDOUT] Hibernate: select top 26 swcmfg0_.mfg_name as mfg1_25_, swcmfg0_.num_discovered_products as num2_25_, swcmfg0_.num_discovered_installs as num3_25_, swcmfg0_.restricted as restricted25_, swcmfg0_.restriction_group as restrict5_25_, swcmfg0_.restriction_by as restrict6_25_, swcmfg0_.reviewed_by as reviewed7_25_, swcmfg0_.source_system as source8_25_, swcmfg0_.source_guid as source9_25_, swcmfg0_.source_key as source10_25_, swcmfg0_.excluded as excluded25_, swcmfg0_.entered_on as entered12_25_, swcmfg0_.entered_by as entered13_25_ from swc.dbo.swc_mfg swcmfg0_ 11:00:36,034 INFO [STDOUT] Hibernate: select count((swcmfg0_.mfg_name, swcmfg0_.num_discovered_products, swcmfg0_.num_discovered_installs, swcmfg0_.restricted, swcmfg0_.restriction_group, swcmfg0_.restriction_by, swcmfg0_.reviewed_by, swcmfg0_.source_system, swcmfg0_.source_guid, swcmfg0_.source_key, swcmfg0_.excluded, swcmfg0_.entered_on, swcmfg0_.entered_by)) as col_0_0_ from swc.dbo.swc_mfg swcmfg0_ 11:00:36,039 WARN [JDBCExceptionReporter] SQL Error: 102, SQLState: S0001 11:00:36,039 ERROR [JDBCExceptionReporter] Incorrect syntax near ','. 11:00:36,043 ERROR [STDERR] Jul 15, 2011 11:00:36 AM com.sun.facelets.FaceletViewHandler handleRenderException SEVERE: Error Rendering View[/SwcMfgList.xhtml] javax.el.ELException: /SwcMfgList.xhtml: Error reading 'resultCount' on type com.lmig.swc.action.SwcMfgList_$$_javassist_seam_2 at com.sun.facelets.compiler.TextInstruction.write(TextInstruction.java:48)
The 1st SQL statement works fine. The 2nd SQL statement, select count((...all table columns)) is the one that fails.
Is there anyway to override this select count(( ... )) statement?
Anyone know why it's putting all the column names from the table inside the count() function?