← Back to team overview

dhis2-devs team mailing list archive

Re: Troubles when generate a report in DHIS 2

 

Welcome to the DHIS hackers club. This bug has been discussed several times.
Search the email archives (which is always a good thing to do) and you will
see my name there on this topic... probably a few times. :)

Thankfully, this object has been deleted in the latest version, which making
hacking orgunits much easier.

Glad it worked out.

Regards,
Jason


On Fri, Jun 17, 2011 at 7:06 PM, Orvalho Augusto <orvaquim@xxxxxxxxx> wrote:

> Just to record and thanks again. Jason really thanks.
>

The DHIS that I use creates and uses the source table. What happened is I
> had on source table an id that were not in organisationunit. Jason told me
> to delete that record and everything came to normal.
>
> Thank you
> Caveman
>
>
>
>
> On Thu, Jun 16, 2011 at 10:13 PM, Orvalho Augusto <orvaquim@xxxxxxxxx>wrote:
>
>> Thanks!
>>
>> I downloaded from the DHIS 2 (2.2) site last month.
>>
>> The database has been created by DHIS war by placing this:
>>
>> hibernate.dialect = org.hibernate.dialect.MySQLDialect
>> hibernate.connection.driver_class = com.mysql.jdbc.Driver
>> hibernate.connection.url =
>> jdbc:mysql://localhost/dhis2i?useUnicode=true&characterEncoding=UTF-8
>> hibernate.connection.username = xxx
>> hibernate.connection.password = xxx
>> hibernate.hbm2ddl.auto = update
>>
>> on the hibernate.properties file.
>>
>> Caveman
>>
>>
>> On Thu, Jun 16, 2011 at 10:07 PM, Knut Staring <knutst@xxxxxxxxx> wrote:
>>
>>> Which version of DHIS2 are you using? How did you create your database?
>>>
>>>
>>> On Thu, Jun 16, 2011 at 9:50 PM, Orvalho Augusto <orvaquim@xxxxxxxxx>wrote:
>>>
>>>> So I should delete the source table?
>>>>
>>>> Caveman
>>>>
>>>>
>>>> On Thu, Jun 16, 2011 at 9:46 PM, Knut Staring <knutst@xxxxxxxxx> wrote:
>>>>
>>>>> It looks as though you are using a recent build with an old database,
>>>>> as I think the Source table has now been removed.
>>>>>
>>>>> On Thu, Jun 16, 2011 at 9:25 PM, Orvalho Augusto <orvaquim@xxxxxxxxx>wrote:
>>>>>
>>>>>> I am converting data from a NGO in Mozambique to DHIS 2. I moved one
>>>>>> dataset to test DHIS. I dit not tune tomcat neither MySQL yet.
>>>>>>
>>>>>> When we generate reports we get this error on the browser and on the
>>>>>> logs:
>>>>>> 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:1362)
>>>>>>     at org.hibernate.loader.Loader.getRow(Loader.java:1271)
>>>>>>     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:2449)
>>>>>>     at
>>>>>> org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2192)
>>>>>>     at org.hibernate.loader.Loader.list(Loader.java:2187)
>>>>>>     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:101)
>>>>>>     at
>>>>>> org.hisp.dhis.organisationunit.DefaultOrganisationUnitService.getAllOrganisationUnits(DefaultOrganisationUnitService.java:159)
>>>>>>     at
>>>>>> org.hisp.dhis.organisationunit.DefaultOrganisationUnitService.getOrganisationUnits(DefaultOrganisationUnitService.java:164)
>>>>>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>     at
>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>>>>>     at
>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>>>>     at java.lang.reflect.Method.invoke(Method.java:616)
>>>>>>     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.datamart.engine.DefaultDataMartEngine.export(DefaultDataMartEngine.java:210)
>>>>>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>     at
>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>>>>>     at
>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>>>>     at java.lang.reflect.Method.invoke(Method.java:616)
>>>>>>     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.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
>>>>>>     at $Proxy44.export(Unknown Source)
>>>>>>     at
>>>>>> org.hisp.dhis.datamart.impl.DefaultDataMartService.export(DefaultDataMartService.java:107)
>>>>>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>     at
>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>>>>>     at
>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>>>>     at java.lang.reflect.Method.invoke(Method.java:616)
>>>>>>     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.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80)
>>>>>>     at
>>>>>> org.amplecode.quick.StatementInterceptor.intercept(StatementInterceptor.java:71)
>>>>>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>     at
>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>>>>>     at
>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>>>>     at java.lang.reflect.Method.invoke(Method.java:616)
>>>>>>     at
>>>>>> org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)
>>>>>>     at
>>>>>> org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)
>>>>>>     at
>>>>>> org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65)
>>>>>>     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 $Proxy45.export(Unknown Source)
>>>>>>     at
>>>>>> org.hisp.dhis.reporttable.impl.DefaultReportTableService.populateReportTableDataMart(DefaultReportTableService.java:154)
>>>>>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>     at
>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>>>>>     at
>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>>>>     at java.lang.reflect.Method.invoke(Method.java:616)
>>>>>>     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 $Proxy48.populateReportTableDataMart(Unknown Source)
>>>>>>     at
>>>>>> org.hisp.dhis.reporttable.ReportTableInternalProcess.executeStatements(ReportTableInternalProcess.java:111)
>>>>>>     at
>>>>>> org.hisp.dhis.system.process.AbstractStatementInternalProcess.execute(AbstractStatementInternalProcess.java:103)
>>>>>>     at
>>>>>> org.hisp.dhis.system.process.AbstractStatementInternalProcess.execute(AbstractStatementInternalProcess.java:40)
>>>>>>     at
>>>>>> org.amplecode.cave.process.ProcessExecutor.run(ProcessExecutor.java:125)
>>>>>>     at java.lang.Thread.run(Thread.java:636)
>>>>>>
>>>>>> My DHIS is:
>>>>>> Current user:adminVersion:2.2 Build revision: 3434 Build date:2011-04-20
>>>>>> 19:41User agent:Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17)
>>>>>> Gecko/20110422 Ubuntu/10.04 (lucid) Firefox/3.6.17External
>>>>>> configuration directory: /usr/local/dhis2configEnvironment variable:
>>>>>> DHIS2_HOMEDatabase type:MySQLDatabase name:dhis2_fhiDatabase user:fhiJava
>>>>>> Opts:-Djava.awt.headless=true -Xmx256m -Xms128m -XX:MaxPermSize=128m
>>>>>> -XX:+UseConcMarkSweepGC
>>>>>> -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManagerJava
>>>>>> version:1.6.0_20Java vendor:Sun Microsystems Inc.OS name:LinuxOS
>>>>>> architecture: i386OS version:2.6.32-32-genericPlease help us
>>>>>> Caveman
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Mailing list: https://launchpad.net/~dhis2-devs
>>>>>> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>>>>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>>>>> More help   : https://help.launchpad.net/ListHelp
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Cheers,
>>>>> Knut Staring
>>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Cheers,
>>> Knut Staring
>>>
>>
>>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>

Follow ups

References