Hi,
Using a named query (w/ 2.1.8) which looks as follows:
<sql-query name="findQueries">
<return alias="q" class="com.optimal.nighthawk.queries.Query"/>
SELECT {q}.QUERY_ID AS {q.queryID},
{q}.QUERY_NAME AS {q.name}
FROM PHX_QUERIES {q} WHERE upper({q}.QUERY_NAME) LIKE :criteria
</sql-query>
Its gets executed and fails with the error below... can anyone help me?
2005-03-17 16:34:43 DEBUG net.sf.hibernate.loader.Loader - processing result set
2005-03-17 16:34:43 DEBUG net.sf.hibernate.type.IntegerType - returning '1' as column: QUERY_ID0_
2005-03-17 16:34:43 DEBUG net.sf.hibernate.loader.Loader - result row: 1
2005-03-17 16:34:43 DEBUG net.sf.hibernate.loader.Loader - Initializing object from ResultSet: 1
2005-03-17 16:34:43 DEBUG net.sf.hibernate.loader.Loader - Hydrating entity: com.optimal.nighthawk.queries.Query#1
2005-03-17 16:34:43 DEBUG net.sf.hibernate.type.StringType - returning 'test query jimmy' as column: QUERY_NAME0_
2005-03-17 16:34:43 DEBUG net.sf.hibernate.util.JDBCExceptionReporter - SQL Exception
java.sql.SQLException: Invalid column name
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
at oracle.jdbc.driver.OracleStatement.get_column_index(OracleStatement.java:6221)
at oracle.jdbc.driver.OracleResultSetImpl.findColumn(OracleResultSetImpl.java:1557)
at oracle.jdbc.driver.OracleResultSet.getString(OracleResultSet.java:1482)
at net.sf.hibernate.type.StringType.get(StringType.java:18)
at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:62)
at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:53)
at net.sf.hibernate.type.AbstractType.hydrate(AbstractType.java:67)
at net.sf.hibernate.loader.Loader.hydrate(Loader.java:690)
at net.sf.hibernate.loader.Loader.loadFromResultSet(Loader.java:631)
at net.sf.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:590)
at net.sf.hibernate.loader.Loader.getRow(Loader.java:505)
at net.sf.hibernate.loader.Loader.getRowFromResultSet(Loader.java:218)
at net.sf.hibernate.loader.Loader.doQuery(Loader.java:285)
at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:138)
at net.sf.hibernate.loader.Loader.doList(Loader.java:1063)
at net.sf.hibernate.loader.Loader.list(Loader.java:1054)
at net.sf.hibernate.loader.SQLLoader.list(SQLLoader.java:92)
at net.sf.hibernate.impl.SessionImpl.findBySQL(SessionImpl.java:3867)
at net.sf.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:52)
at com.optimal.nighthawk.queries.QueryDAO.findQueries(Unknown Source)
at com.optimal.nighthawk.queries.QueryManagerDelegate.findQueries(Unknown Source)
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:324)
at flashgateway.adapter.java.JavaBeanAdapter.invokeFunction(JavaBeanAdapter.java:65)
at flashgateway.filter.AdapterFilter.invoke(AdapterFilter.java:117)
at flashgateway.filter.MessageSecurityFilter.invoke(MessageSecurityFilter.java:144)
at flashgateway.filter.ServiceNameFilter.invoke(ServiceNameFilter.java:101)
at flashgateway.filter.EnvelopeFilter.invoke(EnvelopeFilter.java:102)
at flashgateway.filter.SessionFilter.invoke(SessionFilter.java:28)
at flashgateway.filter.LicenseFilter.invoke(LicenseFilter.java:57)
at flashgateway.filter.ErrorFilter.invoke(ErrorFilter.java:39)
at flashgateway.filter.LogFilter.invoke(LogFilter.java:46)
at flashgateway.filter.BatchProcessFilter.invoke(BatchProcessFilter.java:63)
at flashgateway.filter.PacketSecurityFilter.invoke(PacketSecurityFilter.java:68)
at flashgateway.filter.DebugFilter.invoke(DebugFilter.java:38)
at flashgateway.filter.SerializationFilter.invoke(SerializationFilter.java:89)
at flashgateway.Gateway.invoke(Gateway.java:217)
at flashgateway.controller.GatewayServlet.service(GatewayServlet.java:69)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:249)
at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:527)
at jrun.servlet.http.WebService.invokeRunnable(WebService.java:168)
at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:457)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
_________________ Jimmy G.
Optimal Payments
|