Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to capture view exception condition #205

Open
jphiloon opened this issue Feb 1, 2019 · 0 comments
Open

How to capture view exception condition #205

jphiloon opened this issue Feb 1, 2019 · 0 comments

Comments

@jphiloon
Copy link

jphiloon commented Feb 1, 2019

Bad database data caused a referenced class object to be missing when referenced from a view. A hibernate exception is logged but the view responds with truncated data and no error thrown or bad status reported. How should I capture the following condition? Or is ContainerBase suppressing the error/exception?

Hibernate: select draft0_.DRAFT_ID <and more fields> from draft draft0_ where draft0_.DRAFT_ID=?
2019-02-01 14:05:52,541 ERROR org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/].[grailsDispatcherServlet] - Servlet.service() for servlet [grailsDispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is grails.views.ViewRenderException: Error rendering view: Error rendering view: No row with the given identifier exists: [com.xxx.yyy.domainobject.Draft#5296]] with root cause
org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [com.xxx.yyy.domainobject.Draft#5296]
	at org.hibernate.boot.internal.StandardEntityNotFoundDelegate.handleEntityNotFound(StandardEntityNotFoundDelegate.java:28)
	at org.hibernate.proxy.AbstractLazyInitializer.checkTargetState(AbstractLazyInitializer.java:236)
	at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:158)
	at org.grails.orm.hibernate.proxy.SimpleHibernateProxyHandler.unwrapProxy(SimpleHibernateProxyHandler.java:87)
	at org.grails.orm.hibernate.cfg.GrailsHibernateUtil.unwrapProxy(GrailsHibernateUtil.java:383)
	at org.grails.orm.hibernate.cfg.HibernateUtils$_handleLazyProxy_closure1.doCall(HibernateUtils.groovy:48)
	at sun.reflect.GeneratedMethodAccessor372.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1427)
	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98)
	at org.codehaus.groovy.runtime.metaclass.ClosureMetaMethod.invoke(ClosureMetaMethod.java:84)
	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
	at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:1845)
	at groovy.lang.ExpandoMetaClass.getProperty(ExpandoMetaClass.java:1155)
	at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:3773)
	at groovy.lang.ExpandoMetaClass.getProperty(ExpandoMetaClass.java:1167)
	at com.xxx.yyy.domainobject.DraftWfInstance.getProperty(DraftWfInstance.groovy)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant