-->
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: one-to-one mapping exceptions
PostPosted: Fri Mar 11, 2005 5:58 pm 
Beginner
Beginner

Joined: Mon Dec 08, 2003 12:15 am
Posts: 47
All required info is below. I keep on getting a ClassCastException whenever I try to load objects of type LeanHolderInfo.

The foreign key in LeanHolderInfo is the primary key in Unit. I am using a one-to-one mapping as suggested in the book, but I cannot load any units with their associated LeanHolderInfo without this ClassCastException.

This is a very urgent issue for us, so any help would be appreciated.

Thanks

Hibernate version:
2.18

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>
<class
name="com.uaig.sis.Unit"
table="UQHSUNIT"
dynamic-update="false"
dynamic-insert="false"
>

<composite-id
name="unitPk"
class="com.uaig.sis.UnitPK"
>
<key-property
name="unitNumber"
type="java.lang.Integer"
column="UUNITNO"
/>
<key-property
name="referenceNumber"
type="java.lang.Integer"
column="UUREFNO"
/>

</composite-id>

<property
name="companyNumber"
type="com.uaig.migration.hibernate.CustomStringTrimType"
column="UUCOMP#"
/>

<property
name="policyPrefix"
type="com.uaig.migration.hibernate.CustomStringTrimType"
column="UUPRFXN"
/>

<property
name="policyNumber"
type="java.lang.Integer"
column="UUPLNBR"
/>

<property
name="unitType"
type="com.uaig.migration.hibernate.CustomStringTrimType"
update="true"
insert="true"
column="UUNITTY"
length="2"
/>

<property
name="unitGroup"
type="com.uaig.migration.hibernate.CustomStringTrimType"
update="true"
insert="true"
column="UUNITGR"
length="2"
/>

<property
name="vinId"
type="com.uaig.migration.hibernate.CustomStringTrimType"
update="true"
insert="true"
column="UUVINID"
length="25"
/>

<property
name="unitYear"
type="java.lang.Integer"
update="true"
insert="true"
column="UUYEAR"
length="4"
/>

<property
name="unitMake"
type="com.uaig.migration.hibernate.CustomStringTrimType"
update="true"
insert="true"
column="UUMAKE"
length="4"
/>

<property
name="unitModel"
type="com.uaig.migration.hibernate.CustomStringTrimType"
update="true"
insert="true"
column="UUMODL"
length="10"
/>

<property
name="description"
type="com.uaig.migration.hibernate.CustomStringTrimType"
update="true"
insert="true"
column="UUDESC"
length="30"
/>

<property
name="garageZipCode"
type="com.uaig.migration.hibernate.CustomStringTrimType"
update="true"
insert="true"
column="UUZIPC"
length="9"
/>

<property
name="countyName"
type="com.uaig.migration.hibernate.CustomStringTrimType"
update="true"
insert="true"
column="UUCNTY"
length="20"
/>

<property
name="cityName"
type="com.uaig.migration.hibernate.CustomStringTrimType"
update="true"
insert="true"
column="UUCITY"
length="20"
/>

<property
name="countyCode"
type="com.uaig.migration.hibernate.CustomStringTrimType"
update="true"
insert="true"
column="UUCNTCD"
length="5"
/>

<property
name="unitStatus"
type="com.uaig.migration.hibernate.CustomStringTrimType"
update="true"
insert="true"
column="UUSTUS"
length="1"
/>

<property
name="unitActivity"
type="com.uaig.migration.hibernate.CustomStringTrimType"
update="true"
insert="true"
column="UUACTY"
length="1"
/>

<property
name="mileToWork"
type="java.lang.Integer"
update="true"
insert="true"
column="UUMILE"
length="3"
/>

<property
name="deleteDate"
type="java.util.Date"
update="true"
insert="true"
column="UUDELDT"
length="7"
/>

<property
name="addDate"
type="java.util.Date"
update="true"
insert="true"
column="UUADDDT"
length="7"
/>

