org.hibernate.exception.GenericJDBCException

Incorrect syntax near the keyword 'as'.

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web454

  • via Unknown by Dan McCallum,
  • via Unknown by Dan McCallum,
  • via Unknown by Jason Elwood,
  • Stack trace

    • org.hibernate.exception.GenericJDBCException: Incorrect syntax near the keyword 'as'. at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:52)[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125)[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:110)[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.engine.jdbc.internal.proxy.AbstractStatementProxyHandler.continueInvocation(AbstractStatementProxyHandler.java:129)[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.engine.jdbc.internal.proxy.AbstractProxyHandler.invoke(AbstractProxyHandler.java:81)[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at $Proxy259.executeQuery(Unknown Source)[na:na] at org.hibernate.loader.Loader.getResultSet(Loader.java:1978)[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.loader.Loader.doQuery(Loader.java:829)[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:289)[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.loader.Loader.doList(Loader.java:2463)[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.loader.Loader.doList(Loader.java:2449)[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2279)[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.loader.Loader.list(Loader.java:2274)[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:122)[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1483)[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.internal.CriteriaImpl.list(CriteriaImpl.java:374)[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.jasig.ssp.dao.AbstractDao.processCriteriaWithSortingAndPaging(AbstractDao.java:134)[AbstractDao.class:na] at org.jasig.ssp.dao.AbstractDao.processCriteriaWithStatusSortingAndPaging(AbstractDao.java:149)[AbstractDao.class:na] at org.jasig.ssp.dao.MessageDao.queued(MessageDao.java:76)[MessageDao.class:na] at org.jasig.ssp.service.impl.MessageServiceImpl.sendQueuedMessageBatch(MessageServiceImpl.java:291)[MessageServiceImpl.class:na] at org.jasig.ssp.service.impl.MessageServiceImpl.access$000(MessageServiceImpl.java:70)[MessageServiceImpl.class:na] at org.jasig.ssp.service.impl.MessageServiceImpl$1.call(MessageServiceImpl.java:235)[MessageServiceImpl$1.class:na] at org.jasig.ssp.service.impl.MessageServiceImpl$1.call(MessageServiceImpl.java:231)[MessageServiceImpl$1.class:na] at org.jasig.ssp.util.transaction.WithTransactionImpl.doWork(WithTransactionImpl.java:61)[WithTransactionImpl.class:na] at org.jasig.ssp.util.transaction.WithTransactionImpl.doWorkUnchecked(WithTransactionImpl.java:66)[WithTransactionImpl.class:na] at org.jasig.ssp.util.transaction.WithTransactionImpl.withTransactionAndUncheckedExceptions(WithTransactionImpl.java:57)[WithTransactionImpl.class:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.6.0_37] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[na:1.6.0_37] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[na:1.6.0_37] at java.lang.reflect.Method.invoke(Method.java:597)[na:1.6.0_37] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:319)[spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)[spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)[spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)[spring-tx-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)[spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)[spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at $Proxy270.withTransactionAndUncheckedExceptions(Unknown Source)[na:na] at org.jasig.ssp.service.impl.MessageServiceImpl.sendQueuedMessages(MessageServiceImpl.java:229)[MessageServiceImpl.class:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.6.0_37] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[na:1.6.0_37] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[na:1.6.0_37] at java.lang.reflect.Method.invoke(Method.java:597)[na:1.6.0_37] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:319)[spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:196)[spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at $Proxy274.sendQueuedMessages(Unknown Source)[na:na] at org.jasig.ssp.service.impl.ScheduledTaskWrapperServiceImpl.sendMessages(ScheduledTaskWrapperServiceImpl.java:445)[ScheduledTaskWrapperServiceImpl.class:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.6.0_37] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[na:1.6.0_37] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[na:1.6.0_37] at java.lang.reflect.Method.invoke(Method.java:597)[na:1.6.0_37] at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:64)[spring-context-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:53)[spring-context-3.1.2.RELEASE.jar:3.1.2.RELEASE] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)[na:1.6.0_37] at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)[na:1.6.0_37] at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)[na:1.6.0_37] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)[na:1.6.0_37] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)[na:1.6.0_37] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)[na:1.6.0_37] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[na:1.6.0_37] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[na:1.6.0_37] at java.lang.Thread.run(Thread.java:680)[na:1.6.0_37] Caused by: java.sql.SQLException: Incorrect syntax near the keyword 'as'. at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:368)[jtds-1.2.4.jar:1.2.4] at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2820)[jtds-1.2.4.jar:1.2.4] at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2258)[jtds-1.2.4.jar:1.2.4] at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:632)[jtds-1.2.4.jar:1.2.4] at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:477)[jtds-1.2.4.jar:1.2.4] at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeQuery(JtdsPreparedStatement.java:778)[jtds-1.2.4.jar:1.2.4] at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)[commons-dbcp-1.4.jar:1.4] at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)[commons-dbcp-1.4.jar:1.4] at sun.reflect.GeneratedMethodAccessor187.invoke(Unknown Source)[na:na] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[na:1.6.0_37] at java.lang.reflect.Method.invoke(Method.java:597)[na:1.6.0_37] at org.hibernate.engine.jdbc.internal.proxy.AbstractStatementProxyHandler.continueInvocation(AbstractStatementProxyHandler.java:122)[hibernate-core-4.0.1.Final.jar:4.0.1.Final] ... 57 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown visitor
    Unknown visitorOnce,
    oddodd
    2 times, last one
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    ruifungruifung
    Once,
    24 more bugmates