org.jasig.cas.client.validation.TicketValidationException: Ticket ''{0}'' not recognized

Google Groups | Tran Phu | 2 months ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    I have configured the Cas20ProxyReceivingTicketValidationFilter with the parameter <init-param> <param-name>allowedProxyChains</param-name> <param-value>https://fina138:8443/cas/proxyCallback</param-value> </init-param> (although actually the value does not matter at all) The error I get is java.lang.ClassCastException: java.lang.String cannot be cast to [Ljava.lang.String; at org.jasig.cas.client.validation.ProxyList.contains(ProxyList.java:34) at org.jasig.cas.client.validation.Cas20ProxyTicketValidator.customParseResponse(Cas20ProxyTicketValidator.java:47) at org.jasig.cas.client.validation.Cas20ServiceTicketValidator.parseResponseFromServer(Cas20ServiceTicketValidator.java:94) at org.jasig.cas.client.validation.AbstractUrlBasedTicketValidator.validate(AbstractUrlBasedTicketValidator.java:188) at org.jasig.cas.client.validation.AbstractTicketValidationFilter.doFilter(AbstractTicketValidationFilter.java:132) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) The reason is Cas20ProxyReceivingTicketValidationFilter.java protected final List constructListOfProxies(final String proxies) { if (CommonUtils.isBlank(proxies)) { return new ArrayList(); } final String[] splitProxies = proxies.split("\n"); final List items = Arrays.asList(splitProxies); final ProxyListEditor editor = new ProxyListEditor(); editor.setValue(items); return (List) editor.getValue(); } The string is split on newlines but not any further. Then editor.setValue and editor.getValue is called which do essentially nothing, so you end up with a list of strings instead of a list of string arrays (one string array is one proxy chain, and you want to create a list of string arrays). Note on fix: I guess a fix is to not do any string splits here, and instead call editor.setAsText(proxies). But that is not enough, because then in ProxyListEditor you have to do setValue(proxyChains); instead of setValue(new ProxyList(proxyChains)); at the minimum.

    Apereo Issues | 8 years ago | Sander Bos
    java.lang.ClassCastException: java.lang.String cannot be cast to [Ljava.lang.String;
  2. 0

    I have configured the Cas20ProxyReceivingTicketValidationFilter with the parameter <init-param> <param-name>allowedProxyChains</param-name> <param-value>https://fina138:8443/cas/proxyCallback</param-value> </init-param> (although actually the value does not matter at all) The error I get is java.lang.ClassCastException: java.lang.String cannot be cast to [Ljava.lang.String; at org.jasig.cas.client.validation.ProxyList.contains(ProxyList.java:34) at org.jasig.cas.client.validation.Cas20ProxyTicketValidator.customParseResponse(Cas20ProxyTicketValidator.java:47) at org.jasig.cas.client.validation.Cas20ServiceTicketValidator.parseResponseFromServer(Cas20ServiceTicketValidator.java:94) at org.jasig.cas.client.validation.AbstractUrlBasedTicketValidator.validate(AbstractUrlBasedTicketValidator.java:188) at org.jasig.cas.client.validation.AbstractTicketValidationFilter.doFilter(AbstractTicketValidationFilter.java:132) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) The reason is Cas20ProxyReceivingTicketValidationFilter.java protected final List constructListOfProxies(final String proxies) { if (CommonUtils.isBlank(proxies)) { return new ArrayList(); } final String[] splitProxies = proxies.split("\n"); final List items = Arrays.asList(splitProxies); final ProxyListEditor editor = new ProxyListEditor(); editor.setValue(items); return (List) editor.getValue(); } The string is split on newlines but not any further. Then editor.setValue and editor.getValue is called which do essentially nothing, so you end up with a list of strings instead of a list of string arrays (one string array is one proxy chain, and you want to create a list of string arrays). Note on fix: I guess a fix is to not do any string splits here, and instead call editor.setAsText(proxies). But that is not enough, because then in ProxyListEditor you have to do setValue(proxyChains); instead of setValue(new ProxyList(proxyChains)); at the minimum.

    Apereo Issues | 8 years ago | Sander Bos
    java.lang.ClassCastException: java.lang.String cannot be cast to [Ljava.lang.String;
  3. 0

    GitHub comment 43#19571707

    GitHub | 4 years ago | michaelmp
    java.lang.RuntimeException: Unable to create XMLReader
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    [CAS 4.2.7] Ticket ''{0}'' not recognized

    GitHub | 3 months ago | karamata
    org.jasig.cas.client.validation.TicketValidationException: Ticket ''{0}'' not recognized
  6. 0

    [cas-user] [CAS 4.2.7] Ticket ''{0}'' not recognized on CAS client

    Google Groups | 2 months ago | Tran Phu
    org.jasig.cas.client.validation.TicketValidationException: Ticket ''{0}'' not recognized

    2 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.jasig.cas.client.validation.TicketValidationException

      Ticket ''{0}'' not recognized

      at org.jasig.cas.client.validation.Cas20ServiceTicketValidator.parseResponseFromServer()
    2. Jasig CAS Client for Java - Core
      AbstractTicketValidationFilter.doFilter
      1. org.jasig.cas.client.validation.Cas20ServiceTicketValidator.parseResponseFromServer(Cas20ServiceTicketValidator.java:84)
      2. org.jasig.cas.client.validation.AbstractUrlBasedTicketValidator.validate(AbstractUrlBasedTicketValidator.java:201)
      3. org.jasig.cas.client.validation.AbstractTicketValidationFilter.doFilter(AbstractTicketValidationFilter.java:204)
      3 frames
    3. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      2 frames
    4. Jasig CAS Client for Java - Core
      SingleSignOutFilter.doFilter
      1. org.jasig.cas.client.session.SingleSignOutFilter.doFilter(SingleSignOutFilter.java:97)
      1 frame
    5. Glassfish Core
      CoyoteAdapter.service
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
      4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
      5. org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
      6. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
      7. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
      8. org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
      9. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      10. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
      10 frames
    6. Grizzly HTTP
      JIoEndpoint$SocketProcessor.run
      1. org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
      2. org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
      3. org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
      3 frames
    7. Java RT
      Thread.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      3. java.lang.Thread.run(Thread.java:745)
      3 frames