Project

General

Profile

Actions

bug #5556

closed

Class Cast Exception in DefinedTermDaoImpl.getPartOf

Added by Andreas Müller over 8 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Priority14
Category:
cdmlib
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Severity:
normal
Found in Version:
Tags:

Description

The following CCE appeared when calling DescriptionPortalController.doGetDistributionInfo.

Class casting is not correct in getPartOf (and maybe similar methods !!) as it takes the class of the first term and applies it to all other terms.

Caused by:

java.lang.ClassCastException: Cannot cast eu.etaxonomy.cdm.model.location.NamedArea to eu.etaxonomy.cdm.model.location.Country
    at java.lang.Class.cast(Class.java:3176)
    at eu.etaxonomy.cdm.hibernate.HibernateProxyHelper.deproxy(HibernateProxyHelper.java:34)
    at eu.etaxonomy.cdm.model.common.CdmBase.deproxy(CdmBase.java:312)
    at eu.etaxonomy.cdm.persistence.dao.hibernate.common.DefinedTermDaoImpl.getPartOf(DefinedTermDaoImpl.java:626)
    at eu.etaxonomy.cdm.api.service.DistributionTree.loadAllParentAreas(DistributionTree.java:126)
    at eu.etaxonomy.cdm.api.service.DistributionTree.orderAsTree(DistributionTree.java:97)
    at eu.etaxonomy.cdm.api.utility.DescriptionUtility.orderDistributions(DescriptionUtility.java:261)
    at eu.etaxonomy.cdm.ext.geo.EditGeoService.composeDistributionInfoFor(EditGeoService.java:385)
    at sun.reflect.GeneratedMethodAccessor1729.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)

Related issues

Related to EDIT - feature request #6794: Improve term structureIn ProgressAndreas Müller

Actions
Related to EDIT - bug #10277: HibernateSystemException and BridgeException not in taxeditor dependenciesClosedAndreas Müller

Actions
Actions

Also available in: Atom PDF