org.hibernate.exception.SQLGrammarException: could not execute query

Hibernate JIRA | Strong Liu | 7 years ago
  1. 0

    [http://hudson.qa.jboss.com/hudson/view/Hibernate%20Community/job/hibernate-core-trunk/database=mssql2005,jdk=java15_default,label=hibernate/lastCompletedBuild/testReport/org.hibernate.test.annotations.cid/CompositeIdTest/testQueryInAndComposite/ ] org.hibernate.exception.SQLGrammarException: could not execute query at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) at org.hibernate.loader.Loader.doList(Loader.java:2276) at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2151) at org.hibernate.loader.Loader.list(Loader.java:2146) at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:118) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1706) at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:347) at org.hibernate.test.annotations.cid.CompositeIdTest.testQueryInAndComposite(CompositeIdTest.java:306) Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near ','. at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:156) at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1373) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:371) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:322) at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4003) at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1550) at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:160) at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:133) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery(SQLServerPreparedStatement.java:265) at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208) at org.hibernate.loader.Loader.getResultSet(Loader.java:1832) at org.hibernate.loader.Loader.doQuery(Loader.java:719) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:271) at org.hibernate.loader.Loader.doList(Loader.java:2273) ... 32 more

    Hibernate JIRA | 7 years ago | Strong Liu
    org.hibernate.exception.SQLGrammarException: could not execute query
  2. 0

    [http://hudson.qa.jboss.com/hudson/view/Hibernate%20Community/job/hibernate-core-trunk/database=mssql2005,jdk=java15_default,label=hibernate/lastCompletedBuild/testReport/org.hibernate.test.annotations.cid/CompositeIdTest/testQueryInAndComposite/ ] org.hibernate.exception.SQLGrammarException: could not execute query at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) at org.hibernate.loader.Loader.doList(Loader.java:2276) at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2151) at org.hibernate.loader.Loader.list(Loader.java:2146) at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:118) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1706) at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:347) at org.hibernate.test.annotations.cid.CompositeIdTest.testQueryInAndComposite(CompositeIdTest.java:306) Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near ','. at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:156) at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1373) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:371) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:322) at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4003) at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1550) at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:160) at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:133) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery(SQLServerPreparedStatement.java:265) at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208) at org.hibernate.loader.Loader.getResultSet(Loader.java:1832) at org.hibernate.loader.Loader.doQuery(Loader.java:719) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:271) at org.hibernate.loader.Loader.doList(Loader.java:2273) ... 32 more

    Hibernate JIRA | 7 years ago | Strong Liu
    org.hibernate.exception.SQLGrammarException: could not execute query
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    [JBPAPP-3223] HHH-3164 "id in ..." with EmbeddedId and criteria API - JBoss Issue Tracker

    jboss.org | 2 years ago
    org.hibernate.exception.SQLGrammarException: could not execute query

  1. muffinmannen 2 times, last 5 months ago
37 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. com.microsoft.sqlserver.jdbc.SQLServerException

    Incorrect syntax near ','.

    at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError()
  2. com.microsoft.sqlserver
    SQLServerPreparedStatement.executeQuery
    1. com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:156)
    2. com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1373)
    3. com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:371)
    4. com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:322)
    5. com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4003)
    6. com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1550)
    7. com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:160)
    8. com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:133)
    9. com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery(SQLServerPreparedStatement.java:265)
    9 frames
  3. Hibernate
    CriteriaLoader.list
    1. org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208)
    2. org.hibernate.loader.Loader.getResultSet(Loader.java:1832)
    3. org.hibernate.loader.Loader.doQuery(Loader.java:719)
    4. org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:271)
    5. org.hibernate.loader.Loader.doList(Loader.java:2273)
    6. org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
    7. org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
    8. org.hibernate.loader.Loader.doList(Loader.java:2276)
    9. org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2151)
    10. org.hibernate.loader.Loader.list(Loader.java:2146)
    11. org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:118)
    11 frames
  4. Hibernate
    CriteriaImpl.list
    1. org.hibernate.impl.SessionImpl.list(SessionImpl.java:1706)
    2. org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:347)
    2 frames
  5. org.hibernate.test
    CompositeIdTest.testQueryInAndComposite
    1. org.hibernate.test.annotations.cid.CompositeIdTest.testQueryInAndComposite(CompositeIdTest.java:306)
    1 frame