-->
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.  [ 1 post ] 
Author Message
 Post subject: Failed retrieve db2 table which has huge column size define
PostPosted: Thu Oct 20, 2005 11:52 am 
Newbie

Joined: Thu Oct 20, 2005 11:27 am
Posts: 1
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hi guys:

I have a problem when using Hibernate2 retrieve against db2 table which has huge column size defination and has to rely on db2 buffer pool with page size = 32, while it works well on normal size one.

When retrieve failed, the error track goes into hibernate code, I just wonder if there are some hibernate optimization configuration can solve this.

Anybody has ideas or comments on this?

Michael


Hibernate version:
Hibernate 2

Mapping documents:
<?xml version="1.0"?>

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

<hibernate-mapping package="ca.tcp.model.hibernate">

<class name="Party" discriminator-value="null">
<id
name="partyKey"
type="java.lang.Integer"
column="party_key"
>

<meta attribute="field-description">
@hibernate.id
generator-class="sequence"
type="java.lang.Integer"
column="party_key"
</meta>

<generator class="sequence">
<param name="sequence">TCP_POID_SEQUENCE</param>
</generator>
</id>

<discriminator type="character" column="party_type"/>

<property name="partyType" column="party_type"/>
<property name="comments" column="comments"/>
<property name="address1" column="address_1"/>
<property name="address2" column="address_2"/>
<property name="address3" column="address_3"/>
<property name="mailstop" column="mailstop"/>
<property name="city" column="city"/>
<property name="province" column="state"/>
<property name="country" column="country"/>
<property name="postcode" column="postal_code"/>
<property name="telephone1" column="telephone_1"/>
<property name="telephone2" column="telephone_2"/>
<property name="fax" column="fax"/>
<property name="email" column="email"/>
<property name="webURL" column="web_url"/>

<property name="shiptoContactName" column="shipto_contact_name"/>
<property name="shiptoAddress" column="shipto_address"/>
<property name="shiptoCity" column="shipto_city"/>
<property name="shiptoState" column="shipto_state"/>
<property name="shiptoCountry" column="shipto_country"/>
<property name="shiptoPostalCode" column="shipto_postal_code"/>
<property name="shiptoTelephone" column="shipto_telephone"/>
<property name="shiptoEmail" column="shipto_email"/>
<property name="shiptoFax" column="shipto_fax"/>
<property name="costCentre" column="cost_centre"/>
<property name="billtoContactName" column="billto_contact_name"/>
<property name="billtoAddress" column="billto_address"/>
<property name="billtoCity" column="billto_city"/>
<property name="billtoState" column="billto_state"/>
<property name="billtoCountry" column="billto_country"/>
<property name="billtoPostalCode" column="billto_postal_code"/>
<property name="billtoTelephone" column="billto_telephone"/>
<property name="billtoEmail" column="billto_email"/>
<property name="billtoFax" column="billto_fax"/>
<property name="contactName" column="contact_name"/>
<property name="contactAddress" column="contact_address"/>
<property name="contactCity" column="contact_city"/>
<property name="contactState" column="contact_state"/>
<property name="contactCountry" column="contact_country"/>
<property name="contactPostalCode" column="contact_postal_code"/>
<property name="contactTelephone" column="contact_telephone"/>
<property name="contactEmail" column="contact_email"/>
<property name="contactFax" column="contact_fax"/>

<joined-subclass name="Person" table="person">
<key column="person_key">
</key>
<property name="honorific"/>
<property name="firstName" column="first_name"/>
<property name="initial"/>
<property name="lastName" column="last_name"/>
<property name="degree"/>
<property name="institution"/>
<property name="userName" column="user_name"/>
<property name="userPassword" column="user_password"/>
<property name="telephoneHome" column="telephone_home"/>
<property name="telephoneMobile" column="telephone_mobile"/>
<property name="fileUploadUID" column="file_upload_uid"/>
<property name="userStatus" column="user_status"/>
<property name="accountStatus" column="account_status"/>
</joined-subclass>

<joined-subclass name="Institution" table="institution">
<key column="institution_key">
</key>
<property name="institutionKey" column="institution_key" insert="false" update="false"/>
<property name="name" column="name"/>
<property name="code" column="code"/>

</joined-subclass>
</class>
</hibernate-mapping>

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

net.sf.hibernate.exception.GenericJDBCException: Could not execute query
net.sf.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:80)
net.sf.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:69)
net.sf.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
net.sf.hibernate.impl.SessionImpl.convert(SessionImpl.java:4131)
net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1557)
net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:49)

Name and version of the database you are using:
db2 universal 8

The generated SQL (show_sql=true):
HQL Query: select distinct institution from ca.tcp.model.hibernate.Institution institution where upper(institution.name) like '%%' AND upper(institution.code) like '%%'

Debug level Hibernate log excerpt:


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

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.