Hi Duane,

If you have a NullPointerException on that line, it suggests that the
object was not properly instantiated, in this case
*setWebApplicationServiceFactory*.

A couple reasons for this may be that you're either missing a module or
certain settings in cas.properties required to "activate" the service.
We've observed our fair share of difficulties stemming from documentation
issues alone (CAS 5.1.x here). One we recently submitted [yet another] PR (
#2811 <https://github.com/apereo/cas/pull/2811>) for addresses a
*java.lang.ClassNotFoundException* which merely involved changing
org.apache.xerces.util.SecurityManager to
com.sun.org.apache.xerces.internal.util.SecurityManager.

Also, in case you haven't seen this already (in addition to service
configuration for Proxy Authentication):
https://apereo.github.io/cas/5.0.x/installation/Configuring-Proxy-Authentication.html

Since you're already in the CAS 5 line, have you thought about going
straight to CAS 5.1.x to see if the issue has been resolved there? It
appears they started to move away from the instantiation methodology
present in CAS 5.0.x (ProxyController.java:127
<https://github.com/apereo/cas/blob/5.0.x/support/cas-server-support-validation/src/main/java/org/apereo/cas/web/ProxyController.java#L127>)
to constructor-based in CAS 5.1.x (ProxyController:66
<https://github.com/apereo/cas/blob/5.1.x/support/cas-server-support-validation/src/main/java/org/apereo/cas/web/ProxyController.java#L66>)
per this issue: https://github.com/apereo/cas/issues/2184

Hope that helps some!

Matt Borja

On Tue, Jul 25, 2017 at 10:19 AM, Duane Booher <[email protected]> wrote:

> We have a cas/proxy failure which is blocking our CAS 5.0.6/5.0.7
> production deployment. This sequence below works for our existing CAS 4.0.3
> system.
>
>
> 1. https://cas-server.nau.edu/cas/login?service=https://my-
> app.nau.edu/mail/
>
>
> SUCCESS: https://my-app.nau.edu/mail/?ticket=ST-1-
> idYBys2cQPo9TFrticiH-cas-server.nau.edu
>
>
>
> 2. https://cas-server.nau.edu/cas/serviceValidate?ticket=ST-
> 1-idYBys2cQPo9TFrticiH-cas-server.nau.edu&service=https:/
> /my-app.nau.edu/mail/
>
>
> SUCCESS response.
>
>
>
> 3. https://cas-server.nau.edu/cas/proxyValidate?ticket=ST-1-
> idYBys2cQPo9TFrticiH-cas-server.nau.edu&service=https:/
> /my-app.nau.edu/mail/&pgtUrl=https://cas-server.nau.edu/callback
>
>
> SUCCESS response: userid PGTIOU-1-WfzNE715CnLCCAQAaIZQ45rSocWGBF
> dfVykHNqvbUKdWD6vkwX-cas-server.nau.edu false true
> 2017-07-25T09:41:06.053-07:00[US/Arizona] LdapAuthenticationHandler
> LdapAuthenticationHandler
>
>
>
> 4. tail -f localhost_access_log.2017-07-25.txt |grep -i pgtId=
>
>
> "GET /callback?pgtIou=PGTIOU-1-WfzNE715CnLCCAQAaIZQ45rSocWGBF
> dfVykHNqvbUKdWD6vkwX-cas-server.nau.edu&pgtId=PGT-2-
> kEYrcBCFfmgqg7bfI0Ag673rEubeGtpjLNyIR3yOHs9dm5Mb7v-cas-server.nau.edu
> HTTP/1.1" 200 58 "-" "Apache-HttpClient/4.5.2 (Java/1.8.0_121)"
>
>
>
> 5. https://cas-server.nau.edu/cas/proxy?targetService=https:
> //my-app.nau.edu/mail/&pgt=PGT-2-kEYrcBCFfmgqg7bfI0Ag673rEubeGt
> pjLNyIR3yOHs9dm5Mb7v-cas-server.nau.edu
>
>
> FAILURE: url status code 500
>
>
>
> 6. The corresponding catalina-daemon.out shows a null returned from
> getTargetService(ProxyController.java:102)
>
>
> 2017-07-25 09:43:44,585 DEBUG [org.apereo.cas.web.
> FlowExecutionExceptionResolver] - <Ignoring the received exception due to
> a type mismatch>
>
> java.lang.NullPointerException
>
>         at 
> org.apereo.cas.web.ProxyController.getTargetService(ProxyController.java:102)
> ~[cas-server-support-validation-5.0.6.jar:5.0.6]
>
>         at 
> org.apereo.cas.web.ProxyController.handleRequestInternal(ProxyController.java:78)
> ~[cas-server-support-validation-5.0.6.jar:5.0.6]
>
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> ~[?:1.8.0_121]
>
>         at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:62) ~[?:1.8.0_121]
>
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_121]
>
>         at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_121]
>
>
> 7.  Line 102 - why is this.webApplicationServiceFactory.createService(request)
> return null???
>
>
>     private Service getTargetService(final HttpServletRequest request) {
>
>         return this.webApplicationServiceFactory.createService(request);
>
>     }
>
>
> 8. Our Service Proxy Authentication:
>
> {
>
>   "@class" : "org.apereo.cas.services.RegexRegisteredService",
>
>   "serviceId" : ".*",
>
>   "name" : "allow all",
>
>   "id" : 10000005,
>
>   "evaluationOrder" : 5,
>
>   "evaluationOrder" : 10005
>
>   "proxyPolicy" : {
>
>     "@class" : "org.apereo.cas.services.RegexMatchingRegisteredService
> ProxyPolicy",
>
>     "pattern" : ".*"
>
>   }
>
> }
>
>
> Any ideas on a debug approach is appreciated.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "CAS Developer" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> Visit this group at https://groups.google.com/a/apereo.org/group/cas-dev/.
>

-- 
You received this message because you are subscribed to the Google Groups "CAS 
Developer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at https://groups.google.com/a/apereo.org/group/cas-dev/.

Reply via email to