Hibernate version:
3.2.5.ga
Debug level Hibernate log excerpt:
D 10:42:43:065 SchedulerServiceThread about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
D 10:42:43:065 SchedulerServiceThread opening JDBC connection
D 10:42:43:066 SchedulerServiceThread select attribute0_.ATTRID as ATTRID196_0_, attribute0_.VERSIONOPTLOCK as VERSIONO2_196_0_, attribute0_.COMPANY as COMPANY196_0_, attribute0_.APP as APP196_0_, attribute0_.SYS as SYS196_0_, attribute0_.ATTRNAME as ATTRNAME196_0_, attribute0_.ATTRVALUE as ATTRVALUE196_0_, case when attribute0_.SYS='LICENSING' and attribute0_.ATTRNAME='LICENSEKEY' then 'E' when attribute0_.SYS='LICENSING' and attribute0_.ATTRNAME='INSTALLDATE' then 'C' else 'P' end as clazz_0_ from IMATTRIBUTES attribute0_ where (this_.COMPANY=? and this_.APP=? and this_.SYS=? and this_.ATTRNAME=?)
D 10:42:43:066 SchedulerServiceThread preparing statement
D 10:42:43:185 SchedulerServiceThread could not execute query using scroll [select attribute0_.ATTRID as ATTRID196_0_, attribute0_.VERSIONOPTLOCK as VERSIONO2_196_0_, attribute0_.COMPANY as COMPANY196_0_, attribute0_.APP as APP196_0_, attribute0_.SYS as SYS196_0_, attribute0_.ATTRNAME as ATTRNAME196_0_, attribute0_.ATTRVALUE as ATTRVALUE196_0_, case when attribute0_.SYS='LICENSING' and attribute0_.ATTRNAME='LICENSEKEY' then 'E' when attribute0_.SYS='LICENSING' and attribute0_.ATTRNAME='INSTALLDATE' then 'C' else 'P' end as clazz_0_ from IMATTRIBUTES attribute0_ where (this_.COMPANY=? and this_.APP=? and this_.SYS=? and this_.ATTRNAME=?)]
java.sql.SQLException: [Sybase][ODBC Driver][Adaptive Server Anywhere]Correlation name 'this_' not found
at ianywhere.ml.jdbcodbc.IConnection.nativePrepareStatement(Native Method)
at ianywhere.ml.jdbcodbc.IConnection.prepareStatement(IConnection.java:328)
at com.mchange.v2.c3p0.impl.NewProxyConnection.prepareStatement(NewProxyConnection.java:275)
at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:491)
at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:423)
at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:139)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1547)
at org.hibernate.loader.Loader.scroll(Loader.java:2292)
at org.hibernate.loader.criteria.CriteriaLoader.scroll(CriteriaLoader.java:89)
at org.hibernate.impl.SessionImpl.scroll(SessionImpl.java:1533)
at org.hibernate.impl.CriteriaImpl.scroll(CriteriaImpl.java:297)
at com.sync.db.AttributeMgrImpl.fetchAttributes(AttributeMgrImpl.java:88)
at com.sync.db.AttributeMgrImpl.getAttribute(AttributeMgrImpl.java:205)
at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sync.db.AccessMgr$Handler.invoke(AccessMgr.java:335)
at $Proxy1.getAttribute(Unknown Source)
at com.sync.scheduler.tasks.LogPurgeTask.getLastPurgeDate(LogPurgeTask.java:140)
at com.sync.scheduler.tasks.LogPurgeTask.isTimeToPurge(LogPurgeTask.java:210)
at com.sync.scheduler.tasks.LogPurgeTask.run(LogPurgeTask.java:395)
at com.sync.scheduler.tasks.LogPurgeTask.run(LogPurgeTask.java:422)
at com.sync.scheduler.ScheduledTask.runTaskUsingReflection(ScheduledTask.java:93)
at com.sync.scheduler.ScheduledTask.execute(ScheduledTask.java:69)
at com.sync.scheduler.SchedulerServiceThread.run(SchedulerServiceThread.java:117)
W 10:42:43:221 SchedulerServiceThread SQL Error: -142, SQLState: 42S02
E 10:42:43:221 SchedulerServiceThread [Sybase][ODBC Driver][Adaptive Server Anywhere]Correlation name 'this_' not found
E 10:42:43:222 SchedulerServiceThread fetchAttributes
org.hibernate.exception.SQLGrammarException: could not execute query using scroll
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.loader.Loader.scroll(Loader.java:2328)
at org.hibernate.loader.criteria.CriteriaLoader.scroll(CriteriaLoader.java:89)
at org.hibernate.impl.SessionImpl.scroll(SessionImpl.java:1533)
at org.hibernate.impl.CriteriaImpl.scroll(CriteriaImpl.java:297)
at com.sync.db.AttributeMgrImpl.fetchAttributes(AttributeMgrImpl.java:88)
at com.sync.db.AttributeMgrImpl.getAttribute(AttributeMgrImpl.java:205)
at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sync.db.AccessMgr$Handler.invoke(AccessMgr.java:335)
at $Proxy1.getAttribute(Unknown Source)
at com.sync.scheduler.tasks.LogPurgeTask.getLastPurgeDate(LogPurgeTask.java:140)
at com.sync.scheduler.tasks.LogPurgeTask.isTimeToPurge(LogPurgeTask.java:210)
at com.sync.scheduler.tasks.LogPurgeTask.run(LogPurgeTask.java:395)
at com.sync.scheduler.tasks.LogPurgeTask.run(LogPurgeTask.java:422)
at com.sync.scheduler.ScheduledTask.runTaskUsingReflection(ScheduledTask.java:93)
at com.sync.scheduler.ScheduledTask.execute(ScheduledTask.java:69)
at com.sync.scheduler.SchedulerServiceThread.run(SchedulerServiceThread.java:117)
Caused by: java.sql.SQLException: [Sybase][ODBC Driver][Adaptive Server Anywhere]Correlation name 'this_' not found
at ianywhere.ml.jdbcodbc.IConnection.nativePrepareStatement(Native Method)
at ianywhere.ml.jdbcodbc.IConnection.prepareStatement(IConnection.java:328)
at com.mchange.v2.c3p0.impl.NewProxyConnection.prepareStatement(NewProxyConnection.java:275)
at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:491)
at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:423)
at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:139)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1547)
at org.hibernate.loader.Loader.scroll(Loader.java:2292)
... 17 more
We have the a query that 99% of times runs perfectly, but after a while it starts to fail.
Look at the query's WHERE clause, suddenly 'this_' correlation name is being used in stead of 'attribute0_'.
Any one meet this error before?
|