Bug 748154 - Error when accessing "languages"
Error when accessing "languages"
Status: CLOSED CURRENTRELEASE
Product: Zanata
Classification: Community
Component: Component-UI (Show other bugs)
1.5-SNAPSHOT
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Carlos Munoz
Ding-Yi Chen
:
Depends On:
Blocks: 748157
  Show dependency treegraph
 
Reported: 2011-10-22 12:02 EDT by Joshua Wulf
Modified: 2014-10-19 18:59 EDT (History)
3 users (show)

See Also:
Fixed In Version: 1.5-SNAPSHOT (20111027-1415)
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-04-23 00:33:05 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Joshua Wulf 2011-10-22 12:02:40 EDT
Description of problem: "An Error Occurred:
/language/home.xhtml: Exception executing predicate ZanataPermissions.Rule_TeamCoordinatorModifyLanguageTeamMembers_0Predicate1Invoker@84218477"

Version-Release number of selected component (if applicable): 1.5 
http://zanata-excalibur.lab.eng.bne.redhat.com:8080/language/list



How reproducible: 100%


Steps to Reproduce:
1. Log in to excalibur
2. Try to add yourself to a language group
Comment 1 Ding-Yi Chen 2011-10-23 19:59:39 EDT
Hi,

Are your account under admin role?
If not, its a new policy that you need to wait for admin or language coordinators to add you.

See https://bugzilla.redhat.com/show_bug.cgi?id=742083
Comment 2 Sean Flanigan 2011-10-24 02:30:53 EDT
If I visit the Languages page without logging in, I get 

Please log in first
Please log in first
Please log in first

followed by a login form.  If I do log in, I get the exception Josh mentioned.

Whether I'm logged in or not, I should be able to view the list of languages.
Comment 3 Sean Flanigan 2011-10-24 02:33:58 EDT
NB: this doesn't happen in 1.4.2-SNAPSHOT, only in 1.5-SNAPSHOT.  This is the stack trace (when logged in):

javax.el.ELException: /language/home.xhtml: Exception executing predicate ZanataPermissions.Rule_TeamCoordinatorModifyLanguageTeamMembers_0Predicate1Invoker@84218477
	at com.sun.facelets.compiler.TextInstruction.write(TextInstruction.java:50)
	at com.sun.facelets.compiler.UIInstructions.encodeBegin(UIInstructions.java:39)
	at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:275)
	at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:258)
	at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:279)
	at org.richfaces.renderkit.AbstractRowsRenderer.encodeCellChildren(AbstractRowsRenderer.java:288)
	at org.richfaces.renderkit.AbstractTableRenderer.encodeOneRow(AbstractTableRenderer.java:391)
	at org.richfaces.renderkit.AbstractRowsRenderer.process(AbstractRowsRenderer.java:83)
	at org.ajax4jsf.model.SequenceDataModel.walk(SequenceDataModel.java:101)
	at org.ajax4jsf.component.UIDataAdaptorBase.walk(UIDataAdaptorBase.java:1156)
	at org.richfaces.renderkit.AbstractRowsRenderer.encodeRows(AbstractRowsRenderer.java:104)
	at org.richfaces.renderkit.AbstractRowsRenderer.encodeRows(AbstractRowsRenderer.java:88)
	at org.richfaces.renderkit.AbstractTableRenderer.encodeTBody(AbstractTableRenderer.java:90)
	at org.richfaces.renderkit.AbstractTableRenderer.encodeChildren(AbstractTableRenderer.java:97)
	at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:930)
	at javax.faces.render.Renderer.encodeChildren(Renderer.java:148)
	at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:930)
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
	at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
	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.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:638)
	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:444)
	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:382)
	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:310)
	at org.tuckey.web.filters.urlrewrite.NormalRewrittenUrl.doRewrite(NormalRewrittenUrl.java:195)
	at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:159)
	at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:141)
	at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:90)
	at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:406)
	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.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:73)
	at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
	at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206)
	at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
	at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
	at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
	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:60)
	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.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:235)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
	at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
	at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
	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:158)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
	at java.lang.Thread.run(Thread.java:662)