<property
name="ratedClass"
type="com.uaig.migration.hibernate.CustomStringTrimType"
update="true"
insert="true"
column="UURCLS"
length="6"
/>

<property
name="odometerReading"
type="java.lang.Integer"
update="true"
insert="true"
column="UUODOM"
length="7"
/>

<property
name="ratedSymbol"
type="com.uaig.migration.hibernate.CustomStringTrimType"
update="true"
insert="true"
column="UURSYMB"
length="2"
/>

<property
name="useCode"
type="com.uaig.migration.hibernate.CustomStringTrimType"
update="true"
insert="true"
column="UUPUSEC"
length="2"
/>

<property
name="territory"
type="com.uaig.migration.hibernate.CustomStringTrimType"
update="true"
insert="true"
column="UUTERR"
length="3"
/>

<property
name="passiveRest"
type="com.uaig.migration.hibernate.CustomStringTrimType"
update="true"
insert="true"
column="UUPSRT"
length="2"
/>

<property
name="antiTheft"
type="com.uaig.migration.hibernate.CustomStringTrimType"
update="true"
insert="true"
column="UUANTF"
length="2"
/>

<property
name="antiLock"
type="com.uaig.migration.hibernate.CustomStringTrimType"
update="true"
insert="true"
column="UUANTLK"
length="2"
/>

<property
name="multiCar"
type="com.uaig.migration.hibernate.CustomStringTrimType"
update="true"
insert="true"
column="UUMULTC"
length="1"
/>

<property
name="transferDiscount"
type="com.uaig.migration.hibernate.CustomStringTrimType"
update="true"
insert="true"
column="UUTRNFD"
length="1"
/>

<property
name="ratedPDriver"
type="java.lang.Integer"
update="true"
insert="true"
column="UURTDRV"
length="3"
/>

<property
name="replacementCost"
type="java.lang.Integer"
update="true"
insert="true"
column="UURPLCT"
length="7"
/>

<property
name="customEquipment"
type="com.uaig.migration.hibernate.CustomStringTrimType"
update="true"
insert="true"
column="UUCUSTE"
length="2"
/>

<property
name="highSymbolSurch"
type="com.uaig.migration.hibernate.CustomStringTrimType"
update="true"
insert="true"
column="UUHGSYM"
length="2"
/>

<property
name="goodSafeDriver"
type="com.uaig.migration.hibernate.CustomStringTrimType"
update="true"
insert="true"
column="UUSNRDR"
length="1"
/>

<property
name="unitChange"
type="com.uaig.migration.hibernate.CustomStringTrimType"
update="true"
insert="true"
column="UUNITCH"
length="1"
/>

<property
name="vinChange"
type="com.uaig.migration.hibernate.CustomStringTrimType"
update="true"
insert="true"
column="UUVINCH"
length="1"
/>

<many-to-one
name="policy"
class="com.uaig.sis.Policy"
cascade="none"
outer-join="auto"
update="false"
insert="false"
>
<column
name="UUREFNO"
/>
</many-to-one>


<set
name="coverages"
lazy="false"
inverse="true"
cascade="all"
sort="unsorted"
>
<key>
<column name="UCREFNO" />
<column name="UCNITNO" />
</key>

<one-to-many
class="com.uaig.sis.Coverage"
/>
</set>
<!---->
<one-to-one name="leanHolder"
class="com.uaig.sis.LeanHolderInfo"
cascade="save-update"/>

</class>

</hibernate-mapping>

<?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>
<class
name="com.uaig.sis.LeanHolderInfo"
table="UQHSADLX"
dynamic-update="false"
dynamic-insert="false"
>

<composite-id
name="leanHolderInfoPK"
class="com.uaig.sis.LeanHolderPK"
>


<key-property
name="unitNumber"
type="java.lang.Integer"
column="UAUNTNO"
/>
<key-property
name="referenceNumber"
type="java.lang.Integer"
column="UAREFNO"
/>

