You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Ingo <wo...@gmail.com> on 2015/12/08 10:02:08 UTC

[cxf-fediz] internal server (realm-b) error 500 in running simpleWebapp example

Dear list,
I am facing problems in running the simpleWebapp example from fediz with the
following setup:
Tomcat8 instance 1:
  https://localhost:9443/fediz-idp/
  https://localhost:9443/fediz-idp-sts/
Tomcat8 instance 2:
  https://localhost:8443/fedizhelloworld/
Tomcat8 instance 3
  https://localhost:12443/fediz-idp-remote/

Login to IDP realm-A works fine. However, when I try to login with IDP
reaml-B I get the following error at Tomcat8 instance3:



It looks like this is a problem with the HSQL-DB content, but I have no clue
what could be the cause. Is this a known problem?

kind regards, Ingo



--
View this message in context: http://cxf.547215.n5.nabble.com/cxf-fediz-internal-server-realm-b-error-500-in-running-simpleWebapp-example-tp5763690.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: AW: [cxf-fediz] internal server (realm-b) error 500 in running simpleWebapp example

Posted by Ingo <wo...@gmail.com>.
Hi Sergey,
you proposal sounds reasonable to me from an architecture point of view.
However I also like the approach of fediz to provide the "end-to-end" setup
opportunity (with all relevant entities) within one project. This is very
valuable when getting to learn ws-federation by example.
best regards, Ingo 



--
View this message in context: http://cxf.547215.n5.nabble.com/cxf-fediz-internal-server-realm-b-error-500-in-running-simpleWebapp-example-tp5763690p5763811.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: AW: [cxf-fediz] internal server (realm-b) error 500 in running simpleWebapp example

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi All

It might be interesting to consider migrating Fediz IDP to CXF, while 
still keeping its Spring MVC and Security 'decoration' if preferred and 
delegating to the servlet container to manage the sessions.

If one uses a CXF RP endpoint which can be deployed to any servlet 
container then having to worry about the servlet container portability 
of IDP seems like an unnecessary problem :-).

On the other hand if no CXF RP is used then having a Fediz IDP being CXF 
based won't affect such users.

Now if a user actually does have a CXF RP endpoint then, once a Fediz 
CXF plugin gets tuned a bit more, we have a complete servlet container 
portability.

So non-CXF users won't be affected while CXF users will continue 
benefiting from a CXF's ability to run in all of servlet containers.

Cheers, Sergey

On 08/12/15 13:35, Jan Bernhardt wrote:
> Hi Ingo,
>
> as far as I know Tomcat8 is not yet supported/working. There is some work on the way within next two month to get it working.
>
> I would suggest to use Tomcat7 in the meantime. Tomcat7 works like a charm.
>
> Kind regards
> Jan
>


Re: AW: [cxf-fediz] internal server (realm-b) error 500 in running simpleWebapp example

Posted by Ingo <wo...@gmail.com>.
Dear Colm,
sorry for the delayed response, but I was occupied with other work...
I created a JIRA issue  https://issues.apache.org/jira/browse/FEDIZ-154
<https://issues.apache.org/jira/browse/FEDIZ-154>   and attached my patch to
it.

Actually I preferred to modify two files security-config.xml and
realm.properties in order to set the 'realm-uri' in the FederationEntryPoint
according to the maven profile chosen (realm-a;realm-b). That way it is more
easy in case one wants to add another realm. There are now changes to the
readme.

best regards,
Ingo



--
View this message in context: http://cxf.547215.n5.nabble.com/cxf-fediz-internal-server-realm-b-error-500-in-running-simpleWebapp-example-tp5763690p5766064.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: AW: [cxf-fediz] internal server (realm-b) error 500 in running simpleWebapp example

Posted by Colm O hEigeartaigh <co...@apache.org>.
Could you submit a pull request / patch with this readme change?

Colm.

On Thu, Jan 7, 2016 at 12:41 PM, Ingo <wo...@gmail.com> wrote:

> Dear Colm,thank you for clarification! Indeed that was the missing piece of
> the configuration puzzle.I suppose adding that to the readme.txt of the
> simpleWebapp example would be quite helpful for fediz users.Thanx again and
> a happy new year to the Talend Community Coders team!best regards, Ingo
>
>
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/cxf-fediz-internal-server-realm-b-error-500-in-running-simpleWebapp-example-tp5763690p5764478.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>



-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com

Re: AW: [cxf-fediz] internal server (realm-b) error 500 in running simpleWebapp example

