Hi all
I configured two datasources for my seam application one to Oracle 10 and one to SQLSErver2005. After using seam-gen to generate entities and list pages for a view on the SQL Server, I am getting the fllowing error from SQLServer:
SQL Error: 156, SQLState: S0001
The query has invalid syntax for MSSQL. Is there any additional setting I need to change to get this simple query formatted correctly?
17:25:10,664 INFO [STDOUT] Hibernate: select top 26 clientconf0_.Conference Name as Conference1_36_, clientconf0_.FMNO as FMNO36_, clientconf0_.Client Name as Client3_36_, clientconf0_.ConferenceRef as Conferen4_36_, clientconf0_.UsesCPIN as UsesCPIN36_, clientconf0_.UsesMPIN as UsesMPIN36_, clientconf0_.Conference Status as Conference7_36_ from ClientConferenceStatus clientconf0_ 17:25:10,965 WARN [JDBCExceptionReporter] SQL Error: 156, SQLState: S0001 17:25:10,965 ERROR [JDBCExceptionReporter] Incorrect syntax near the keyword 'as'.
My persistencen unit:
<persistence-unit name="AudioConferenceMsSql"> <provider>org.hibernate.ejb.HibernatePersistence</provider> <jta-data-source>java:/AudioConferenceDatasourceMsSql</jta-data-source> <properties> <property name="hibernate.dialect" value="org.hibernate.dialect.SQLServerDialect"/> <property name="hibernate.hbm2ddl.auto" value="none"/> <property name="hibernate.show_sql" value="true"/> <property name="hibernate.format_sql" value="true"/> <property name="jboss.entity.manager.factory.jndi.name" value="java:/AudioConferenceEntityManagerFactoryMsSql"/> </properties> </persistence-unit>
I would have posted on the Hibernate forum, but I do not know when this ever will come back.
Thanks all for any hints,
Wolfgang
This must be a syntax error:
clientconf0_.Conference Name
should it not be:
clientconf0_.ConferenceName
(note the space)
do you column names (at least some of them) have spaces in them??
the hibernate forum is available now.