</composite-id>

<property
name="addInterestCode"
type="java.lang.Integer"
column="UAAICOD"
/>

<property
name="companyNumber"
type="com.uaig.migration.hibernate.CustomStringTrimType"
column="UACOMP#"
length="2"
/>

<property
name="policyPrefix"
type="com.uaig.migration.hibernate.CustomStringTrimType"
column="UAPRFXN"
length="4"
/>

<property
name="policyNumber"
type="java.lang.Integer"
column="UAPLNBR"
length="9"
/>

<property
name="ketFldFromWeb"
type="java.lang.Integer"
update="true"
insert="true"
column="UAKEYFL"
length="9"
/>

<property
name="addInterestTy"
type="com.uaig.migration.hibernate.CustomStringTrimType"
update="true"
insert="true"
column="UAADNTT"
length="1"
/>

<property
name="loanNumber"
type="com.uaig.migration.hibernate.CustomStringTrimType"
update="true"
insert="true"
column="UALOANN"
length="20"
/>

<property
name="addDate"
type="java.util.Date"
update="true"
insert="true"
column="UAADDDT"
length="7"
/>

<property
name="delDate"
type="java.util.Date"
update="true"
insert="true"
column="UADELDT"
length="7"
/>

<property
name="addIntName"
type="com.uaig.migration.hibernate.CustomStringTrimType"
update="true"
insert="true"
column="UAINAME"
length="30"
/>

<property
name="addIntAddress1"
type="com.uaig.migration.hibernate.CustomStringTrimType"
update="true"
insert="true"
column="UAIADD1"
length="30"
/>

<property
name="addIntAddress2"
type="com.uaig.migration.hibernate.CustomStringTrimType"
update="true"
insert="true"
column="UAIADD2"
length="30"
/>

<property
name="addIntCity"
type="com.uaig.migration.hibernate.CustomStringTrimType"
update="true"
insert="true"
column="UAICITY"
length="20"
/>

<property
name="addIntState"
type="com.uaig.migration.hibernate.CustomStringTrimType"
update="true"
insert="true"
column="UAISTAT"
length="2"
/>

<property
name="addIntZipCode"
type="com.uaig.migration.hibernate.CustomStringTrimType"
update="true"
insert="true"
column="UAIZIPC"
length="2"
/>

<property
name="addIntPhone"
type="java.lang.Long"
update="true"
insert="true"
column="UAIPHN#"
length="10"
/>

<property
name="addIntFax"
type="java.lang.Long"
update="true"
insert="true"
column="UAIFAX#"
length="10"
/>

<property
name="addIntChange"
type="com.uaig.migration.hibernate.CustomStringTrimType"
update="true"
insert="true"
column="UAADLCH"
length="1"
/>

<one-to-one name="unit"
class="com.uaig.sis.Unit"
constrained="true">
</one-to-one>

</class>

</hibernate-mapping>


Code between sessionFactory.openSession() and session.close():
N/A