Posted by Ingo <wo...@gmail.com>.
Dear Colm,thank you for clarification! Indeed that was the missing piece of
the configuration puzzle.I suppose adding that to the readme.txt of the
simpleWebapp example would be quite helpful for fediz users.Thanx again and
a happy new year to the Talend Community Coders team!best regards, Ingo



--
View this message in context: http://cxf.547215.n5.nabble.com/cxf-fediz-internal-server-realm-b-error-500-in-running-simpleWebapp-example-tp5763690p5764478.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: AW: [cxf-fediz] internal server (realm-b) error 500 in running simpleWebapp example

Posted by Colm O hEigeartaigh <co...@apache.org>.
Hi Ingo,

I was able to reproduce the error you ran into. To fix it, you need to
modify the security-config.xml in your remote IdP, and change the realm
(from "A" -> "B") for the FederationEntryPoint. It should look something
like:

<bean id="federationEntryPoint"
class="org.apache.cxf.fediz.service.idp.FederationEntryPoint">
        <property name="realm" value="urn:org:apache:cxf:fediz:idp:realm-B"
/>
        <property name="configService" ref="config" />
</bean>

With this change it should work fine.

Colm.

On Fri, Dec 11, 2015 at 8:17 AM, Ingo <wo...@gmail.com> wrote:

