org.hibernate.exception.GenericJDBCException: Incorrect syntax near the keyword 'as'.

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Apereo Issues by Dan McCallum, 1 year ago
Incorrect syntax near the keyword 'as'.
via Apereo Issues by Dan McCallum, 1 year ago
Incorrect syntax near the keyword 'as'.
via Apereo Issues by Jason Elwood, 1 year ago
Incorrect syntax near the keyword 'as'.
via Apereo Issues by Jason Elwood, 1 year ago
Incorrect syntax near the keyword 'as'.
via GitHub by milci199
, 2 years ago
General error: "java.lang.ArrayIndexOutOfBoundsException: 2048"; SQL statement:|select devices0_.users_id as users1_4_3_, devices0_.devices_id as devices2_5_3_, device1_.id as id1_0_, device1_.latestPosition_id as latestPo4_1_0_, device1_.name as
via Stack Overflow by Sarah
, 9 months ago
The requested operation is not supported on forward only result sets
java.sql.SQLException: Incorrect syntax near the keyword 'as'.
at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:368)
at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2820)
at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2258)
at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:632)
at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:477)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)
at sun.reflect.GeneratedMethodAccessor187.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.hibernate.engine.jdbc.internal.proxy.AbstractStatementProxyHandler.continueInvocation(AbstractStatementProxyHandler.java:122)
at org.hibernate.engine.jdbc.internal.proxy.AbstractProxyHandler.invoke(AbstractProxyHandler.java:81)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1978)
at org.hibernate.loader.Loader.doQuery(Loader.java:829)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:289)
at org.hibernate.loader.Loader.doList(Loader.java:2463)
at org.hibernate.loader.Loader.doList(Loader.java:2449)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2279)
at org.hibernate.loader.Loader.list(Loader.java:2274)
at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:122)
at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1483)
at org.hibernate.internal.CriteriaImpl.list(CriteriaImpl.java:374)
at org.jasig.ssp.dao.AbstractDao.processCriteriaWithSortingAndPaging(AbstractDao.java:134)
at org.jasig.ssp.dao.AbstractDao.processCriteriaWithStatusSortingAndPaging(AbstractDao.java:149)
at org.jasig.ssp.dao.MessageDao.queued(MessageDao.java:76)
at org.jasig.ssp.service.impl.MessageServiceImpl.sendQueuedMessageBatch(MessageServiceImpl.java:291)
at org.jasig.ssp.service.impl.MessageServiceImpl.access$000(MessageServiceImpl.java:70)
at org.jasig.ssp.service.impl.MessageServiceImpl$1.call(MessageServiceImpl.java:235)
at org.jasig.ssp.service.impl.MessageServiceImpl$1.call(MessageServiceImpl.java:231)
at org.jasig.ssp.util.transaction.WithTransactionImpl.doWork(WithTransactionImpl.java:61)
at org.jasig.ssp.util.transaction.WithTransactionImpl.doWorkUnchecked(WithTransactionImpl.java:66)
at org.jasig.ssp.util.transaction.WithTransactionImpl.withTransactionAndUncheckedExceptions(WithTransactionImpl.java:57)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:319)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.jasig.ssp.service.impl.MessageServiceImpl.sendQueuedMessages(MessageServiceImpl.java:229)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:319)
at org.jasig.ssp.service.impl.ScheduledTaskWrapperServiceImpl.sendMessages(ScheduledTaskWrapperServiceImpl.java:445)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:64)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)

Users with the same issue

72 times, 6 months ago
3 times, 8 months ago
Once, 1 year ago
2 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 8 months ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.