Hi all.

I have a project that uses isis-addons-security.

So it installs the TenantedAuthorizationFacetDefault

Which is invoked when using wrapped calls in order to evaluate if that action 
is allowed or hidden.


That said, I have a test with the following code:

        // given
        ...
        final Trait trait = 
this.wrap(this.traits).createTrait("outcome_higherLimitIncluded");
        this.wrap(trait).upsertScoringRange(-1000, -40, "Bad Result");

Please, notice that the first invocation is wrapped, and it has properly passed.
When the test executes the second invocation, it will fail with a 
HiddenException, telling that the user has not bee found.

But the inner problem is that the ServiceInstantiator is returning “null” when 
invoking the “execute” method.
See the stack trace right there, when the execution has been paused on 
ServiceInstantiator, line 225.

Please am I missing something? It has started to happen today …

Thanks!

Thread [main] (Suspended)       
        
org.apache.isis.core.runtime.services.ServiceInstantiator$2.invoke(java.lang.Object,
 java.lang.reflect.Method, java.lang.reflect.Method, java.lang.Object[]) line: 
225  
        
org.apache.isis.applib.services.queryresultscache.QueryResultsCache_$$_jvstd14_3.execute(java.util.concurrent.Callable,
 java.lang.Class, java.lang.String, java.lang.Object...) line: not available    
 
        
org.isisaddons.module.security.facets.TenantedAuthorizationFacetDefault.findApplicationUser(java.lang.String)
 line: 158 
        
org.isisaddons.module.security.facets.TenantedAuthorizationFacetDefault.pathsFor(org.apache.isis.core.metamodel.interactions.InteractionContext<?>)
 line: 114   
        
org.isisaddons.module.security.facets.TenantedAuthorizationFacetDefault.hides(org.apache.isis.core.metamodel.interactions.VisibilityContext<?
 extends org.apache.isis.applib.events.VisibilityEvent>) line: 71  
        
org.apache.isis.core.metamodel.interactions.InteractionUtils.isVisibleResult(org.apache.isis.core.metamodel.facetapi.FacetHolder,
 org.apache.isis.core.metamodel.interactions.VisibilityContext<?>) line: 40    
        
org.apache.isis.core.metamodel.specloader.specimpl.ObjectActionImpl(org.apache.isis.core.metamodel.specloader.specimpl.ObjectMemberAbstract).isVisibleResult(org.apache.isis.core.commons.authentication.AuthenticationSession,
 org.apache.isis.core.metamodel.adapter.ObjectAdapter, 
org.apache.isis.applib.annotation.Where) line: 238        
        
org.apache.isis.core.metamodel.specloader.specimpl.ObjectActionImpl(org.apache.isis.core.metamodel.specloader.specimpl.ObjectMemberAbstract).isVisible(org.apache.isis.core.commons.authentication.AuthenticationSession,
 org.apache.isis.core.metamodel.adapter.ObjectAdapter, 
org.apache.isis.applib.annotation.Where) line: 233      
        
org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.checkVisibility(org.apache.isis.core.metamodel.adapter.ObjectAdapter,
 org.apache.isis.core.metamodel.spec.feature.ObjectMember) line: 680   
        
org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.handleActionMethod(org.apache.isis.core.metamodel.adapter.ObjectAdapter,
 java.lang.Object[], org.apache.isis.core.metamodel.spec.feature.ObjectAction, 
org.apache.isis.core.metamodel.specloader.specimpl.ContributeeMember) line: 607 
     
        
org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.invoke(java.lang.Object,
 java.lang.reflect.Method, java.lang.Object[]) line: 263    
        
org.apache.isis.core.wrapper.proxy.ProxyInstantiatorForJavassist$1.invoke(java.lang.Object,
 java.lang.reflect.Method, java.lang.reflect.Method, java.lang.Object[]) line: 
72    
        
com.tellmegen.domain.model.traits.Trait_$$_jvstd14_7.upsertScoringRange(java.lang.Integer,
 java.lang.Integer, java.lang.String) line: not available     
        
com.tellmegen.integtests.domain.model.algorithms.traits.TraitLogicalAlgorithmImplementationTests.outcome_higherLimitIncluded()
 line: 127        
        sun.reflect.NativeMethodAccessorImpl.invoke0(java.lang.reflect.Method, 
java.lang.Object, java.lang.Object[]) line: not available [native method]       
 
        sun.reflect.NativeMethodAccessorImpl.invoke(java.lang.Object, 
java.lang.Object[]) line: 57      
        sun.reflect.DelegatingMethodAccessorImpl.invoke(java.lang.Object, 
java.lang.Object[]) line: 43  
        java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object...) 
line: 606        
        org.junit.runners.model.FrameworkMethod$1.runReflectiveCall() line: 50  
        
org.junit.runners.model.FrameworkMethod$1(org.junit.internal.runners.model.ReflectiveCallable).run()
 line: 12   
        
org.junit.runners.model.FrameworkMethod.invokeExplosively(java.lang.Object, 
java.lang.Object...) line: 47       
        org.junit.internal.runners.statements.InvokeMethod.evaluate() line: 17  
        org.junit.internal.runners.statements.RunBefores.evaluate() line: 26    
        
org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2$1.evaluate() 
line: 146  
        
org.apache.isis.core.integtestsupport.ExceptionRecognizerTranslate$TranslationStatement.evaluate()
 line: 32     
        
org.apache.isis.core.integtestsupport.IntegrationTestAbstract$IsisTransactionRule$1.evaluate()
 line: 214        
        org.junit.rules.ExpectedException$ExpectedExceptionStatement.evaluate() 
line: 239       
        org.junit.rules.RunRules.evaluate() line: 20    
        
org.junit.runners.BlockJUnit4ClassRunner(org.junit.runners.ParentRunner).runLeaf(org.junit.runners.model.Statement,
 org.junit.runner.Description, org.junit.runner.notification.RunNotifier) line: 
325  
        
org.junit.runners.BlockJUnit4ClassRunner.runChild(org.junit.runners.model.FrameworkMethod,
 org.junit.runner.notification.RunNotifier) line: 78  
        org.junit.runners.BlockJUnit4ClassRunner.runChild(java.lang.Object, 
org.junit.runner.notification.RunNotifier) line: 57 
        org.junit.runners.ParentRunner$3.run() line: 290        
        org.junit.runners.ParentRunner$1.schedule(java.lang.Runnable) line: 71  
        
org.junit.runners.BlockJUnit4ClassRunner(org.junit.runners.ParentRunner).runChildren(org.junit.runner.notification.RunNotifier)
 line: 288       
        
org.junit.runners.ParentRunner.access$000(org.junit.runners.ParentRunner, 
org.junit.runner.notification.RunNotifier) line: 58   
        org.junit.runners.ParentRunner$2.evaluate() line: 268   
        org.junit.internal.runners.statements.RunBefores.evaluate() line: 26    
        
org.junit.runners.BlockJUnit4ClassRunner(org.junit.runners.ParentRunner).run(org.junit.runner.notification.RunNotifier)
 line: 363       
        
org.eclipse.jdt.internal.junit4.runner.JUnit4TestMethodReference(org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference).run(org.eclipse.jdt.internal.junit.runner.TestExecution)
 line: 50  
        
org.eclipse.jdt.internal.junit.runner.TestExecution.run(org.eclipse.jdt.internal.junit.runner.ITestReference[])
 line: 38        
        
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(java.lang.String[],
 java.lang.String, org.eclipse.jdt.internal.junit.runner.TestExecution) line: 
467    
        
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(org.eclipse.jdt.internal.junit.runner.TestExecution)
 line: 683  
        org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run() line: 390  
        
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(java.lang.String[]) 
line: 197       


Reply via email to