This seems to be a recurring issue. Should this be part of the startup routine and or the data integrity checks?
···
Sent from my HTC
----- Reply message -----
From: “Lars Helge Øverland” larshelge@gmail.com
Date: Fri, Oct 22, 2010 3:17 pm
Subject: [Dhis2-devs] Export failed with cannot instantiate Source (was: Re: Re: Pivot tables)
To: “Ola Hodne Titlestad” olati@ifi.uio.no
Cc: “DHIS 2 developers” dhis2-devs@lists.launchpad.net
This SQL will do the trick:
delete from source where sourceid not in ( select organisationunitid from
organisationunit );
On Fri, Oct 22, 2010 at 3:00 PM, Ola Hodne Titlestad olati@ifi.uio.nowrote:
Damiola,
Please use a different subject when your email it is not related to the
thread.
That makes it easier for all of us to read emails and browse the list, and
to respond to requests.Just compose a new email to dhis2-devs@lists.launchpad.net and it will go
to the list.
I would also recommend using the Bug report on launchpad when reporting
bugs.Regarding your exception it seems the orgunit and source tables are out of
synch which might happen if you manually delete or create orgunits directly
in the database (which is not recommended). Please make sure that the all
the IDs in Source and Organisationunit are exactly the same and try again.
If it still doesn’t work, it is something wrong and we need to create a bug
report.
Ola Hodne Titlestad (Mr)
HISP
Department of Informatics
University of OsloMobile: +47 48069736
Home address: Vetlandsvn. 95B, 0685 Oslo, Norway. Googlemaps link<http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=Vetlandsvn.+95B,+0685+Oslo,+Norway>2010/10/22 damilola@centrifugegroup.org
Hi Bob,
Export (ALL) failed with the error below. This began on upgrade from
previous to dhis2.0.5.org.hibernate.InstantiationException: Cannot instantiate abstract class or
interface: org.hisp.dhis.source.Source
at
org.hibernate.tuple.PojoInstantiator.instantiate(PojoInstantiator.java:101)
at
org.hibernate.tuple.PojoInstantiator.instantiate(PojoInstantiator.java:123)
at
org.hibernate.tuple.entity.AbstractEntityTuplizer.instantiate(AbstractEntityTuplizer.java:606)
at
org.hibernate.persister.entity.AbstractEntityPersister.instantiate(AbstractEntityPersister.java:3888)
at org.hibernate.impl.SessionImpl.instantiate(SessionImpl.java:1412)
at org.hibernate.impl.SessionImpl.instantiate(SessionImpl.java:1401)
at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1342)
at org.hibernate.loader.Loader.getRow(Loader.java:1251)
at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:619)
at org.hibernate.loader.Loader.doQuery(Loader.java:745)
at
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:270)
at org.hibernate.loader.Loader.doList(Loader.java:2294)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2172)
at org.hibernate.loader.Loader.list(Loader.java:2167)
at
org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:119)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1706)
at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:347)
at
org.hisp.dhis.source.hibernate.HibernateSourceStore.getAllSources(HibernateSourceStore.java:98)
at
org.hisp.dhis.organisationunit.DefaultOrganisationUnitService.getAllOrganisationUnits(DefaultOrganisationUnitService.java:164)
at
org.hisp.dhis.organisationunit.DefaultOrganisationUnitService.getOrganisationUnits(DefaultOrganisationUnitService.java:169)
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
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
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.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy12.getOrganisationUnits(Unknown Source)
at
org.hisp.dhis.importexport.dxf.converter.OrganisationUnitConverter.write(OrganisationUnitConverter.java:115)
at
org.hisp.dhis.importexport.ExportPipeThread.doRun(ExportPipeThread.java:164)
at
org.hisp.dhis.system.process.OpenSessionThread.run(OpenSessionThread.java:58)
Exception in thread “Thread-21” java.