Joined: Thu Oct 07, 2004 10:16 am Posts: 3
|
Hibernate version: 2.1.6
Mapping documents:
<hibernate-configuration>
<session-factory>
<property name="hibernate.dialect">net.sf.hibernate.dialect.Oracle9Dialect</property>
<!-- websphere section -->
<property name="hibernate.connection.datasource">jdbc/Swift_SIT_8i</property>
<property name="jdbc.use_streams_for_binary">true</property>
<!--property name="transaction.manager_lookup_class">net.sf.hibernate.transaction.WebSphereTransactionManagerLookup</property-->
<property name="hibernate.jdbc.batch_size">0</property>
<property name="hibernate.show_sql">true</property>
<!-- end of websphere section -->
<!-- standalone section --><!--
<property name="hibernate.connection.driver_class">oracle.jdbc.OracleDriver</property>
<property name="hibernate.connection.url">jdbc:oracle:thin:@usebsiloracle:1521:EBSTWO</property>
<property name="hibernate.connection.username">CP_USER</property>
<property name="hibernate.connection.password">cp_user</property>
<property name="hibernate.connection.pool_size">4</property>
--><!-- end of standalone section -->
<mapping resource="swift/GlobalSwiftLog.hbm.xml"/>
<mapping resource="swift/SwiftIncoming940_950.hbm.xml"/>
</session-factory>
</hibernate-configuration>
<hibernate-mapping auto-import="false">
<class name="com.abnamro.na.pm.swift.SwiftIncoming940_950" schema="INFORPT" table="SWIFT_INCOMING_940_950">
<id name="id" type="java.lang.Long" column="SWFI_ID">
<generator class="sequence">
<param name="sequence">SEQ_SWIFT_INCOMING_940_950</param>
</generator>
</id>
<property name="globId" type="java.lang.Long" column="SWFI_GLOB_ID" not-null="false" length="7" />
<property name="status" type="java.lang.String" column="SWFI_STATUS" not-null="false" length="1" />
<property name="stmtEffectiveDate" type="java.util.Date" column="SWFI_STMT_EFFECTIVE_DATE" not-null="false" length="7" />
<property name="messageType" type="java.lang.String" column="SWFI_MESSAGE_TYPE" not-null="false" length="3" />
<property name="originTID" type="java.lang.String" column="SWFI_ORIGIN_TID" not-null="false" length="12" />
<property name="originAcctNum" type="java.lang.String" column="SWFI_ORIGIN_ACCT_NUMBER" not-null="false" length="35" />
<property name="stmtSequenceNum" type="java.lang.String" column="SWFI_STMT_SEQ_NO" not-null="false" length="3" />
<property name="statementNum" type="java.lang.String" column="SWFI_STMT_NO" not-null="false" length="5" />
<property name="originalDate" type="java.util.Date" column="SWFI_ORIGINAL_DATE" not-null="false" length="7" />
<property name="currentDate" type="java.util.Date" column="SWFI_CURRENT_DATE" not-null="false" length="7" />
<property name="duplicateCount" type="java.lang.Integer" column="SWFI_DUPLICATE_COUNT" not-null="false" length="4" />
<property name="rawData" type="java.sql.Clob" column="SWFI_RAW_DATA" not-null="false"/>
<property name="fileName" type="java.lang.String" column="SWFI_FILE_NAME" not-null="false" length="50" />
</class>
</hibernate-mapping>
Code between sessionFactory.openSession() and session.close():
try {
session.delete("from SwiftIncoming940_950 as swift WHERE " +
"swift.SWFI_STATUS = 'J' AND swift.SWFI_CURRENT_DATE < sysdate - " + incompleteRetentionPeriodDays);
} catch (HibernateException he) {
logger.error("An error occured deleting incomplete statements.", he);
handleHibernateException(he);
}
Full stack trace of any exception that occurs:
[10/7/04 9:28:43:078 CDT] 639c575c SwiftCleanupE E com.abnamro.na.swift.ejb.impl.SwiftCleanupEJBBean An error occured deleting incomplete statements.
[10/7/04 9:28:43:329 CDT] 639c575c SwiftCleanupE E com.abnamro.na.swift.ejb.impl.SwiftCleanupEJBBean TRAS0014I: The following exception was logged net.sf.hibernate.QueryException: unexpected token: as [from SwiftIncoming940_950 as swift WHERE swift.SWFI_STATUS = 'J' AND swift.SWFI_CURRENT_DATE < sysdate - 10]
at com.ibm.etools.utc.servlet.InvokeServlet.doPost(InvokeServlet.java:234)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:787)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:854)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:145)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:215)
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:314)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:117)
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:368)
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:43)
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:41)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1002)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:713)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:217)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:135)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:229)
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:72)
at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:118)
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:189)
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:411)
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:57)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:573)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:463)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:615)
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:368)
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:43)
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:41)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1002)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:713)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:217)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:135)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:229)
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:72)
at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:118)
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:189)
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:411)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:615)
.
net.sf.hibernate.QueryException: unexpected token: as [from SwiftIncoming940_950 as swift WHERE swift.SWFI_STATUS = 'J' AND swift.SWFI_CURRENT_DATE < sysdate - 10]
at com.ibm.etools.utc.servlet.InvokeServlet.doPost(InvokeServlet.java:234)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:787)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:854)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:145)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:215)
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:314)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:117)
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:368)
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:43)
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:41)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1002)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:713)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:217)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:135)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:229)
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:72)
at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:118)
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:189)
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:411)
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:57)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:573)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:463)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:615)
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:368)
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:43)
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:41)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1002)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:713)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:217)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:135)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:229)
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:72)
at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:118)
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:189)
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:411)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:615)
Name and version of the database you are using:
Oracle 8i
The generated SQL (show_sql=true):
from SwiftIncoming940_950 as swift WHERE swift.SWFI_STATUS = 'J' AND swift.SWFI_CURRENT_DATE < sysdate - 10
Debug level Hibernate log excerpt:
|
|