输入我的用户名并输入我的CAS登录表格Grails 3.3.2 app后,我收到以下异常。
Configuring Spring Security Core ...
... finished configuring Spring Security Core
Configuring Spring Security CAS ...
... finished configuring Spring Security CAS
Grails application running at http://localhost:8089 in environment: development
2018-05-22 13:59:47.395 DEBUG --- [nio-8089-exec-2] o.j.c.c.session.SingleSignOutHandler : Recording session for token ST-1553-4NR7XWRPXGioiJXs9oLd-cas-01.mydomain.com
2018-05-22 13:59:47.395 DEBUG --- [nio-8089-exec-2] o.j.c.c.session.SingleSignOutHandler : Recording session for token ST-1553-4NR7XWRPXGioiJXs9oLd-cas-01.mydomain.com
2018-05-22 13:59:47.425 DEBUG --- [nio-8089-exec-2] c.c.s.HashMapBackedSessionMappingStorage : Attempting to remove Session=[7CBCC94E9BF728A044B05C07ABFAB894]
2018-05-22 13:59:47.425 DEBUG --- [nio-8089-exec-2] c.c.s.HashMapBackedSessionMappingStorage : Attempting to remove Session=[7CBCC94E9BF728A044B05C07ABFAB894]
2018-05-22 13:59:47.425 DEBUG --- [nio-8089-exec-2] c.c.s.HashMapBackedSessionMappingStorage : No mapping for session found. Ignoring.
2018-05-22 13:59:47.425 DEBUG --- [nio-8089-exec-2] c.c.s.HashMapBackedSessionMappingStorage : No mapping for session found. Ignoring.
2018-05-22 13:59:47.440 DEBUG --- [nio-8089-exec-2] o.j.c.c.v.Cas20ServiceTicketValidator : Placing URL parameters in map.
2018-05-22 13:59:47.440 DEBUG --- [nio-8089-exec-2] o.j.c.c.v.Cas20ServiceTicketValidator : Placing URL parameters in map.
2018-05-22 13:59:47.441 DEBUG --- [nio-8089-exec-2] o.j.c.c.v.Cas20ServiceTicketValidator : Calling template URL attribute map.
2018-05-22 13:59:47.441 DEBUG --- [nio-8089-exec-2] o.j.c.c.v.Cas20ServiceTicketValidator : Calling template URL attribute map.
2018-05-22 13:59:47.441 DEBUG --- [nio-8089-exec-2] o.j.c.c.v.Cas20ServiceTicketValidator : Loading custom parameters from configuration.
2018-05-22 13:59:47.441 DEBUG --- [nio-8089-exec-2] o.j.c.c.v.Cas20ServiceTicketValidator : Loading custom parameters from configuration.
2018-05-22 13:59:47.442 DEBUG --- [nio-8089-exec-2] o.j.c.c.v.Cas20ServiceTicketValidator : Constructing validation url: https://cas.mydomain.com/cas/serviceValidate?pgtUrl=http%3A%2F%2Flocalhost%3A8089%2Fsecure%2Freceptor&ticket=ST-1553-4NR7XWRPXGioiJXs9oLd-cas-01.mydomain.com&service=http%3A%2F%2Flocalhost%3A8089%2Flogin%2Fcas
2018-05-22 13:59:47.442 DEBUG --- [nio-8089-exec-2] o.j.c.c.v.Cas20ServiceTicketValidator : Constructing validation url: https://cas.mydomain.com/cas/serviceValidate?pgtUrl=http%3A%2F%2Flocalhost%3A8089%2Fsecure%2Freceptor&ticket=ST-1553-4NR7XWRPXGioiJXs9oLd-cas-01.mydomain.com&service=http%3A%2F%2Flocalhost%3A8089%2Flogin%2Fcas
2018-05-22 13:59:47.442 DEBUG --- [nio-8089-exec-2] o.j.c.c.v.Cas20ServiceTicketValidator : Retrieving response from server.
2018-05-22 13:59:47.442 DEBUG --- [nio-8089-exec-2] o.j.c.c.v.Cas20ServiceTicketValidator : Retrieving response from server.
2018-05-22 13:59:48.864 DEBUG --- [nio-8089-exec-2] o.j.c.c.v.Cas20ServiceTicketValidator : Server response:
2018-05-22 13:59:48.864 DEBUG --- [nio-8089-exec-2] o.j.c.c.v.Cas20ServiceTicketValidator : Server response:
2018-05-22 13:59:49.334 ERROR --- [nio-8089-exec-2] org.jasig.cas.client.util.XmlUtils : Premature end of file.
org.xml.sax.SAXParseException: Premature end of file.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.jasig.cas.client.util.XmlUtils.getTextForElement(XmlUtils.java:192)
serverUrlPrefix = 'http://cas.mydomain.com/cas'
任何想法或建议都将不胜感激!!!
以下是同一应用和CAS服务器的Grails 2.5.1版本的输出。
2018-05-18 10:42:26,755 DEBUG AbstractUrlBasedTicketValidator - Placing URL parameters in map.
2018-05-18 10:42:26,755 DEBUG AbstractUrlBasedTicketValidator - Calling template URL attribute map.
2018-05-18 10:42:26,756 DEBUG AbstractUrlBasedTicketValidator - Loading custom parameters from configuration.
2018-05-18 10:42:26,756 DEBUG AbstractUrlBasedTicketValidator - Constructing validation url: https://cas.mydomin.com/serviceValidate?ticket=ST-1485-7X6VirHikiEKadmDnt0Y-cas-01.mydomin.com&service=http%3A%2F%2Flocalhost%3A8089%2Fj_spring_cas_security_check
2018-05-18 10:42:26,756 DEBUG AbstractUrlBasedTicketValidator - Retrieving response from server.
2018-05-18 10:42:27,204 DEBUG AbstractUrlBasedTicketValidator - Server response:
<cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'>
<cas:authenticationSuccess>
<cas:user>first.lastname</cas:user>
</cas:authenticationSuccess>
</cas:serviceResponse>