Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Class Cast Exception when defining relationship caching

0 views
Skip to first unread message

Rosh

unread,
Sep 24, 2003, 2:36:33 PM9/24/03
to

Hi,

We're using Weblogic 7.1

After setting relationship caching on the 1-many relationship between logicallocation
and container, the following exception occurs in our system.

[java] java.lang.ClassCastException: java.util.HashSet
[java] at
com.csxwt.zodiac.service.domain.ContainerBean_pap1zj__WebLogic_CMP_RDBMS.__W
L_postSetLogicalLocation(ContainerBean_pap1zj__WebLogic_CMP_RDBMS.java:3603)

[java] at
com.csxwt.zodiac.service.domain.ContainerBean_pap1zj__WebLogic_CMP_RDBMS.__W
L_setLogicalLocation(ContainerBean_pap1zj__WebLogic_CMP_RDBMS.java:3569)
[java] at
com.csxwt.zodiac.service.domain.ContainerBean_pap1zj__WebLogic_CMP_RDBMS.__W
L_setLogicalLocation(ContainerBean_pap1zj__WebLogic_CMP_RDBMS.java:3529)
[java] at
com.csxwt.zodiac.service.domain.ContainerBean_pap1zj__WebLogic_CMP_RDBMS.set
LogicalLocation(ContainerBean_pap1zj__WebLogic_CMP_RDBMS.java:3526)
[java] at
com.csxwt.zodiac.service.domain.ContainerBean_pap1zj_ELOImpl.setLogicalLocat
ion(ContainerBean_pap1zj_ELOImpl.java:3400)

this comes from the following generated code:

private void __WL_postSetLogicalLocation() throws Exception
{
/* 3590*/ if (__WL_logicalLocation_id != null)
{
/* 3593*/ PK pk = new PK();
/* 3595*/ pk.id = __WL_logicalLocation_id;
/* 3597*/ LogicalLocationBean_h1xaby__WebLogic_CMP_RDBMS
logicallocationbean_h1xaby__weblogic_cmp_rdbms = (LogicalLocationBean_h1xaby__WebLogic_CMP_RDBMS)__WL_logicalLocation_bm.look
up(pk);
/* 3600*/ int i =
logicallocationbean_h1xaby__weblogic_cmp_rdbms.__WL_getMethodState();
/* 3602*/ try
{
/* 3602*/ logicallocationbean_h1xaby__weblogic_cmp_rdbms.__WL_setMethodState(128);
/* 3603*/ RDBMSSet rdbmsset =
(RDBMSSet)logicallocationbean_h1xaby__weblogic_cmp_rdbms.getContainers();
/* 3605*/ rdbmsset.doAdd(__WL_ctx.getEJBLocalObject());
}
/* 3607*/ finally
{
/* 3607*/ logicallocationbean_h1xaby__weblogic_cmp_rdbms.__WL_setMethodState(i);
}
}
}

it seems like the relationship caching causes WebLogic to store a HashSet internally
in LogicalLocation.Containers while the generated code expects this to be a RDBMSSet.

Could you please instruct me on how I may overcome the above mentioned situation.
I need to have relationship caching in order to improve the performance of the
system. However once I use the relationship caching feature this exception is
thrown.

Your prompt response is appreciated.

Thanks and Kind Regards
Roshan

0 new messages