Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:3.1rc2
Hi, I'm trying to build the Hibernate demo program for the first time. Its able to create the tables in my Sybase 11.9 database but it can't run the HQL.
Looks as though the generated SQL results in a 'left join' which is invalid for transact-SQL.
Any help appreciated!
Ant
Full stack trace of any exception that occurs:
Code:
[java] Setting up some test data
[java] Viewing all auction item objects
[java] 16:12:43,949 WARN JDBCExceptionReporter:71 - SQL Error: 102, SQLState: 42000
[java] 16:12:43,950 ERROR JDBCExceptionReporter:72 - Incorrect syntax near 'left'.
[java] Exception in thread "main" org.hibernate.exception.SQLGrammarException: could not execute query
[java] at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:65)
[java] at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
[java] at org.hibernate.loader.Loader.doList(Loader.java:2150)
[java] at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2026)
[java] at org.hibernate.loader.Loader.list(Loader.java:2021)
[java] at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:369)
[java] at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:298)
[java] at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1020)
[java] at org.hibernate.impl.QueryImpl.list(QueryImpl.java:74)
[java] at org.hibernate.auction.Main.viewAllAuctionsSlow(Main.java:93)
[java] at org.hibernate.auction.Main.main(Main.java:371)
[java] Caused by: com.sybase.jdbc2.jdbc.SybSQLException: Incorrect syntax near 'left'.
[java] at com.sybase.jdbc2.tds.Tds.processEed(Tds.java:2110)
[java] at com.sybase.jdbc2.tds.Tds.nextResult(Tds.java:1578)
[java] at com.sybase.jdbc2.jdbc.ResultGetter.nextResult(ResultGetter.java:69)
[java] at com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:159)
[java] at com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:140)
[java] at com.sybase.jdbc2.jdbc.SybStatement.queryLoop(SybStatement.java:1350)
[java] at com.sybase.jdbc2.jdbc.SybStatement.executeQuery(SybStatement.java:1335)
[java] at com.sybase.jdbc2.jdbc.SybPreparedStatement.executeQuery(SybPreparedStatement.java:69)
[java] at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:137)
[java] at org.hibernate.loader.Loader.getResultSet(Loader.java:1676)
[java] at org.hibernate.loader.Loader.doQuery(Loader.java:662)
[java] at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:223)
[java] at org.hibernate.loader.Loader.doList(Loader.java:2147)
[java] ... 8 more
Name and version of the database you are using:Sybase 11.9
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt: