ae3 Posted February 3, 2010 Share Posted February 3, 2010 I've tried to set up an example security xml for the supermart domain as described in the tutorials. It does only work if I use static values in the filter expression. If I try to use groovy expressions for dynamic filtering I get following exception:java.lang.ClassCastException: com.jaspersoft.commons.dataset.expr.GenericFunction at com.jaspersoft.commons.groovy.GroovyGenerator.outputList(GroovyGenerator.java:392) at com.jaspersoft.commons.groovy.GroovyGenerator.in(GroovyGenerator.java:334) at com.jaspersoft.commons.dataset.expr.ExpressionWalker.operator(ExpressionWalker.java:111) at com.jaspersoft.commons.groovy.GroovyGenerator.operator(GroovyGenerator.java:499) at com.jaspersoft.commons.dataset.expr.ExpressionWalker.walk(ExpressionWalker.java:50) at com.jaspersoft.commons.groovy.GroovyGenerator.getColumn(GroovyGenerator.java:110) at com.jaspersoft.commons.datarator.WorkingDataSet.getGroovyColumn(WorkingDataSet.java:166) at com.jaspersoft.commons.datarator.WorkingDataSet.applyFilterSortMax(WorkingDataSet.java:317) at com.jaspersoft.commons.datarator.WorkingDataSet.getIterator(WorkingDataSet.java:254) at com.jaspersoft.commons.datarator.jr.DataratorJRDataSource.<init>(DataratorJRDataSource.java:20)The principalExpression works:2010-02-03 09:37:45,506 DEBUG SemanticLayerSecurityResolverImpl,http-8888-6:521 - Evaluating JoinTree_1_List for resourceId: JoinTree_12010-02-03 09:37:45,553 DEBUG SemanticLayerSecurityResolverImpl,http-8888-6:528 - Evaluating authentication.getPrincipal().getAttributes().any{ it.getAttrName() in ['StoreNr'] }. got: true2010-02-03 09:37:45,553 DEBUG SemanticLayerSecurityResolverImpl,http-8888-6:534 - For new Created base grant list for : JoinTree_1_List - JoinTree_12010-02-03 09:37:45,553 DEBUG SemanticLayerSecurityResolverImpl,http-8888-6:536 - Adding grant: Jointree_1_row_access_grant_12010-02-03 09:37:45,553 DEBUG SemanticLayerSecurityResolverImpl,http-8888-6:542 - Setting grants for resourceId: JoinTree_1Below is a snippet of the security xml file. Code: Any suggestions to solve this problem? Do I anything wrong or is it a bug?Thanks,Andreas Post Edited by ae3 at 02/03/2010 08:43 Link to comment Share on other sites More sharing options...
paris11 Posted February 17, 2010 Share Posted February 17, 2010 We have exactly the same problem, it works with static filter but it doesn't work when we use groovy language.With JS3.5, there was no problem. Do you resolve this problem since you have opened this case? thanks Link to comment Share on other sites More sharing options...
ae3 Posted February 17, 2010 Author Share Posted February 17, 2010 Not yet. I've opened a support case and it's still in process. Link to comment Share on other sites More sharing options...
paris11 Posted February 17, 2010 Share Posted February 17, 2010 When I start JAsper Server, I can read this message in the tomcat window"2010-02-17 14:21:36,327 WARN PermissionsListProtectionDomainProvider,main:61 -A security manager has not been configured for the JVM. The protection domain set for the reports will NOT be effective." Do you think there is a relationship with our problem? Link to comment Share on other sites More sharing options...
bobtins Posted February 18, 2010 Share Posted February 18, 2010 This is a bug that I fixed in 3.7.0.1 which should be coming out soon.In the meantime, there is a workaround. Here is the summary of what's going on:We’re doing security filters in memory by default now, which is a change from3.5. That has some implications for security filters using the "groovy()"function because it doesn’t work the same way when you use it for anin-memory filter.The quick workaround is to do security filters in the query and everythingshould work like it did in 3.5. To do that:- Look for this line in WEB-INF/applicationContext-adhoc.xml in your webapp: <property name="applySecurityFilterInMemory" value="true"/>- Change "true" to "false"- Restart the webapp[/code] Link to comment Share on other sites More sharing options...
bobtins Posted February 18, 2010 Share Posted February 18, 2010 Oh yeah, and don't worry about the security manager message on startup. That has nothing to do with the problem :) Link to comment Share on other sites More sharing options...
mileidysg Posted April 16, 2010 Share Posted April 16, 2010 Where I can find a similar solution for JasperServer Community Edition? WARN PermissionsListProtectionDomainProvider,main:61 -A security manager has not been configured for the JVM. The protection domain set for the reports will NOT be effective." Thanks, Post Edited by mileidysg at 04/16/2010 17:18 Link to comment Share on other sites More sharing options...
mdahlman Posted April 16, 2010 Share Posted April 16, 2010 mileidysg,Please start a separate thread for this. That error is a Tomcat configuration issue. It's unrelated to JasperServer Data Domains, so it's not relevant on this thread.Also please indicate any problems that you are encountering due to this warning.Regards,Matt Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now