Full stack trace of any exception that occurs:
Hibernate: select leanholder0_.UAUNTNO as UAUNTNO, leanholder0_.UAREFNO as UAREFNO, leanholder0_.UAAICOD as UAAICOD, leanholder0_.UACOMP# as UACOMP#, leanholder0_.UAPRFXN as UAPRFXN, leanholder0_.UAPLNBR as UAPLNBR, leanholder0_.UAKEYFL as UAKEYFL, leanholder0_.UAADNTT as UAADNTT, leanholder0_.UALOANN as UALOANN, leanholder0_.UAADDDT as UAADDDT, leanholder0_.UADELDT as UADELDT, leanholder0_.UAINAME as UAINAME, leanholder0_.UAIADD1 as UAIADD1, leanholder0_.UAIADD2 as UAIADD2, leanholder0_.UAICITY as UAICITY, leanholder0_.UAISTAT as UAISTAT, leanholder0_.UAIZIPC as UAIZIPC, leanholder0_.UAIPHN# as UAIPHN#, leanholder0_.UAIFAX# as UAIFAX#, leanholder0_.UAADLCH as UAADLCH from uaigweb.UQHSADLX leanholder0_
Hibernate: select unit0_.UUNITNO as UUNITNO1_, unit0_.UUREFNO as UUREFNO1_, leanholder1_.UAUNTNO as UAUNTNO0_, leanholder1_.UAREFNO as UAREFNO0_, leanholder1_.UAAICOD as UAAICOD0_, leanholder1_.UACOMP# as UACOMP#0_, leanholder1_.UAPRFXN as UAPRFXN0_, leanholder1_.UAPLNBR as UAPLNBR0_, leanholder1_.UAKEYFL as UAKEYFL0_, leanholder1_.UAADNTT as UAADNTT0_, leanholder1_.UALOANN as UALOANN0_, leanholder1_.UAADDDT as UAADDDT0_, leanholder1_.UADELDT as UADELDT0_, leanholder1_.UAINAME as UAINAME0_, leanholder1_.UAIADD1 as UAIADD10_, leanholder1_.UAIADD2 as UAIADD20_, leanholder1_.UAICITY as UAICITY0_, leanholder1_.UAISTAT as UAISTAT0_, leanholder1_.UAIZIPC as UAIZIPC0_, leanholder1_.UAIPHN# as UAIPHN#0_, leanholder1_.UAIFAX# as UAIFAX#0_, leanholder1_.UAADLCH as UAADLCH0_ from uaigweb.UQHSUNIT unit0_ left outer join uaigweb.UQHSADLX leanholder1_ on unit0_.UUNITNO=leanholder1_.UAUNTNO and unit0_.UUREFNO=leanholder1_.UAREFNO where unit0_.UUNITNO=? and unit0_.UUREFNO=?
org.springframework.orm.hibernate.HibernateSystemException: exception getting property value with CGLIB (set hibernate.cglib.use_reflection_optimizer=false for more info) getter of com.uaig.sis.UnitPK.?; nested exception is net.sf.hibernate.PropertyAccessException: exception getting property value with CGLIB (set hibernate.cglib.use_reflection_optimizer=false for more info) getter of com.uaig.sis.UnitPK.?
net.sf.hibernate.PropertyAccessException: exception getting property value with CGLIB (set hibernate.cglib.use_reflection_optimizer=false for more info) getter of com.uaig.sis.UnitPK.?
at net.sf.hibernate.type.ComponentType.getPropertyValues(ComponentType.java:193)
at net.sf.hibernate.type.ComponentType.nullSafeGetValues(ComponentType.java:164)
at net.sf.hibernate.type.ComponentType.nullSafeSet(ComponentType.java:151)
at net.sf.hibernate.loader.Loader.bindPositionalParameters(Loader.java:753)
at net.sf.hibernate.loader.Loader.prepareQueryStatement(Loader.java:793)
at net.sf.hibernate.loader.Loader.doQuery(Loader.java:269)
at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:138)
at net.sf.hibernate.loader.Loader.loadEntity(Loader.java:941)
at net.sf.hibernate.loader.Loader.loadEntity(Loader.java:961)
at net.sf.hibernate.loader.EntityLoader.load(EntityLoader.java:59)
at net.sf.hibernate.loader.EntityLoader.load(EntityLoader.java:51)
at net.sf.hibernate.persister.EntityPersister.load(EntityPersister.java:413)
at net.sf.hibernate.impl.SessionImpl.doLoad(SessionImpl.java:2131)
at net.sf.hibernate.impl.SessionImpl.doLoadByClass(SessionImpl.java:2001)
at net.sf.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:1963)
at net.sf.hibernate.type.OneToOneType.resolveIdentifier(OneToOneType.java:71)
at net.sf.hibernate.type.EntityType.resolveIdentifier(EntityType.java:208)
at net.sf.hibernate.impl.SessionImpl.initializeEntity(SessionImpl.java:2219)
at net.sf.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:319)
at net.sf.hibernate.loader.Loader.doQuery(Loader.java:309)
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.hql.QueryTranslator.list(QueryTranslator.java:854)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1554)
at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:49)
at org.springframework.orm.hibernate.HibernateTemplate$24.doInHibernate(HibernateTemplate.java:620)
at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:312)
at org.springframework.orm.hibernate.HibernateTemplate.find(HibernateTemplate.java:616)
at com.uaig.migration.dao.As400MigrationDAOImpl.findLeanHolderInfo(As400MigrationDAOImpl.java:262)
at com.uaig.migration.dao.TestAs400MigrationDao.testFindLeanHolderInfo(TestAs400MigrationDao.java:126)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:421)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:305)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:186)
Caused by: java.lang.ClassCastException
at com.uaig.sis.UnitPK$$BulkBeanByCGLIB$$26a2cc8.getPropertyValues(<generated>)
at net.sf.cglib.beans.BulkBean.getPropertyValues(BulkBean.java:48)
at net.sf.hibernate.type.ComponentType.getPropertyValues(ComponentType.java:190)
... 43 more

