Bug 547708

Summary: Display better error message for packageVersion.xhtml when a package doesn't exist.
Product: [Other] RHQ Project Reporter: John Matthews <jmatthew>
Component: ContentAssignee: Charles Crouch <ccrouch>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: cwelton, hbrock, jmatthew, jshaughn, whayutin
Target Milestone: ---Keywords: SubBug
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-05-16 16:14:26 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On:    
Bug Blocks: 565635    

Description John Matthews 2009-12-15 09:04:57 EST
Description of problem:

I had an old page up for listing a RHQ repo and clicked on a package and saw the below exception.  It took me a minute to realize this wasn't a problem, since I was viewing old data that was deleted when I did a developer clean.  Still...it might be worth cleaning up the error message to make it clearer that the error is a package no longer exists.



Steps to Reproduce:
1.  Sync rhel-i386-server-5
2.  Bring up a repo list page showing the packages in rhel-i386-server-5
3.  Leave this page up
4.  Bring down RHQ
5.  Clean the build, "mvn -Pdev,enterprise clean"
6.  Rebuild and wipe the database: "mvn -Pdev,enterprise -Dmaven.test.skip=true -Ddbsetup install"
7.  Bring RHQ backup
8.  Go back to repo list page and do not refresh, click on a package.
  
Actual results:
#
Error Rendering View[/rhq/content/packageVersion.xhtml]
#
com.sun.facelets.tag.TagAttributeException: /rhq/content/packageVersion.xhtml @171,60 test="#{!empty item.extraProperties}" /rhq/content/packageVersion.xhtml @171,60 test="#{!empty item.extraProperties}": /rhq/content/packageVersion.xhtml @19,91 value="#{PackageVersionDetailsUIBean.packageVersionComposite}": Error reading 'packageVersionComposite' on type org.rhq.enterprise.gui.content.PackageVersionDetailsUIBean

Expected results:
Error message stating package no longer exists.




Additional info:
2009-12-15 08:32:25,910 ERROR [facelets.viewhandler] Error Rendering View[/rhq/content/packageVersion.xhtml]
com.sun.facelets.tag.TagAttributeException: /rhq/content/packageVersion.xhtml @171,60 test="#{!empty item.extraProperties}" /rhq/content/packageVersion.xhtml @171,60 test="#{!empty item.extraProperties}": /rhq/content/packageVersion.xhtml @19,91 value="#{PackageVersionDetailsUIBean.packageVersionComposite}": Error reading 'packageVersionComposite' on type org.rhq.enterprise.gui.content.PackageVersionDetailsUIBean
	at com.sun.facelets.tag.TagAttribute.getObject(TagAttribute.java:235)
	at com.sun.facelets.tag.TagAttribute.getBoolean(TagAttribute.java:79)
	at com.sun.facelets.tag.jstl.core.IfHandler.apply(IfHandler.java:49)
	at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
	at com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:314)
	at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:169)
	at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
	at com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:314)
	at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:169)
	at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
	at com.sun.facelets.tag.ui.DefineHandler.applyDefinition(DefineHandler.java:64)
	at com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:131)
	at com.sun.facelets.impl.DefaultFaceletContext$TemplateManager.apply(DefaultFaceletContext.java:310)
	at com.sun.facelets.impl.DefaultFaceletContext.includeDefinition(DefaultFaceletContext.java:280)
	at com.sun.facelets.tag.ui.InsertHandler.apply(InsertHandler.java:68)
	at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
	at com.sun.facelets.tag.ui.DefineHandler.applyDefinition(DefineHandler.java:64)
	at com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:131)
	at com.sun.facelets.impl.DefaultFaceletContext$TemplateManager.apply(DefaultFaceletContext.java:310)
	at com.sun.facelets.impl.DefaultFaceletContext.includeDefinition(DefaultFaceletContext.java:280)
	at com.sun.facelets.tag.ui.InsertHandler.apply(InsertHandler.java:68)
	at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
	at com.sun.facelets.tag.jsf.core.ViewHandler.apply(ViewHandler.java:109)
	at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
	at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
	at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
	at com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)
	at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:248)
	at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:294)
	at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:273)
	at com.sun.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:144)
	at com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:113)
	at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
	at com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)
	at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:248)
	at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:294)
	at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:273)
	at com.sun.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:144)
	at com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:113)
	at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
	at com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)
	at com.sun.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:95)
	at com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:524)
	at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:567)
	at org.rhq.enterprise.gui.common.framework.FaceletRedirectionViewHandler.renderView(FaceletRedirectionViewHandler.java:64)
	at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
	at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
	at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
	at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:532)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.rhq.enterprise.gui.legacy.WebUserTrackingFilter.doFilter(WebUserTrackingFilter.java:47)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.rhq.enterprise.gui.legacy.AuthenticationFilter.doFilter(AuthenticationFilter.java:129)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
	at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:38)
	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
	at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
	at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
	at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
	at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
	at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
	at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:390)
	at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:517)
	at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
	at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
	at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.rhq.helpers.rtfilter.filter.RtFilter.doFilter(RtFilter.java:124)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
	at java.lang.Thread.run(Thread.java:636)