> Dear Jan,
> thank you for your quick response. I modified my setup to use exactly what
> is documented on the cxf-fediz website (JDK1.7, tomcat7) for my 3 localhost
> tomcat7 instances and checked out the source tree tagged 'fediz-1.2.1',
> build with maven cmd etc. The build ran with success, but the idp realm-b
> unit tests reported 2 errors.
> However, I got the same error at realm-b (see) below and unfortunately
> cannot confirm that it worked like a charm . Can you point me to a version
> that is running the simpleWebapp example 'like a charm'? Am I missing sth.
> in the security config?
> Best regards, Ingo
>
> 2015-12-10 17:29:57,319 [http-nio-12443-exec-3] DEBUG
> org.springframework.security.web.access.ExceptionTranslationFilter  -
> Access
> is denied (user is anonymous); redirecting to authentication entry point
> org.springframework.security.access.AccessDeniedException: Access is denied
>         at
>
> org.springframework.security.access.vote.AffirmativeBased.decide(AffirmativeBased.java:83)
>         at
>
> org.springframework.webflow.security.SecurityFlowExecutionListener.decide(SecurityFlowExecutionListener.java:97)
>         at
>
> org.springframework.webflow.security.SecurityFlowExecutionListener.stateEntering(SecurityFlowExecutionListener.java:75)
>         at
>
> org.springframework.webflow.engine.impl.FlowExecutionListeners.fireStateEntering(FlowExecutionListeners.java:144)
>         at
>
> org.springframework.webflow.engine.impl.FlowExecutionImpl.setCurrentState(FlowExecutionImpl.java:371)
>         at
>
> org.springframework.webflow.engine.impl.RequestControlContextImpl.setCurrentState(RequestControlContextImpl.java:189)
>         at org.springframework.webflow.engine.State.enter(State.java:191)
>         at
> org.springframework.webflow.engine.Transition.execute(Transition.java:227)
>         at
>
> org.springframework.webflow.engine.DecisionState.doEnter(DecisionState.java:51)
>         at org.springframework.webflow.engine.State.enter(State.java:194)
>         at
> org.springframework.webflow.engine.Transition.execute(Transition.java:227)
>         at
>
> org.springframework.webflow.engine.DecisionState.doEnter(DecisionState.java:51)
>         at org.springframework.webflow.engine.State.enter(State.java:194)
>         at
> org.springframework.webflow.engine.Transition.execute(Transition.java:227)
>         at
>
> org.springframework.webflow.engine.DecisionState.doEnter(DecisionState.java:51)
>         at org.springframework.webflow.engine.State.enter(State.java:194)
>         at
> org.springframework.webflow.engine.Transition.execute(Transition.java:227)
>         at
>
> org.springframework.webflow.engine.DecisionState.doEnter(DecisionState.java:51)
>         at org.springframework.webflow.engine.State.enter(State.java:194)
>         at
> org.springframework.webflow.engine.Transition.execute(Transition.java:227)
>         at
>
> org.springframework.webflow.engine.impl.FlowExecutionImpl.execute(FlowExecutionImpl.java:393)
>         at
>
> org.springframework.webflow.engine.impl.RequestControlContextImpl.execute(RequestControlContextImpl.java:214)
>         at
>
> org.springframework.webflow.engine.TransitionableState.handleEvent(TransitionableState.java:119)
>         at
> org.springframework.webflow.engine.Flow.handleEvent(Flow.java:555)
>         at
>
> org.springframework.webflow.engine.impl.FlowExecutionImpl.handleEvent(FlowExecutionImpl.java:388)
>         at
>
> org.springframework.webflow.engine.impl.RequestControlContextImpl.handleEvent(RequestControlContextImpl.java:210)
>         at
>
> org.springframework.webflow.engine.ActionState.doEnter(ActionState.java:105)
>         at org.springframework.webflow.engine.State.enter(State.java:194)
>         at
> org.springframework.webflow.engine.Transition.execute(Transition.java:227)
>         at
>
> org.springframework.webflow.engine.DecisionState.doEnter(DecisionState.java:51)
>         at org.springframework.webflow.engine.State.enter(State.java:194)
>         at
> org.springframework.webflow.engine.Transition.execute(Transition.java:227)
>         at
>
> org.springframework.webflow.engine.DecisionState.doEnter(DecisionState.java:51)
>         at org.springframework.webflow.engine.State.enter(State.java:194)
>         at
> org.springframework.webflow.engine.Transition.execute(Transition.java:227)
>         at
>
> org.springframework.webflow.engine.DecisionState.doEnter(DecisionState.java:51)
>         at org.springframework.webflow.engine.State.enter(State.java:194)
>         at org.springframework.webflow.engine.Flow.start(Flow.java:535)
>         at
>
> org.springframework.webflow.engine.impl.FlowExecutionImpl.start(FlowExecutionImpl.java:366)
>         at
>
> org.springframework.webflow.engine.impl.RequestControlContextImpl.start(RequestControlContextImpl.java:234)
>         at
>
> org.springframework.webflow.engine.SubflowState.doEnter(SubflowState.java:101)
>         at org.springframework.webflow.engine.State.enter(State.java:194)
>         at
> org.springframework.webflow.engine.Transition.execute(Transition.java:227)
>         at
>
> org.springframework.webflow.engine.DecisionState.doEnter(DecisionState.java:51)
>         at org.springframework.webflow.engine.State.enter(State.java:194)
>         at
> org.springframework.webflow.engine.Transition.execute(Transition.java:227)
>         at
>
> org.springframework.webflow.engine.DecisionState.doEnter(DecisionState.java:51)
>         at org.springframework.webflow.engine.State.enter(State.java:194)
>         at org.springframework.webflow.engine.Flow.start(Flow.java:535)
>         at
>
> org.springframework.webflow.engine.impl.FlowExecutionImpl.start(FlowExecutionImpl.java:366)
>         at
>
> org.springframework.webflow.engine.impl.FlowExecutionImpl.start(FlowExecutionImpl.java:222)
>         at
>
> org.springframework.webflow.executor.FlowExecutorImpl.launchExecution(FlowExecutorImpl.java:140)
>         at
>
> org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.handle(FlowHandlerAdapter.java:193)
>         at
>
> org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)
>         at
>
> org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
>         at
>
> org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936)
>         at
>
> org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:827)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
>         at
>
> org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
>         at
>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
>         at
>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
>         at
> org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
>         at
>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
>         at
>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
>         at
>
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
>         at
>
> org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)
>         at
>
> org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)
>         at
>
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>         at
>
> org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
>         at
>
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>         at
>
> org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103)
>         at
>
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>         at
>
> org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
>         at
>
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>         at
>
> org.apache.cxf.fediz.service.idp.service.security.GrantedAuthorityEntitlements.doFilter(GrantedAuthorityEntitlements.java:61)
>         at
>
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>         at
>
> org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
>         at
>
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>         at
>
> org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
>         at
>
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>         at
>
> org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
>         at
>
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>         at
>
> org.apache.cxf.fediz.service.idp.STSPortFilter.doFilter(STSPortFilter.java:74)
>         at
>
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>         at
>
> org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
>         at
>
> org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
>         at
>
> org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)
>         at
>
> org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)
>         at
>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
>         at
>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
>         at
>
> org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
>         at
>
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
>         at
>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
>         at
>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
>         at
>
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
>         at
>
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
>         at
>
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
>         at
>
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
>         at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
>         at
>
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
>         at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
>         at
>
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
>         at
>
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
>         at
>
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1757)
>         at
>
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1716)
>         at
>
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>         at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>         at
>
> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
>         at java.lang.Thread.run(Thread.java:745)
> 2015-12-10 17:29:57,324 [http-nio-12443-exec-3] DEBUG
> org.springframework.security.web.savedrequest.HttpSessionRequestCache  -
> DefaultSavedRequest added to Session:
> DefaultSavedRequest[
> https://localhost:12443/fediz-idp-remote/federation?wa=wsignin1.0&wtrealm=urn%3Aorg%3Aapache%3Acxf%3Afediz%3Aidp%3Arealm-A&wreply=https%3A%2F%2Flocalhost%3A9443%2Ffediz-idp%2Ffederation&wctx=246d00a1-d306-493f-9af9-3210080b6b57
> ]
> 2015-12-10 17:29:57,324 [http-nio-12443-exec-3] DEBUG
> org.springframework.security.web.access.ExceptionTranslationFilter  -
> Calling Authentication entry point.
> 2015-12-10 17:29:57,324 [http-nio-12443-exec-3] DEBUG
>
> org.springframework.security.access.prepost.PrePostAnnotationSecurityMetadataSource
> -
>
> @org.springframework.security.access.prepost.PreAuthorize(value=hasRole('IDP_READ'))
> found on specific method: public
> org.apache.cxf.fediz.service.idp.domain.Idp
>
> org.apache.cxf.fediz.service.idp.rest.IdpServiceImpl.getIdp(java.lang.String,java.util.List)
> 2015-12-10 17:29:57,324 [http-nio-12443-exec-3] DEBUG
>
> org.springframework.security.access.method.DelegatingMethodSecurityMetadataSource
> - Caching method
> [CacheKey[org.apache.cxf.fediz.service.idp.rest.IdpServiceImpl; public
> abstract org.apache.cxf.fediz.service.idp.domain.Idp
>
> org.apache.cxf.fediz.service.idp.rest.IdpService.getIdp(java.lang.String,java.util.List)]]
> with attributes [[authorize: 'hasRole('IDP_READ')', filter: 'null',
> filterTarget: 'null']]
> 2015-12-10 17:29:57,324 [http-nio-12443-exec-3] DEBUG
>
> org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor
> - Secure object: ReflectiveMethodInvocation: public abstract
> org.apache.cxf.fediz.service.idp.domain.Idp
>
> org.apache.cxf.fediz.service.idp.rest.IdpService.getIdp(java.lang.String,java.util.List);
> target is of class [org.apache.cxf.fediz.service.idp.rest.IdpServiceImpl];
> Attributes: [[authorize: 'hasRole('IDP_READ')', filter: 'null',
> filterTarget: 'null']]
> 2015-12-10 17:29:57,324 [http-nio-12443-exec-3] DEBUG
>
> org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor
> - Previously Authenticated:
>
> org.springframework.security.authentication.UsernamePasswordAuthenticationToken@ffffbf99
> :
> Principal: IDP_TEST; Credentials: [PROTECTED]; Authenticated: true;
> Details:
> null; Granted Authorities: IDP_READ
> 2015-12-10 17:29:57,324 [http-nio-12443-exec-3] DEBUG
> org.springframework.security.access.vote.AffirmativeBased  - Voter:
>
> org.springframework.security.access.prepost.PreInvocationAuthorizationAdviceVoter@42abbd9e
> ,
> returned: 1
> 2015-12-10 17:29:57,324 [http-nio-12443-exec-3] DEBUG
>
> org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor
> - Authorization successful
> 2015-12-10 17:29:57,324 [http-nio-12443-exec-3] DEBUG
>
> org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor
> - RunAsManager did not change Authentication object
> 2015-12-10 17:29:57,335 [http-nio-12443-exec-3] INFO
> org.apache.cxf.fediz.service.idp.service.jpa.ConfigServiceJPA  - Old Spring
> security context restored
> 2015-12-10 17:29:57,336 [http-nio-12443-exec-3] ERROR
>
> org.apache.cxf.fediz.service.idp.service.security.GrantedAuthorityEntitlements
> - Failed to enrich security context with entitlements
> org.springframework.dao.EmptyResultDataAccessException: Query "select i
> from
> IDP i where i.realm=:realm" selected no result, but expected unique
> result.;
> nested exception is javax.persistence.NoResultException: Query "select i
> from IDP i where i.realm=:realm" selected no result, but expected unique
> result.
>         at
>
> org.springframework.orm.jpa.EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(EntityManagerFactoryUtils.java:304)
>         at
>
> org.springframework.orm.jpa.DefaultJpaDialect.translateExceptionIfPossible(DefaultJpaDialect.java:121)
>         at
>
> org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.translateExceptionIfPossible(AbstractEntityManagerFactoryBean.java:403)
>         at
>
> org.springframework.dao.support.ChainedPersistenceExceptionTranslator.translateExceptionIfPossible(ChainedPersistenceExceptionTranslator.java:58)
>         at
>
> org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:213)
>         at
>
> org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:163)
>         at
>
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
>         at
>
> org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96)
>         at
>
> org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260)
>         at
>
> org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94)
>         at
>
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
>         at
>
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
>         at com.sun.proxy.$Proxy30.getIdp(Unknown Source)
>         at
>
> org.apache.cxf.fediz.service.idp.rest.IdpServiceImpl.getIdp(IdpServiceImpl.java:76)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:606)
>         at
>
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
>         at
>
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
>         at
>
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
>         at
>
> org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:64)
>         at
>
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
>         at
>
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
>         at com.sun.proxy.$Proxy42.getIdp(Unknown Source)
>         at
>
> org.apache.cxf.fediz.service.idp.service.jpa.ConfigServiceJPA.getIDP(ConfigServiceJPA.java:67)
>         at
>
> org.apache.cxf.fediz.service.idp.FederationEntryPoint.commence(FederationEntryPoint.java:87)
>         at
>
> org.springframework.security.web.access.ExceptionTranslationFilter.sendStartAuthentication(ExceptionTranslationFilter.java:186)
>         at
>
> org.springframework.security.web.access.ExceptionTranslationFilter.handleSpringSecurityException(ExceptionTranslationFilter.java:168)
>         at
>
> org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:131)
>         at
>
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>         at
>
> org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103)
>         at
>
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>         at
>
> org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
>         at
>
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>         at
>
> org.apache.cxf.fediz.service.idp.service.security.GrantedAuthorityEntitlements.doFilter(GrantedAuthorityEntitlements.java:61)
>         at
>
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>         at
>
> org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
>         at
>
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>         at
>
> org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
>         at
>
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>         at
>
> org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
>         at
>
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>         at
>
> org.apache.cxf.fediz.service.idp.STSPortFilter.doFilter(STSPortFilter.java:74)
>         at
>
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
>         at
>
> org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
>         at
>
> org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
>         at
>
> org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)
>         at
>
> org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)
>         at
>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
>         at
>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
>         at
>
> org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
>         at
>
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
>         at
>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
>         at
>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
>         at
>
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
>         at
>
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
>         at
>
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
>         at
>
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
>         at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
>         at
>
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
>         at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
>         at
>
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
>         at
>
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
>         at
>
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1757)
>         at
>
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1716)
>         at
>
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>         at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>         at
>
> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
>         at java.lang.Thread.run(Thread.java:745)
> Caused by: javax.persistence.NoResultException: Query "select i from IDP i
> where i.realm=:realm" selected no result, but expected unique result.
>         at
>
> org.apache.openjpa.persistence.QueryImpl.getSingleResult(QueryImpl.java:321)
>         at
>
> org.apache.cxf.fediz.service.idp.service.jpa.IdpDAOJPAImpl.getIdp(IdpDAOJPAImpl.java:86)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:606)
>         at
>
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
>         at
>
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
>         at
>
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
>         at
>
> org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:155)
>         ... 64 more
>
>
>
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/cxf-fediz-internal-server-realm-b-error-500-in-running-simpleWebapp-example-tp5763690p5763810.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>