Name and version of the database you are using:
DB2 on AS400

The generated SQL (show_sql=true):
Hibernate: select leanholder0_.UAUNTNO as UAUNTNO, leanholder0_.UAREFNO as UAREFNO, leanholder0_.UAAICOD as UAAICOD, leanholder0_.UACOMP# as UACOMP#, leanholder0_.UAPRFXN as UAPRFXN, leanholder0_.UAPLNBR as UAPLNBR, leanholder0_.UAKEYFL as UAKEYFL, leanholder0_.UAADNTT as UAADNTT, leanholder0_.UALOANN as UALOANN, leanholder0_.UAADDDT as UAADDDT, leanholder0_.UADELDT as UADELDT, leanholder0_.UAINAME as UAINAME, leanholder0_.UAIADD1 as UAIADD1, leanholder0_.UAIADD2 as UAIADD2, leanholder0_.UAICITY as UAICITY, leanholder0_.UAISTAT as UAISTAT, leanholder0_.UAIZIPC as UAIZIPC, leanholder0_.UAIPHN# as UAIPHN#, leanholder0_.UAIFAX# as UAIFAX#, leanholder0_.UAADLCH as UAADLCH from uaigweb.UQHSADLX leanholder0_
Hibernate: select unit0_.UUNITNO as UUNITNO1_, unit0_.UUREFNO as UUREFNO1_, leanholder1_.UAUNTNO as UAUNTNO0_, leanholder1_.UAREFNO as UAREFNO0_, leanholder1_.UAAICOD as UAAICOD0_, leanholder1_.UACOMP# as UACOMP#0_, leanholder1_.UAPRFXN as UAPRFXN0_, leanholder1_.UAPLNBR as UAPLNBR0_, leanholder1_.UAKEYFL as UAKEYFL0_, leanholder1_.UAADNTT as UAADNTT0_, leanholder1_.UALOANN as UALOANN0_, leanholder1_.UAADDDT as UAADDDT0_, leanholder1_.UADELDT as UADELDT0_, leanholder1_.UAINAME as UAINAME0_, leanholder1_.UAIADD1 as UAIADD10_, leanholder1_.UAIADD2 as UAIADD20_, leanholder1_.UAICITY as UAICITY0_, leanholder1_.UAISTAT as UAISTAT0_, leanholder1_.UAIZIPC as UAIZIPC0_, leanholder1_.UAIPHN# as UAIPHN#0_, leanholder1_.UAIFAX# as UAIFAX#0_, leanholder1_.UAADLCH as UAADLCH0_ from uaigweb.UQHSUNIT unit0_ left outer join uaigweb.UQHSADLX leanholder1_ on unit0_.UUNITNO=leanholder1_.UAUNTNO and unit0_.UUREFNO=leanholder1_.UAREFNO where unit0_.UUNITNO=? and unit0_.UUREFNO=?

