kao123 / lifeforachild

Automatically exported from code.google.com/p/lifeforachild
0 stars 0 forks source link

List All Reports - results in Internal Error #91

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Steps to reproduce:

1. On the Search/Home page, click "List all Reports" from the Report left-hand 
navigation menu =>Internal Error.

Exception Message:
Unknown ordinal value for enum class org.lifeforachild.domain.ReportType: 1

Exception Stack Trace:
org.hibernate.type.EnumType.nullSafeGet(EnumType.java:87)
org.hibernate.type.CustomType.nullSafeGet(CustomType.java:105)
org.hibernate.type.AbstractType.hydrate(AbstractType.java:81)
org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPer
sister.java:2101)
org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1380)
org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1308)
org.hibernate.loader.Loader.getRow(Loader.java:1206)
org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:580)
org.hibernate.loader.Loader.doQuery(Loader.java:701)
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:2
36)
org.hibernate.loader.Loader.doList(Loader.java:2213)
org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
org.hibernate.loader.Loader.list(Loader.java:2099)
org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:94)
org.hibernate.impl.SessionImpl.list(SessionImpl.java:1569)
org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:283)
org.lifeforachild.web.query.BaseQuery.findEntries(BaseQuery.java:47)
org.lifeforachild.domain.Report_Roo_Entity.findReportEntries_aroundBody8(Report_
Roo_Entity.aj:104)
org.lifeforachild.domain.Report_Roo_Entity.ajc$interMethod$org_lifeforachild_dom
ain_Report_Roo_Entity$org_lifeforachild_domain_Report$findReportEntries(Report_R
oo_Entity.aj:1)
org.lifeforachild.domain.Report.findReportEntries(Report.java:1)
org.lifeforachild.domain.Report_Roo_Entity.ajc$interMethodDispatch1$org_lifefora
child_domain_Report_Roo_Entity$org_lifeforachild_domain_Report$findReportEntries
(Report_Roo_Entity.aj)
org.lifeforachild.web.ReportController_Roo_Controller.ajc$interMethod$org_lifefo
rachild_web_ReportController_Roo_Controller$org_lifeforachild_web_ReportControll
er$list(ReportController_Roo_Controller.aj:92)
org.lifeforachild.web.ReportController.list(ReportController.java:1)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:43)
java.lang.reflect.Method.invoke(Method.java:616)
org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandl
erMethod(HandlerMethodInvoker.java:175)
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.in
vokeHandlerMethod(AnnotationMethodHandlerAdapter.java:421)
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.ha
ndle(AnnotationMethodHandlerAdapter.java:409)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.j
ava:774)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.ja
va:719)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet
.java:644)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549
)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt
erChain.java:290)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.
java:206)
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java
:646)
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatc
her.java:436)
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.j
ava:374)
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.jav
a:302)
org.tuckey.web.filters.urlrewrite.NormalRewrittenUrl.doRewrite(NormalRewrittenUr
l.java:195)
org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:159)
org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:141)
org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:90
)
org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.jav
a:417)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt
erChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.
java:206)
org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHtt
pMethodFilter.java:77)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilte
r.java:76)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt
erChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.
java:206)
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(Characte
rEncodingFilter.java:88)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilte
r.java:76)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt
erChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.
java:206)
org.springframework.web.filter.ShallowEtagHeaderFilter.doFilterInternal(ShallowE
tagHeaderFilter.java:57)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilte
r.java:76)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt
erChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.
java:206)
org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterIntern
al(OpenEntityManagerInViewFilter.java:113)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilte
r.java:76)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt
erChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.
java:206)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(Fi
lterChainProxy.java:343)
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invo
ke(FilterSecurityInterceptor.java:109)
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFi
lter(FilterSecurityInterceptor.java:83)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(Fi
lterChainProxy.java:355)
org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(Exce
ptionTranslationFilter.java:97)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(Fi
lterChainProxy.java:355)
org.springframework.security.web.session.SessionManagementFilter.doFilter(Sessio
nManagementFilter.java:100)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(Fi
lterChainProxy.java:355)
org.springframework.security.web.authentication.AnonymousAuthenticationFilter.do
Filter(AnonymousAuthenticationFilter.java:78)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(Fi
lterChainProxy.java:355)
org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFil
ter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(Fi
lterChainProxy.java:355)
org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(R
equestCacheAwareFilter.java:35)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(Fi
lterChainProxy.java:355)
org.springframework.security.web.authentication.www.BasicAuthenticationFilter.do
Filter(BasicAuthenticationFilter.java:177)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(Fi
lterChainProxy.java:355)
org.springframework.security.web.authentication.AbstractAuthenticationProcessing
Filter.doFilter(AbstractAuthenticationProcessingFilter.java:187)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(Fi
lterChainProxy.java:355)
org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(Log
outFilter.java:105)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(Fi
lterChainProxy.java:355)
org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilt
er(SecurityContextPersistenceFilter.java:79)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(Fi
lterChainProxy.java:355)
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java
:149)
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFi
lterProxy.java:237)
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterPr
oxy.java:167)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt
erChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.
java:206)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:2
33)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:1
91)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109
)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:774)
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:896
)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:69
0)
java.lang.Thread.run(Thread.java:636)

Original issue reported on code.google.com by tan.huy...@gmail.com on 23 May 2011 at 11:02

GoogleCodeExporter commented 8 years ago

Original comment by tan.huy...@gmail.com on 23 May 2011 at 11:16

GoogleCodeExporter commented 8 years ago
This is caused by a old data in the database. Am having trouble connecting to 
the database to try and recify it.

Original comment by serenapo...@gmail.com on 29 May 2011 at 7:21

GoogleCodeExporter commented 8 years ago
In the report table, the only valid value for report_type is 0. There are 
probably some 1 values that need to be made 0. This was caused as I commented 
out the enum value for 1 in the java class as its not support yet.

Original comment by serenapo...@gmail.com on 31 May 2011 at 10:37

GoogleCodeExporter commented 8 years ago
Ran the following command on the DB: "update report set reporttype=0 where 
reporttype=1". It fixed the problem as described by Serena.

Original comment by pd.l...@gmail.com on 31 May 2011 at 10:48

GoogleCodeExporter commented 8 years ago
Retested OK by Tan.

Original comment by tan.huy...@gmail.com on 1 Jun 2011 at 12:16