Caused by: javax.el.ELException: /rhq/content/packageVersion.xhtml @171,60 test="#{!empty item.extraProperties}": /rhq/content/packageVersion.xhtml @19,91 value="#{PackageVersionDetailsUIBean.packageVersionComposite}": Error reading 'packageVersionComposite' on type org.rhq.enterprise.gui.content.PackageVersionDetailsUIBean
	at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:76)
	at com.sun.facelets.tag.TagAttribute.getObject(TagAttribute.java:233)
	... 100 more
Caused by: javax.ejb.EJBException: javax.persistence.NoResultException: No entity found for query
	at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:63)
	at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83)
	at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
	at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:240)
	at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:210)
	at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:84)
	at $Proxy164.loadPackageVersionCompositeWithExtraProperties(Unknown Source)
	at org.rhq.enterprise.gui.content.PackageVersionDetailsUIBean.loadPackageVersionComposite(PackageVersionDetailsUIBean.java:41)
	at org.rhq.enterprise.gui.content.PackageVersionDetailsUIBean.getPackageVersionComposite(PackageVersionDetailsUIBean.java:32)
	at sun.reflect.GeneratedMethodAccessor692.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:616)
	at javax.el.BeanELResolver.getValue(BeanELResolver.java:62)
	at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
	at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)
	at org.jboss.el.parser.AstPropertySuffix.getValue(AstPropertySuffix.java:53)
	at org.jboss.el.parser.AstValue.getValue(AstValue.java:67)
	at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
	at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
	at org.jboss.el.parser.AstIdentifier.getValue(AstIdentifier.java:40)
	at org.jboss.el.parser.AstValue.getValue(AstValue.java:63)
	at org.jboss.el.parser.AstEmpty.getValue(AstEmpty.java:29)
	at org.jboss.el.parser.AstNot.getValue(AstNot.java:26)
	at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
	at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
	... 101 more
Caused by: javax.persistence.NoResultException: No entity found for query
	at org.hibernate.ejb.QueryImpl.getSingleResult(QueryImpl.java:82)
	at org.rhq.enterprise.server.content.ContentUIManagerBean.loadPackageVersionCompositeWithExtraProperties(ContentUIManagerBean.java:254)
	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.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
	at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
	at org.rhq.enterprise.server.common.TransactionInterruptInterceptor.addCheckedActionToTransactionManager(TransactionInterruptInterceptor.java:77)
	at sun.reflect.GeneratedMethodAccessor116.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:616)
	at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
	at org.rhq.enterprise.server.authz.RequiredPermissionsInterceptor.checkRequiredPermissions(RequiredPermissionsInterceptor.java:153)
	at sun.reflect.GeneratedMethodAccessor115.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:616)
	at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
	at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
	... 136 more
Comment 1 wes hayutin 2010-02-16 11:57:12 EST
Temporarily adding the keyword "SubBug" so we can be sure we have accounted for all the bugs.

keyword:
new = Tracking + FutureFeature + SubBug
Comment 2 wes hayutin 2010-02-16 12:02:16 EST
making sure we're not missing any bugs in rhq_triage