-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com

Re: AW: [cxf-fediz] internal server (realm-b) error 500 in running simpleWebapp example

Posted by Ingo <wo...@gmail.com>.
Dear Jan,
thank you for your quick response. I modified my setup to use exactly what
is documented on the cxf-fediz website (JDK1.7, tomcat7) for my 3 localhost
tomcat7 instances and checked out the source tree tagged 'fediz-1.2.1',
build with maven cmd etc. The build ran with success, but the idp realm-b
unit tests reported 2 errors.
However, I got the same error at realm-b (see) below and unfortunately
cannot confirm that it worked like a charm . Can you point me to a version
that is running the simpleWebapp example 'like a charm'? Am I missing sth.
in the security config?
Best regards, Ingo
 
2015-12-10 17:29:57,319 [http-nio-12443-exec-3] DEBUG
org.springframework.security.web.access.ExceptionTranslationFilter  - Access
is denied (user is anonymous); redirecting to authentication entry point
org.springframework.security.access.AccessDeniedException: Access is denied
	at
org.springframework.security.access.vote.AffirmativeBased.decide(AffirmativeBased.java:83)
	at
org.springframework.webflow.security.SecurityFlowExecutionListener.decide(SecurityFlowExecutionListener.java:97)
	at
org.springframework.webflow.security.SecurityFlowExecutionListener.stateEntering(SecurityFlowExecutionListener.java:75)
	at
