Hi all.

I debugged sources and found out (Tomcat 7.0.22 with SSL).

The actual reason for that error - Invalid Ticket for 
validating. Unfortunately the dump page is visible and strange stack trace 
is shown.
When it works fine, page with message 'invalid ticket' should be rendered, 
but something goes wrong and page contains incorrect stack trace in my case.

When ticket is validated by - 
jorg\jasig\cas\web\ServiceValidateController.java

code:
protected final ModelAndView handleRequestInternal(final HttpServletRequest 
request, final HttpServletResponse response) {
............
    final Assertion assertion = 
this.centralAuthenticationService.validateServiceTicket(serviceTicketId, 
service);
    
   internal class - org\jasig\cas\CentralAuthenticationServiceImpl.java
   gets NULL ticket instance by code:
      final ServiceTicket serviceTicket = (ServiceTicket) 
this.serviceTicketRegistry.getTicket(serviceTicketId, ServiceTicket.class);

and generates exception:
        if (serviceTicket == null) {
            log.info("ServiceTicket [" + serviceTicketId + "] does not 
exist.");
            throw new InvalidTicketException();
......

ServiceValidateController.java catches exception and should render error 
page by code:
..........
        } catch (final TicketException te) {
            return generateErrorView(te.getCode(), te.getCode(),
                new Object[] {serviceTicketId});

but error page is not rendered correctly in my case. The page with stack 
trace is shown instead. I don't know why, I'll try to figure out.


Yuriy.

вторник, 25 октября 2011 г., 16:37:02 UTC+3 пользователь Anthony Colebourne 
написал:
>
> Hi,
>
> I'm getting the following error when I try to login to the Services 
> Management area (/cas/services).
>
> This was working fine until I added the patch suggested at
>         http://www.ja-sig.org/issues/browse/CAS-655
>
> Have I done something wrong or does this look like a different error?
>
> NOTE: Other services are working fine (using .NET and PHP clients).
>
> Thanks,
> Anthony.
>
>
> 2011-10-25 14:29:51,915 ERROR [org.jasig.cas.client.util.CommonUtils] - 
> Server returned HTTP response code: 500 for URL: 
>
> https://llcas.sseln.org.uk/cas/serviceValidate?ticket=ST-1-uWWAnfF6XoQgN1BryQ0e-cas&service=https%3A%2F%2Fllcas.sseln.org.uk%2Fcas%2Fservices%2Fj_acegi_cas_security_check
> java.io.IOException: Server returned HTTP response code: 500 for URL: 
>
> https://llcas.sseln.org.uk/cas/serviceValidate?ticket=ST-1-uWWAnfF6XoQgN1BryQ0e-cas&service=https%3A%2F%2Fllcas.sseln.org.uk%2Fcas%2Fservices%2Fj_acegi_cas_security_check
>          at 
>
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
>          at 
>
> sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:234)
>          at 
>
> org.jasig.cas.client.util.CommonUtils.getResponseFromServer(CommonUtils.java:281)
>          at 
>
> org.jasig.cas.client.validation.AbstractCasProtocolUrlBasedTicketValidator.retrieveResponseFromServer(AbstractCasProtocolUrlBasedTicketValidator.java:33)
>          at 
>
> org.jasig.cas.client.validation.AbstractUrlBasedTicketValidator.validate(AbstractUrlBasedTicketValidator.java:178)
>          at 
>
> org.springframework.security.cas.authentication.CasAuthenticationProvider.authenticateNow(CasAuthenticationProvider.java:131)
>          at 
>
> org.springframework.security.cas.authentication.CasAuthenticationProvider.authenticate(CasAuthenticationProvider.java:117)
>          at 
>
> org.springframework.security.authentication.ProviderManager.doAuthentication(ProviderManager.java:130)
>          at 
>
> org.springframework.security.authentication.AbstractAuthenticationManager.authenticate(AbstractAuthenticationManager.java:48)
>          at 
>
> org.springframework.security.cas.web.CasAuthenticationFilter.attemptAuthentication(CasAuthenticationFilter.java:104)
>          at 
>
> org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199)
>          at 
>
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
>          at 
>
> org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
>          at 
>
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
>          at 
>
> org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)
>          at 
>
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
>          at 
>
> org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:169)
>          at 
>
> org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
>          at 
>
> org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
>          at 
>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
>          at 
>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
>          at 
>
> org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
>          at 
>
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
>          at 
>
> org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
>          at 
>
> org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
>          at 
>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
>          at 
>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
>          at 
>
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
>          at 
>
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
>          at 
>
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
>          at 
>
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
>          at 
>
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
>          at 
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
>          at 
>
> org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:840)
>          at 
>
> org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:640)
>          at 
> org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1286)
>          at java.lang.Thread.run(Thread.java:662)
>
> -- 
> You are currently subscribed to [email protected] <javascript:> as: 
> [email protected] <javascript:>
> To unsubscribe, change settings or access archives, see 
> http://www.ja-sig.org/wiki/display/JSG/cas-user
>
>
-- 
You are currently subscribed to [email protected] as: 
[email protected]
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user

Reply via email to