-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: Function sequence error
PostPosted: Fri Jan 16, 2004 3:40 pm 
Beginner
Beginner

Joined: Mon Sep 01, 2003 10:52 am
Posts: 23
Location: UK
Folks

Desperate times call for desperate measures

We are randomly getting the following
[16/01/04 16:19:31:772 UTC] 2cbf69df JDBCException E net.sf.hibernate.util.JDBCExceptionReporter TRAS0014I: The following exception was logged java.sql.SQLException: Function sequence error.

error message which appears to cause Webshpere App server (V5 for iseries) to go into a loop and eat all the CPU. (accessing DB2)

A full error trace is below


[16/01/04 16:19:31:772 UTC] 2cbf69df JDBCException E net.sf.hibernate.util.JDBCExceptionReporter TRAS0014I: The following exception was logged java.sql.SQLException: Function sequence error.
java/lang/Throwable.<init>(Ljava/lang/String;)V+4 (Throwable.java:85)
java/lang/Exception.<init>(Ljava/lang/String;)V+1 (Exception.java:33)
java/sql/SQLException.<init>(Ljava/lang/String;Ljava/lang/String;I)V+1 (SQLException.java:34)
com/ibm/as400/access/JDError.throwSQLException(Ljava/lang/String;)V+0 (JDError.java:394)
com/ibm/as400/access/AS400JDBCPreparedStatement.setValue(ILjava/lang/Object;Ljava/util/Calendar;I)V+0 (AS400JDBCPreparedStatement.java:2771)
com/ibm/as400/access/AS400JDBCPreparedStatement.setString(ILjava/lang/String;)V+0 (AS400JDBCPreparedStatement.java:2469)
net/sf/hibernate/type/StringType.set(Ljava/sql/PreparedStatement;Ljava/lang/Object;I)V+0 (StringType.java:22)
net/sf/hibernate/type/NullableType.nullSafeSet(Ljava/sql/PreparedStatement;Ljava/lang/Object;I)V+0 (NullableType.java:36)
net/sf/hibernate/type/NullableType.nullSafeSet(Ljava/sql/PreparedStatement;Ljava/lang/Object;ILnet/sf/hibernate/engine/SessionImplementor;)V+0 (NullableType.java:31)
net/sf/hibernate/loader/Loader.prepareQueryStatement(Ljava/lang/String;[Ljava/lang/Object;[Lnet/sf/hibernate/type/Type;Ljava/util/Map;Lnet/sf/hibernate/engine/RowSelection;ZLnet/sf/hibernate/engine/SessionImplementor;)Ljava/sql/PreparedStatement;+0 (Loader.java:471)
net/sf/hibernate/loader/Loader.doFind(Lnet/sf/hibernate/engine/SessionImplementor;[Ljava/lang/Object;[Lnet/sf/hibernate/type/Type;Ljava/lang/Object;Ljava/io/Serializable;Lnet/sf/hibernate/collection/PersistentCollection;Ljava/lang/Object;ZLnet/sf/hibernate/engine/RowSelection;Ljava/util/Map;Ljava/util/Map;)Ljava/util/List;+0 (Loader.java:104)
net/sf/hibernate/loader/Loader.loadEntity(Lnet/sf/hibernate/engine/SessionImplementor;[Ljava/lang/Object;[Lnet/sf/hibernate/type/Type;Ljava/lang/Object;Ljava/io/Serializable;Z)Ljava/util/List;+0 (Loader.java:587)
net/sf/hibernate/loader/EntityLoader.load(Lnet/sf/hibernate/engine/SessionImplementor;Ljava/io/Serializable;Ljava/lang/Object;)Ljava/lang/Object;+0 (EntityLoader.java:42)
net/sf/hibernate/persister/EntityPersister.load(Ljava/io/Serializable;Ljava/lang/Object;Lnet/sf/hibernate/LockMode;Lnet/sf/hibernate/engine/SessionImplementor;)Ljava/lang/Object;+0 (EntityPersister.java:394)
net/sf/hibernate/impl/SessionImpl.doLoad(Ljava/lang/Class;Ljava/io/Serializable;Ljava/lang/Object;Lnet/sf/hibernate/LockMode;Z)Ljava/lang/Object;+0 (SessionImpl.java:1843)
net/sf/hibernate/impl/SessionImpl.doLoadByObject(Ljava/lang/Object;Ljava/io/Serializable;ZLnet/sf/hibernate/LockMode;)V+0 (SessionImpl.java:1729)
net/sf/hibernate/impl/SessionImpl.load(Ljava/lang/Object;Ljava/io/Serializable;)V+0 (SessionImpl.java:1682)
uk/co/ltf/ltas/custinter/actions/WipAction.execute(Lorg/apache/struts/action/ActionMapping;Lorg/apache/struts/action/ActionForm;Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)Lorg/apache/struts/action/ActionForward;+0 (WipAction.java:63)
org/apache/struts/action/RequestProcessor.processActionPerform(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Lorg/apache/struts/action/Action;Lorg/apache/struts/action/ActionForm;Lorg/apache/struts/action/ActionMapping;)Lorg/apache/struts/action/ActionForward;+0 (RequestProcessor.java:484)
org/apache/struts/action/RequestProcessor.process(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+0 (RequestProcessor.java:217)
org/apache/struts/action/ActionServlet.process(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+0 (ActionServlet.java:1481)
org/apache/struts/action/ActionServlet.doGet(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+0 (ActionServlet.java:507)
javax/servlet/http/HttpServlet.service(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+0 (HttpServlet.java:733)
javax/servlet/http/HttpServlet.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+0 (HttpServlet.java:848)
com/ibm/ws/webcontainer/servlet/StrictServletInstance.doService(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+0 (StrictServletInstance.java:105)
com/ibm/ws/webcontainer/servlet/StrictLifecycleServlet._service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+0 (StrictLifecycleServlet.java:160)
com/ibm/ws/webcontainer/servlet/ServicingServletState.service(Lcom/ibm/ws/webcontainer/servlet/StrictLifecycleServlet;Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+0 (StrictLifecycleServlet.java:333)
com/ibm/ws/webcontainer/servlet/StrictLifecycleServlet.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+0 (StrictLifecycleServlet.java:116)
com/ibm/ws/webcontainer/servlet/ServletInstance.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Lcom/ibm/ws/webcontainer/webapp/WebAppServletInvocationEvent;)V+0 (ServletInstance.java:250)
com/ibm/ws/webcontainer/servlet/ValidServletReferenceState.dispatch(Lcom/ibm/ws/webcontainer/servlet/ServletInstanceReference;Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Lcom/ibm/ws/webcontainer/webapp/WebAppServletInvocationEvent;)V+0 (ValidServletReferenceState.java:42)
com/ibm/ws/webcontainer/servlet/ServletInstanceReference.dispatch(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Lcom/ibm/ws/webcontainer/webapp/WebAppServletInvocationEvent;)V+0 (ServletInstanceReference.java:40)
com/ibm/ws/webcontainer/webapp/WebAppRequestDispatcher.handleWebAppDispatch(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+0 (WebAppRequestDispatcher.java:739)
com/ibm/ws/webcontainer/webapp/WebAppRequestDispatcher.dispatch(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Z)V+0 (WebAppRequestDispatcher.java:231)
com/ibm/ws/webcontainer/webapp/WebAppRequestDispatcher.forward(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+0 (WebAppRequestDispatcher.java:148)
com/ibm/ws/webcontainer/srt/WebAppInvoker.doForward(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+0 (WebAppInvoker.java:78)
com/ibm/ws/webcontainer/srt/WebAppInvoker.handleInvocationHook(Ljava/lang/Object;)V+0 (WebAppInvoker.java:146)
com/ibm/ws/webcontainer/cache/invocation/CachedInvocation.handleInvocation(Ljava/lang/Object;)V+0 (CachedInvocation.java:66)
com/ibm/ws/webcontainer/cache/invocation/CacheableInvocationContext.invoke(Ljava/lang/Object;)V+0 (CacheableInvocationContext.java:100)
com/ibm/ws/webcontainer/srp/ServletRequestProcessor.dispatchByURI(Ljava/lang/String;Lcom/ibm/ws/webcontainer/srp/ISRPConnection;)V+0 (ServletRequestProcessor.java:71)
com/ibm/ws/webcontainer/oselistener/OSEListenerDispatcher.service(Lcom/ibm/ws/webcontainer/oselistener/api/IOSEConnection;)V+0 (OSEListener.java:317)
com/ibm/ws/webcontainer/http/HttpConnection.handleRequest()V+0 (HttpConnection.java:56)
com/ibm/ws/http/HttpConnection.readAndHandleRequest(Z)V+0 (HttpConnection.java:562)
com/ibm/ws/http/HttpConnection.run()V+0 (HttpConnection.java:373)
com/ibm/ws/util/ThreadPool$Worker.run()V+0 (ThreadPool.java:566)


The error seems to indicate that it produced from the following code


try{
ASSLAMasterCi am;

StringBuffer sb =new StringBuffer("from uk.co.ltf.ltas.custinter.dao.ASSLAMasterCi as asMaster where EOOZCD= :supCustCode and EOX4S3= :availFlag and EOCSCD= :fleetNumber ");

Query query = session.createQuery(queryString);
query.setString("supCustCode", wipSC.getSuperCustomerCode());
query.setString("availFlag", "N");
query.setString("fleetNumber", wipSC.getFleetNumber());

for (Iterator iter = query.iterate(); iter.hasNext();) {
am = (ASSLAMasterCi) iter.next();
....
aml.addAsMaster(am);
}

} catch (HibernateException e) {
doException(e, request, session);
} catch (Exception e) {


public void doException(
Exception e,
HttpServletRequest request, Session session)
throws Exception {

if (null != session) {
.connection().rollback();
session.close();
}
throw e;
}

the mapping file for ASSLAMasterCi is as follows

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">

<hibernate-mapping>
<class name="uk.co.ltf.ltas.custinter.dao.ASSLAMasterCi" mutable="false" table="LIBTE.TKEOCPL4">
<composite-id>
<key-property name="superCustomerCode" column="EOOZCD" />
<key-property name="asAllocationCode" column="EOSEC2" />
<key-property name="asControlSectionCode" column="EOSGC2" />
<key-property name="asStationCode" column="EOSCC2" />
<key-property name="asVehicleCategoryCode" column="EOSLC2" />
<key-property name="vehicleCode" column="EOCSCD"/>
</composite-id>

<property name="currentJobNumber" column="EOUYC2"/>
<property name="repairingWorkShop" column="EOUXC2"/>
<property name="availableFlag" column="EOX4S3" />
<property name="originatingWorkOrderNo" column="EOUWC2"/>
<property name="estimatedFinishDate" column="EOYMDT"/>
<property name="estimatedFinishTime" column="EODKTM"/>
<property name="workRequiredCode" column="EOGCCD"/>

<property name="startDate" column="EOYLDT"/>
<property name="startTime" column="EODJTM"/>
<property name="asCustomerLocationCode" column="EOV7C2"/>
<property name="profileBalance" column="EOQUN0"/>
</class>

</hibernate-mapping>
<!-- parsed in 0ms -->

any suggestions would be extremely welcome

cheers Paul


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 17, 2004 9:01 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Remove Hibernate stack and reproduce it using prepared statements. This *really* sounds like an AS400 JDBC bug, ask IBM support.

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 17, 2004 10:53 am 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
Looks like a problem with resource management, do you use some "clever"pool.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 02, 2004 4:04 am 
Newbie

Joined: Fri Aug 29, 2003 4:36 am
Posts: 16
Location: Belgium
Hi,

I have the same problem (iseries v5r2).
Quote:
Looks like a problem with resource management, do you use some "clever"pool.


I think you might be right.
The problem seems to pop up randomly since I started using a "clever" pool, it did not happen before in development.
My settings:
Code:
      <property name="c3p0.min_size">1</property>
      <property name="c3p0.max_size">5</property>
      <property name="c3p0.max_statements">20</property>
      <property name="c3p0.timeout">1800</property>


Bart.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.