Debug level Hibernate log excerpt:
Hibernate: select unit0_.UUNITNO as UUNITNO3_, unit0_.UUREFNO as UUREFNO3_, unit0_.UUCOMP# as UUCOMP#3_, unit0_.UUPRFXN as UUPRFXN3_, unit0_.UUPLNBR as UUPLNBR3_, unit0_.UUNITTY as UUNITTY3_, unit0_.UUNITGR as UUNITGR3_, unit0_.UUVINID as UUVINID3_, unit0_.UUYEAR as UUYEAR3_, unit0_.UUMAKE as UUMAKE3_, unit0_.UUMODL as UUMODL3_, unit0_.UUDESC as UUDESC3_, unit0_.UUZIPC as UUZIPC3_, unit0_.UUCNTY as UUCNTY3_, unit0_.UUCITY as UUCITY3_, unit0_.UUCNTCD as UUCNTCD3_, unit0_.UUSTUS as UUSTUS3_, unit0_.UUACTY as UUACTY3_, unit0_.UUMILE as UUMILE3_, unit0_.UUDELDT as UUDELDT3_, unit0_.UUADDDT as UUADDDT3_, unit0_.UURCLS as UURCLS3_, unit0_.UUODOM as UUODOM3_, unit0_.UURSYMB as UURSYMB3_, unit0_.UUPUSEC as UUPUSEC3_, unit0_.UUTERR as UUTERR3_, unit0_.UUPSRT as UUPSRT3_, unit0_.UUANTF as UUANTF3_, unit0_.UUANTLK as UUANTLK3_, unit0_.UUMULTC as UUMULTC3_, unit0_.UUTRNFD as UUTRNFD3_, unit0_.UURTDRV as UURTDRV3_, unit0_.UURPLCT as UURPLCT3_, unit0_.UUCUSTE as UUCUSTE3_, unit0_.UUHGSYM as UUHGSYM3_, unit0_.UUSNRDR as UUSNRDR3_, unit0_.UUNITCH as UUNITCH3_, unit0_.UUVINCH as UUVINCH3_, policy1_.UPREFNO as UPREFNO0_, policy1_.UPACTDS as UPACTDS0_, policy1_.UPRENCT as UPRENCT0_, policy1_.UPPLNBR as UPPLNBR0_, policy1_.UPMPRFX as UPMPRFX0_, policy1_.UPCOMP# as UPCOMP#0_, policy1_.UPCLTID as UPCLTID0_, policy1_.UPGNAGT as UPGNAGT0_, policy1_.UPSBAGT as UPSBAGT0_, policy1_.UPPDAGT as UPPDAGT0_, policy1_.UPTEFDT as UPTEFDT0_, policy1_.UPTEXDT as UPTEXDT0_, policy1_.UPACTDT as UPACTDT0_, policy1_.UPENTDT as UPENTDT0_, policy1_.UPTERM as UPTERM0_, policy1_.UPPYPLN as UPPYPLN0_, policy1_.UPSTATE as UPSTATE0_, policy1_.UPSTUS as UPSTUS0_, policy1_.UPACTY as UPACTY0_, policy1_.UPPTYP as UPPTYP0_, policy1_.UPBNDNO as UPBNDNO0_, policy1_.UPQTPRM as UPQTPRM0_, policy1_.UPLSTPM as UPLSTPM0_, policy1_.UPWRTPM as UPWRTPM0_, policy1_.UPPLFEE as UPPLFEE0_, policy1_.UPMRNNS as UPMRNNS0_, policy1_.UPMRENI as UPMRENI0_, policy1_.UPRNWDS as UPRNWDS0_, policy1_.UUHOMDS as UUHOMDS0_, policy1_.UPPCMP as UPPCMP0_, policy1_.UPPPFX as UPPPFX0_, policy1_.UPPPLN as UPPPLN0_, policy1_.UPPTEFFDTE as UPPTEFFDTE0_, policy1_.UPPTEXPDTE as UPPTEXPDTE0_, policy1_.UPPTERM as UPPTERM0_, policy1_.UPRCMP as UPRCMP0_, policy1_.UPRPFX as UPRPFX0_, policy1_.UPRPLN as UPRPLN0_, policy1_.UPUSER as UPUSER0_, insured2_.UNREFNO as UNREFNO1_, insured2_.UNCOMP# as UNCOMP#1_, insured2_.UNMPRFX as UNMPRFX1_, insured2_.UNPLNBR as UNPLNBR1_, insured2_.UNACTFN as UNACTFN1_, insured2_.UNACTMN as UNACTMN1_, insured2_.UNACTLN as UNACTLN1_, insured2_.UNACTA1 as UNACTA11_, insured2_.UNACTAN as UNACTAN1_, insured2_.UNACTA2 as UNACTA21_, insured2_.UNACTCT as UNACTCT1_, insured2_.UNACTST as UNACTST1_, insured2_.UNACTZC as UNACTZC1_, insured2_.UNACTHP as UNACTHP1_, insured2_.UNACTWP as UNACTWP1_, insured2_.UNACTWE as UNACTWE1_, insured2_.UNMLGA1 as UNMLGA11_, insured2_.UNMLGAN as UNMLGAN1_, insured2_.UNMLGA2 as UNMLGA21_, insured2_.UNMLGCT as UNMLGCT1_, insured2_.UNMLGST as UNMLGST1_, insured2_.UNMLGZC as UNMLGZC1_, insured2_.UNCATFN as UNCATFN1_, insured2_.UNCATMN as UNCATMN1_, insured2_.UNCATLN as UNCATLN1_, insured2_.UNCATA1 as UNCATA11_, insured2_.UNCATAN as UNCATAN1_, insured2_.UNCATA2 as UNCATA21_, insured2_.UNCATCT as UNCATCT1_, insured2_.UNCATST as UNCATST1_, insured2_.UNCATZC as UNCATZC1_, insured2_.UNCATHP as UNCATHP1_, insured2_.UNCATWP as UNCATWP1_, insured2_.UNCATWE as UNCATWE1_, insured2_.UNAPCTC as UNAPCTC1_, insured2_.UNMLGTC as UNMLGTC1_, insured2_.UNCAPTC as UNCAPTC1_, leanholder3_.UAUNTNO as UAUNTNO2_, leanholder3_.UAREFNO as UAREFNO2_, leanholder3_.UAAICOD as UAAICOD2_, leanholder3_.UACOMP# as UACOMP#2_, leanholder3_.UAPRFXN as UAPRFXN2_, leanholder3_.UAPLNBR as UAPLNBR2_, leanholder3_.UAKEYFL as UAKEYFL2_, leanholder3_.UAADNTT as UAADNTT2_, leanholder3_.UALOANN as UALOANN2_, leanholder3_.UAADDDT as UAADDDT2_, leanholder3_.UADELDT as UADELDT2_, leanholder3_.UAINAME as UAINAME2_, leanholder3_.UAIADD1 as UAIADD12_, leanholder3_.UAIADD2 as UAIADD22_, leanholder3_.UAICITY as UAICITY2_, leanholder3_.UAISTAT as UAISTAT2_, leanholder3_.UAIZIPC as UAIZIPC2_, leanholder3_.UAIPHN# as UAIPHN#2_, leanholder3_.UAIFAX# as UAIFAX#2_, leanholder3_.UAADLCH as UAADLCH2_ from uaigweb.UQHSUNIT unit0_ left outer join uaigweb.UQHSPLCY policy1_ on unit0_.UUREFNO=policy1_.UPREFNO left outer join uaigweb.UQHSNMAD insured2_ on policy1_.UPREFNO=insured2_.UNREFNO left outer join uaigweb.UQHSADLX leanholder3_ on unit0_.UUNITNO=leanholder3_.UAUNTNO and unit0_.UUREFNO=leanholder3_.UAREFNO where unit0_.UUNITNO=? and unit0_.UUREFNO=?
DEBUG [main] (BatcherImpl.java:253) - preparing statement
DEBUG [main] (BatcherImpl.java:211) - done closing: 0 open PreparedStatements, 0 open ResultSets
DEBUG [main] (BatcherImpl.java:275) - closing statement
DEBUG [main] (SessionImpl.java:578) - closing session
DEBUG [main] (SessionImpl.java:3383) - disconnecting session
DEBUG [main] (SessionImpl.java:596) - transaction completion
org.springframework.orm.hibernate.HibernateSystemException: exception getting property value with CGLIB (set hibernate.cglib.use_reflection_optimizer=false for more info) getter of com.uaig.sis.UnitPK.?; nested exception is net.sf.hibernate.PropertyAccessException: exception getting property value with CGLIB (set hibernate.cglib.use_reflection_optimizer=false for more info) getter of com.uaig.sis.UnitPK.?
net.sf.hibernate.PropertyAccessException: exception getting property value with CGLIB (set hibernate.cglib.use_reflection_optimizer=false for more info) getter of com.uaig.sis.UnitPK.?
at net.sf.hibernate.type.ComponentType.getPropertyValues(ComponentType.java:193)
at net.sf.hibernate.type.ComponentType.nullSafeGetValues(ComponentType.java:164)
at net.sf.hibernate.type.ComponentType.nullSafeSet(ComponentType.java:151)
at net.sf.hibernate.loader.Loader.bindPositionalParameters(Loader.java:753)
at net.sf.hibernate.loader.Loader.prepareQueryStatement(Loader.java:793)
at net.sf.hibernate.loader.Loader.doQuery(Loader.java:269)
at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:138)
at net.sf.hibernate.loader.Loader.loadEntity(Loader.java:941)
at net.sf.hibernate.loader.Loader.loadEntity(Loader.java:961)
at net.sf.hibernate.loader.EntityLoader.load(EntityLoader.java:59)
at net.sf.hibernate.loader.EntityLoader.load(EntityLoader.java:51)
at net.sf.hibernate.persister.EntityPersister.load(EntityPersister.java:413)
at net.sf.hibernate.impl.SessionImpl.doLoad(SessionImpl.java:2131)
at net.sf.hibernate.impl.SessionImpl.doLoadByClass(SessionImpl.java:2001)
at net.sf.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:1963)
at net.sf.hibernate.type.OneToOneType.resolveIdentifier(OneToOneType.java:71)
at net.sf.hibernate.type.EntityType.resolveIdentifier(EntityType.java:208)
at net.sf.hibernate.impl.SessionImpl.initializeEntity(SessionImpl.java:2219)
at net.sf.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:319)
at net.sf.hibernate.loader.Loader.doQuery(Loader.java:309)
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.hql.QueryTranslator.list(QueryTranslator.java:854)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1554)
at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:49)
at org.springframework.orm.hibernate.HibernateTemplate$24.doInHibernate(HibernateTemplate.java:620)
at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:312)
at org.springframework.orm.hibernate.HibernateTemplate.find(HibernateTemplate.java:616)
at com.uaig.migration.dao.As400MigrationDAOImpl.findLeanHolderInfo(As400MigrationDAOImpl.java:262)
at com.uaig.migration.dao.TestAs400MigrationDao.testFindLeanHolderInfo(TestAs400MigrationDao.java:126)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:421)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:305)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:186)
Caused by: java.lang.ClassCastException
at com.uaig.sis.UnitPK$$BulkBeanByCGLIB$$26a2cc8.getPropertyValues(<generated>)
at net.sf.cglib.beans.BulkBean.getPropertyValues(BulkBean.java:48)
at net.sf.hibernate.type.ComponentType.getPropertyValues(ComponentType.java:190)
... 43 more


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.