Caused by: org.drools.RuntimeDroolsException: Exception executing predicate ZanataPermissions.Rule_TeamCoordinatorModifyLanguageTeamMembers_0Predicate1Invoker@84218477
	at org.drools.rule.PredicateConstraint.isAllowedCachedRight(PredicateConstraint.java:318)
	at org.drools.common.SingleBetaConstraints.isAllowedCachedRight(SingleBetaConstraints.java:147)
	at org.drools.reteoo.JoinNode.assertObject(JoinNode.java:172)
	at org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:42)
	at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:185)
	at org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:146)
	at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:1046)
	at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:1001)
	at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:788)
	at org.jboss.seam.security.permission.RuleBasedPermissionResolver.hasPermission(RuleBasedPermissionResolver.java:105)
	at org.jboss.seam.security.permission.PermissionMapper.resolvePermission(PermissionMapper.java:80)
	at org.jboss.seam.security.Identity.hasPermission(Identity.java:632)
	at org.zanata.security.ZanataIdentity.hasPermission(ZanataIdentity.java:117)
	at org.jboss.seam.security.Identity.checkPermission(Identity.java:580)
	at org.jboss.seam.security.EntityPermissionChecker.checkEntityPermission(EntityPermissionChecker.java:115)
	at org.jboss.seam.security.EntitySecurityListener.postLoad(EntitySecurityListener.java:24)
	at org.zanata.security.SmartEntitySecurityListener.postLoad(SmartEntitySecurityListener.java:26)
	at sun.reflect.GeneratedMethodAccessor316.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.hibernate.ejb.event.ListenerCallback.invoke(ListenerCallback.java:31)
	at org.hibernate.ejb.event.EntityCallbackHandler.callback(EntityCallbackHandler.java:80)
	at org.hibernate.ejb.event.EntityCallbackHandler.postLoad(EntityCallbackHandler.java:73)
	at org.hibernate.ejb.event.EJB3PostLoadEventListener.onPostLoad(EJB3PostLoadEventListener.java:33)
	at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:221)
	at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:877)
	at org.hibernate.loader.Loader.doQuery(Loader.java:752)
	at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)
	at org.hibernate.loader.Loader.loadCollection(Loader.java:2019)
	at org.hibernate.loader.collection.CollectionLoader.initialize(CollectionLoader.java:59)
	at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:587)
	at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:83)
	at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1744)
	at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:366)
	at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:108)
	at org.hibernate.collection.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:131)
	at org.hibernate.collection.PersistentSet.size(PersistentSet.java:162)
	at org.jboss.seam.el.SeamELResolver.resolveInCollection(SeamELResolver.java:118)
	at org.jboss.seam.el.SeamELResolver.getValue(SeamELResolver.java:60)
	at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:54)
	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.ELText$ELTextVariable.writeText(ELText.java:184)
	at com.sun.facelets.el.ELText$ELTextComposite.writeText(ELText.java:108)
	at com.sun.facelets.compiler.TextInstruction.write(TextInstruction.java:45)
	... 73 more
Caused by: org.hibernate.LazyInitializationException: illegal access to loading collection
	at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:363)
	at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:108)
	at org.hibernate.collection.PersistentSet.iterator(PersistentSet.java:186)
	at org.zanata.model.HPerson.isCoordinator(HPerson.java:225)
	at ZanataPermissions.Rule_TeamCoordinatorModifyLanguageTeamMembers_0.predicate1(Rule_TeamCoordinatorModifyLanguageTeamMembers_0.java:15)
	at ZanataPermissions.Rule_TeamCoordinatorModifyLanguageTeamMembers_0Predicate1Invoker.evaluate(Rule_TeamCoordinatorModifyLanguageTeamMembers_0Predicate1Invoker.java:25)
	at org.drools.rule.PredicateConstraint.isAllowedCachedRight(PredicateConstraint.java:311)
	... 119 more
Comment 5 Ding-Yi Chen 2011-11-01 20:53:06 EDT
VERIFIED with Zanata version 1.5-SNAPSHOT (20111027-1415)

Note You need to log in before you can comment on or make changes to this bug.