org.springframework.webflow.engine.impl.FlowExecutionListeners.fireStateEntering(FlowExecutionListeners.java:144)
	at
org.springframework.webflow.engine.impl.FlowExecutionImpl.setCurrentState(FlowExecutionImpl.java:371)
	at
org.springframework.webflow.engine.impl.RequestControlContextImpl.setCurrentState(RequestControlContextImpl.java:189)
	at org.springframework.webflow.engine.State.enter(State.java:191)
	at
org.springframework.webflow.engine.Transition.execute(Transition.java:227)
	at
org.springframework.webflow.engine.DecisionState.doEnter(DecisionState.java:51)
	at org.springframework.webflow.engine.State.enter(State.java:194)
	at
org.springframework.webflow.engine.Transition.execute(Transition.java:227)
	at
org.springframework.webflow.engine.DecisionState.doEnter(DecisionState.java:51)
	at org.springframework.webflow.engine.State.enter(State.java:194)
	at
org.springframework.webflow.engine.Transition.execute(Transition.java:227)
	at
org.springframework.webflow.engine.DecisionState.doEnter(DecisionState.java:51)
	at org.springframework.webflow.engine.State.enter(State.java:194)
	at
org.springframework.webflow.engine.Transition.execute(Transition.java:227)
	at
org.springframework.webflow.engine.DecisionState.doEnter(DecisionState.java:51)
	at org.springframework.webflow.engine.State.enter(State.java:194)
	at
