Jump to content
We've recently updated our Privacy Statement, available here ×

JS3.7 Domain Security ClassCastExc:GenericFunction


ae3

Recommended Posts

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_1

Below 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

  • 2 weeks later...
  • Replies 7
  • Created
  • Last Reply

Top Posters In This Topic

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 se
t for the reports will NOT be effective."

 

Do you think  there is a relationship with our problem?

Link to comment
Share on other sites

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

  • 1 month later...

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 se

t 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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...