CAS 4.1.7 REST API, Illegal character in path

55 views
Skip to first unread message

Yan Zhou

unread,
May 10, 2016, 1:14:11 PM5/10/16
to CAS Community
Hi there,

I thought I figured it out, but not quite.  It works on my local Tomcat 7.0.59, but on our dev server, getting error.

When I post to /cas/v1/tickets,   I get 400 bad request in response.   TicketsResource class is throwing error.  Why is this?


this is the log I am seeing.

2016-05-10 16:55:50,744 DEBUG [org.jasig.cas.ticket.registry.MemCacheTicketRegistry] - <Adding ticket TGT-***********************************************0WDt2ia5xT-devcas01.dev.medplus.com >
2016-05-10 16:55:50,747 DEBUG [org.jasig.cas.audit.spi.TicketOrCredentialPrincipalResolver] - <Resolving argument [UsernamePasswordCredential] for audit>
2016-05-10 16:55:50,747 INFO [org.jasig.inspektr.audit.support.Slf4jLoggingAuditTrailManager] - <Audit trail record BEGIN
=============================================================
WHO: castempadmin
WHAT: TGT-***********************************************0WDt2ia5xT-devcas01.dev.medplus.com
ACTION: TICKET_GRANTING_TICKET_CREATED
APPLICATION: CAS
WHEN: Tue May 10 16:55:50 UTC 2016
CLIENT IP ADDRESS: 172.18.100.52
SERVER IP ADDRESS: 172.18.38.109
=============================================================

>
2016-05-10 16:55:50,749 ERROR [org.jasig.cas.support.rest.TicketsResource] - <Illegal character in path at index 134: http://devcas01.dev.medplus.com:8101/cas/v1/tickets/TGT-TGT-***********************************************0WDt2ia5xT-devcas01.dev.medplus.com
        at java.net.URI$Parser.fail(URI.java:2829)
        at java.net.URI$Parser.checkChars(URI.java:3002)
        at java.net.URI$Parser.parseHierarchical(URI.java:3086)
        at java.net.URI$Parser.parse(URI.java:3034)
        at java.net.URI.<init>(URI.java:595)
        at org.jasig.cas.support.rest.TicketsResource.createTicketGrantingTicket(TicketsResource.java:83)
        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.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)
        at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137)
        at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110)
        at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:775)

Yan Zhou

unread,
May 10, 2016, 1:17:56 PM5/10/16
to CAS Community
well, has a space in host.name entry in my cas.properties file.  That was it!
Reply all
Reply to author
Forward
0 new messages