-
Type: Bug
-
Status: Closed (View Workflow)
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 0.20 Larks
-
Fix Version/s: 0.20 Larks
-
Labels:None
Steps to reproduce:
- Create a clean database
- Start JCommune so that tables are created, don't do anything else
- Start Poulpe on the same DB, log in as admin/admin
- Create component, section and a branch
- Stop Poulpe
- Start JCommune again and go onto main page
- AR: you'll see an exception
- ER: weeeell.. we don't expect this exception to happen
@Develoers: this happens because JCommune expects some Sids already be present in the tables (it's probably created while user registration), the logic in our ACL utils is that if it can't find OID or SID (don't quite remember), it will create one which causes an INSERT statement to be created. Write mode is not supported by our architecture if it doesn't happen through transactional level of services. Thus all the tags (this happens in other circumstances for some other pages where hasPermission tag is used) should also go through Service Layer to execute their operations.
Here is the exception itself:
org.apache.jasper.JasperException: An exception occurred processing JSP page /WEB-INF/jsp/sectionList.jsp at line 64 61: 62: <%-- Topics table --%> 63: <c:forEach var="section" items="${sectionList}"> 64: <jtalks:isSectionVisible section="${section}"> 65: 66: <table id="topics-table" cellpadding="0" cellspacing="0" border="0" 67: class="table table-striped table-bordered"> ====================================================================== java.lang.IllegalArgumentException: Transaction must be running org.springframework.util.Assert.isTrue(Assert.java:65) org.springframework.security.acls.jdbc.JdbcMutableAclService.createOrRetrieveSidPrimaryKey(JdbcMutableAclService.java:208) org.springframework.security.acls.jdbc.JdbcMutableAclService.createObjectIdentity(JdbcMutableAclService.java:150) org.springframework.security.acls.jdbc.JdbcMutableAclService.createAcl(JdbcMutableAclService.java:105) org.jtalks.common.security.acl.AclUtil.getAclFor(AclUtil.java:74) org.jtalks.jcommune.service.security.AclGroupPermissionEvaluator.hasPermission(AclGroupPermissionEvaluator.java:97) org.jtalks.jcommune.web.tags.HasPermission.doStartTag(HasPermission.java:91) org.apache.jsp.tag.web.isSectionVisible_tag._jspx_meth_jtalks_005fhasPermission_005f0(isSectionVisible_tag.java:194) org.apache.jsp.tag.web.isSectionVisible_tag._jspx_meth_c_005fforEach_005f0(isSectionVisible_tag.java:159) org.apache.jsp.tag.web.isSectionVisible_tag.doTag(isSectionVisible_tag.java:97)
- is duplicated by
-
JC-995 Error 500 occurs when new registered user clicking on Messages link.
- Closed