org.springframework.webflow.engine.Transition.execute(Transition.java:227)
	at
org.springframework.webflow.engine.impl.FlowExecutionImpl.execute(FlowExecutionImpl.java:393)
	at
org.springframework.webflow.engine.impl.RequestControlContextImpl.execute(RequestControlContextImpl.java:214)
	at
org.springframework.webflow.engine.TransitionableState.handleEvent(TransitionableState.java:119)
	at org.springframework.webflow.engine.Flow.handleEvent(Flow.java:555)
	at
org.springframework.webflow.engine.impl.FlowExecutionImpl.handleEvent(FlowExecutionImpl.java:388)
	at
org.springframework.webflow.engine.impl.RequestControlContextImpl.handleEvent(RequestControlContextImpl.java:210)
	at
org.springframework.webflow.engine.ActionState.doEnter(ActionState.java:105)
	at org.springframework.webflow.engine.State.enter(State.java:194)
	at
org.springframework.webflow.engine.Transition.execute(Transition.java:227)
	at
org.springframework.webflow.engine.DecisionState.doEnter(DecisionState.java:51)
	at org.springframework.webflow.engine.State.enter(State.java:194)
	at
org.springframework.webflow.engine.Transition.execute(Transition.java:227)
	at
org.springframework.webflow.engine.DecisionState.doEnter(DecisionState.java:51)
	at org.springframework.webflow.engine.State.enter(State.java:194)
	at
org.springframework.webflow.engine.Transition.execute(Transition.java:227)
	at
org.springframework.webflow.engine.DecisionState.doEnter(DecisionState.java:51)
	at org.springframework.webflow.engine.State.enter(State.java:194)
	at org.springframework.webflow.engine.Flow.start(Flow.java:535)
	at
org.springframework.webflow.engine.impl.FlowExecutionImpl.start(FlowExecutionImpl.java:366)
	at
org.springframework.webflow.engine.impl.RequestControlContextImpl.start(RequestControlContextImpl.java:234)
	at
org.springframework.webflow.engine.SubflowState.doEnter(SubflowState.java:101)
	at org.springframework.webflow.engine.State.enter(State.java:194)
	at
org.springframework.webflow.engine.Transition.execute(Transition.java:227)
	at
org.springframework.webflow.engine.DecisionState.doEnter(DecisionState.java:51)
	at org.springframework.webflow.engine.State.enter(State.java:194)
	at
org.springframework.webflow.engine.Transition.execute(Transition.java:227)
	at
org.springframework.webflow.engine.DecisionState.doEnter(DecisionState.java:51)
	at org.springframework.webflow.engine.State.enter(State.java:194)
	at org.springframework.webflow.engine.Flow.start(Flow.java:535)
	at
org.springframework.webflow.engine.impl.FlowExecutionImpl.start(FlowExecutionImpl.java:366)
	at
org.springframework.webflow.engine.impl.FlowExecutionImpl.start(FlowExecutionImpl.java:222)
	at
org.springframework.webflow.executor.FlowExecutorImpl.launchExecution(FlowExecutorImpl.java:140)
	at
org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.handle(FlowHandlerAdapter.java:193)
	at
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)
	at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
	at
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936)
	at
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:827)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
	at
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
	at
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)
	at
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)
	at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
	at
org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
	at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
	at
org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103)
	at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
	at
org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
	at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
	at
org.apache.cxf.fediz.service.idp.service.security.GrantedAuthorityEntitlements.doFilter(GrantedAuthorityEntitlements.java:61)
	at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
	at
org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
	at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
	at
org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
	at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
	at
org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
	at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
	at
org.apache.cxf.fediz.service.idp.STSPortFilter.doFilter(STSPortFilter.java:74)
	at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
	at
org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
	at
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
	at
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)
	at
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
	at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
	at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
	at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
	at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
	at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
	at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1757)
	at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1716)
	at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:745)
2015-12-10 17:29:57,324 [http-nio-12443-exec-3] DEBUG
org.springframework.security.web.savedrequest.HttpSessionRequestCache  -
DefaultSavedRequest added to Session:
DefaultSavedRequest[https://localhost:12443/fediz-idp-remote/federation?wa=wsignin1.0&wtrealm=urn%3Aorg%3Aapache%3Acxf%3Afediz%3Aidp%3Arealm-A&wreply=https%3A%2F%2Flocalhost%3A9443%2Ffediz-idp%2Ffederation&wctx=246d00a1-d306-493f-9af9-3210080b6b57]
2015-12-10 17:29:57,324 [http-nio-12443-exec-3] DEBUG
org.springframework.security.web.access.ExceptionTranslationFilter  -
Calling Authentication entry point.
2015-12-10 17:29:57,324 [http-nio-12443-exec-3] DEBUG
org.springframework.security.access.prepost.PrePostAnnotationSecurityMetadataSource 
-
@org.springframework.security.access.prepost.PreAuthorize(value=hasRole('IDP_READ'))
found on specific method: public org.apache.cxf.fediz.service.idp.domain.Idp
org.apache.cxf.fediz.service.idp.rest.IdpServiceImpl.getIdp(java.lang.String,java.util.List)
2015-12-10 17:29:57,324 [http-nio-12443-exec-3] DEBUG
org.springframework.security.access.method.DelegatingMethodSecurityMetadataSource 
- Caching method
[CacheKey[org.apache.cxf.fediz.service.idp.rest.IdpServiceImpl; public
abstract org.apache.cxf.fediz.service.idp.domain.Idp
org.apache.cxf.fediz.service.idp.rest.IdpService.getIdp(java.lang.String,java.util.List)]]
with attributes [[authorize: 'hasRole('IDP_READ')', filter: 'null',
filterTarget: 'null']]
2015-12-10 17:29:57,324 [http-nio-12443-exec-3] DEBUG
org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor 
- Secure object: ReflectiveMethodInvocation: public abstract
org.apache.cxf.fediz.service.idp.domain.Idp
org.apache.cxf.fediz.service.idp.rest.IdpService.getIdp(java.lang.String,java.util.List);
target is of class [org.apache.cxf.fediz.service.idp.rest.IdpServiceImpl];
Attributes: [[authorize: 'hasRole('IDP_READ')', filter: 'null',
filterTarget: 'null']]
2015-12-10 17:29:57,324 [http-nio-12443-exec-3] DEBUG
org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor 
- Previously Authenticated:
org.springframework.security.authentication.UsernamePasswordAuthenticationToken@ffffbf99:
Principal: IDP_TEST; Credentials: [PROTECTED]; Authenticated: true; Details:
null; Granted Authorities: IDP_READ
2015-12-10 17:29:57,324 [http-nio-12443-exec-3] DEBUG
org.springframework.security.access.vote.AffirmativeBased  - Voter:
org.springframework.security.access.prepost.PreInvocationAuthorizationAdviceVoter@42abbd9e,
returned: 1
2015-12-10 17:29:57,324 [http-nio-12443-exec-3] DEBUG
org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor 
- Authorization successful
2015-12-10 17:29:57,324 [http-nio-12443-exec-3] DEBUG
org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor 
- RunAsManager did not change Authentication object
2015-12-10 17:29:57,335 [http-nio-12443-exec-3] INFO 
org.apache.cxf.fediz.service.idp.service.jpa.ConfigServiceJPA  - Old Spring
security context restored
2015-12-10 17:29:57,336 [http-nio-12443-exec-3] ERROR
org.apache.cxf.fediz.service.idp.service.security.GrantedAuthorityEntitlements 
- Failed to enrich security context with entitlements
org.springframework.dao.EmptyResultDataAccessException: Query "select i from
IDP i where i.realm=:realm" selected no result, but expected unique result.;
nested exception is javax.persistence.NoResultException: Query "select i
from IDP i where i.realm=:realm" selected no result, but expected unique
result.
	at
org.springframework.orm.jpa.EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(EntityManagerFactoryUtils.java:304)
	at
org.springframework.orm.jpa.DefaultJpaDialect.translateExceptionIfPossible(DefaultJpaDialect.java:121)
	at
org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.translateExceptionIfPossible(AbstractEntityManagerFactoryBean.java:403)
	at
org.springframework.dao.support.ChainedPersistenceExceptionTranslator.translateExceptionIfPossible(ChainedPersistenceExceptionTranslator.java:58)
	at
org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:213)
	at
org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:163)
	at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at
org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96)
	at
org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260)
	at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94)
	at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
	at com.sun.proxy.$Proxy30.getIdp(Unknown Source)
	at
org.apache.cxf.fediz.service.idp.rest.IdpServiceImpl.getIdp(IdpServiceImpl.java:76)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
	at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
	at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
	at
org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:64)
	at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
	at com.sun.proxy.$Proxy42.getIdp(Unknown Source)
	at
org.apache.cxf.fediz.service.idp.service.jpa.ConfigServiceJPA.getIDP(ConfigServiceJPA.java:67)
	at
org.apache.cxf.fediz.service.idp.FederationEntryPoint.commence(FederationEntryPoint.java:87)
	at
org.springframework.security.web.access.ExceptionTranslationFilter.sendStartAuthentication(ExceptionTranslationFilter.java:186)
	at
org.springframework.security.web.access.ExceptionTranslationFilter.handleSpringSecurityException(ExceptionTranslationFilter.java:168)
	at
org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:131)
	at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
	at
org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103)
	at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
	at
org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
	at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
	at
org.apache.cxf.fediz.service.idp.service.security.GrantedAuthorityEntitlements.doFilter(GrantedAuthorityEntitlements.java:61)
	at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
	at
org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
	at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
	at
org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
	at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
	at
org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
	at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
	at
org.apache.cxf.fediz.service.idp.STSPortFilter.doFilter(STSPortFilter.java:74)
	at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
	at
org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
	at
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
	at
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)
	at
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
	at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
	at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
	at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
	at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
	at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
	at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1757)
	at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1716)
	at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:745)
Caused by: javax.persistence.NoResultException: Query "select i from IDP i
where i.realm=:realm" selected no result, but expected unique result.
	at
org.apache.openjpa.persistence.QueryImpl.getSingleResult(QueryImpl.java:321)
	at
org.apache.cxf.fediz.service.idp.service.jpa.IdpDAOJPAImpl.getIdp(IdpDAOJPAImpl.java:86)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
	at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
	at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
	at
org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:155)
	... 64 more




--
View this message in context: http://cxf.547215.n5.nabble.com/cxf-fediz-internal-server-realm-b-error-500-in-running-simpleWebapp-example-tp5763690p5763810.html
Sent from the cxf-user mailing list archive at Nabble.com.

AW: [cxf-fediz] internal server (realm-b) error 500 in running simpleWebapp example

Posted by Jan Bernhardt <jb...@talend.com>.
Hi Ingo,

as far as I know Tomcat8 is not yet supported/working. There is some work on the way within next two month to get it working.

I would suggest to use Tomcat7 in the meantime. Tomcat7 works like a charm.

Kind regards
Jan

-- 
Jan Bernhardt

Talend Community Coder
http://coders.talend.com

Visit my Blog
https://janbernhardt.blogspot.de

> -----Ursprüngliche Nachricht-----
> Von: Ingo [mailto:wolf.working@gmail.com]
> Gesendet: Dienstag, 8. Dezember 2015 10:02
> An: users@cxf.apache.org
> Betreff: [cxf-fediz] internal server (realm-b) error 500 in running simpleWebapp
> example
> 
> Dear list,
> I am facing problems in running the simpleWebapp example from fediz with the
> following setup:
> Tomcat8 instance 1:
>   https://localhost:9443/fediz-idp/
>   https://localhost:9443/fediz-idp-sts/
> Tomcat8 instance 2:
>   https://localhost:8443/fedizhelloworld/
> Tomcat8 instance 3
>   https://localhost:12443/fediz-idp-remote/
> 
> Login to IDP realm-A works fine. However, when I try to login with IDP reaml-B I
> get the following error at Tomcat8 instance3:
> 
> 
> 
> It looks like this is a problem with the HSQL-DB content, but I have no clue what
> could be the cause. Is this a known problem?
> 
> kind regards, Ingo
> 
> 
> 
> --
> View this message in context: http://cxf.547215.n5.nabble.com/cxf-fediz-
> internal-server-realm-b-error-500-in-running-simpleWebapp-example-
> tp5763690.html
> Sent from the cxf-user mailing list archive at Nabble.com.