[cas-dev] NullPointerException in externalRedirect endstate
Renaud Bruyeron
bruyeron at fullsix.com
Wed Jun 21 12:57:32 EDT 2006
Hi,
I am running into a problem with the "gateway" mode of CAS 3.0.5.
The client webapp always triggers a "gateway" roundtrip with CAS if it
knows that its identity info is stale (for example when the HttpSession
is created) so it can get the new identity.
However, it triggers a NPE in some conditions. Below is an extract of
the logs (in DEBUG) which shows the execution of the webflow, and the
stacktrace when the externalRedirect endstate is reached:
2006-06-21 18:46:52,559 DEBUG
[org.jasig.cas.web.flow.AutomaticCookiePathSetterAction] - <Action
'AutomaticCookiePathSetterAction' beginning execution>
2006-06-21 18:46:52,559 DEBUG
[org.jasig.cas.web.flow.AutomaticCookiePathSetterAction] - <Action
'AutomaticCookiePathSetterAction' completed execution; result is 'success'>
2006-06-21 18:46:52,559 DEBUG
[org.jasig.cas.web.flow.TicketGrantingTicketExistsAction] - <Action
'TicketGrantingTicketExistsAction' beginning execution>
2006-06-21 18:46:52,560 DEBUG
[org.jasig.cas.web.flow.TicketGrantingTicketExistsAction] - <Action
'TicketGrantingTicketExistsAction' completed execution; result is
'ticketGrantingTicketExists'>
2006-06-21 18:46:52,560 DEBUG
[org.jasig.cas.web.flow.HasServiceCheckAction] - <Action
'HasServiceCheckAction' beginning execution>
2006-06-21 18:46:52,560 DEBUG
[org.jasig.cas.web.flow.HasServiceCheckAction] - <Action
'HasServiceCheckAction' completed execution; result is 'hasService'>
2006-06-21 18:46:52,561 DEBUG
[org.jasig.cas.web.flow.RenewRequestCheckAction] - <Action
'RenewRequestCheckAction' beginning execution>
2006-06-21 18:46:52,561 DEBUG
[org.jasig.cas.web.flow.RenewRequestCheckAction] - <Action
'RenewRequestCheckAction' completed execution; result is
'generateServiceTicket'>
2006-06-21 18:46:52,561 DEBUG
[org.jasig.cas.web.flow.GenerateServiceTicketAction] - <Action
'GenerateServiceTicketAction' beginning execution>
2006-06-21 18:46:52,562 DEBUG
[org.jasig.cas.ticket.registry.DefaultTicketRegistry] - <Attempting to
retrieve ticket [TGT-3-0Vw02NvOVnLcK2DHQ4qElTfw641BV1nasgK-50]>
2006-06-21 18:46:52,562 DEBUG
[org.jasig.cas.web.flow.GenerateServiceTicketAction] - <Action
'GenerateServiceTicketAction' completed execution; result is 'gateway'>
2006-06-21 18:46:52,563 ERROR
[org.apache.catalina.core.ContainerBase.[Catalina].[xxxxx.f6.fr].[/cas].[cas]]
- <Servlet.service() for servlet cas threw exception>
java.lang.NullPointerException: target is null for method indexOf
at ognl.OgnlRuntime.callMethod(OgnlRuntime.java:821)
at ognl.ASTMethod.getValueBody(ASTMethod.java:75)
at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
at ognl.SimpleNode.getValue(SimpleNode.java:210)
at ognl.ASTChain.getValueBody(ASTChain.java:109)
at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
at ognl.SimpleNode.getValue(SimpleNode.java:210)
at ognl.ASTNotEq.getValueBody(ASTNotEq.java:49)
at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
at ognl.SimpleNode.getValue(SimpleNode.java:210)
at ognl.ASTTest.getValueBody(ASTTest.java:49)
at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
at ognl.SimpleNode.getValue(SimpleNode.java:210)
at ognl.Ognl.getValue(Ognl.java:333)
at ognl.Ognl.getValue(Ognl.java:310)
at
org.springframework.binding.expression.support.OgnlExpression.evaluateAgainst(OgnlExpression.java:60)
at
org.springframework.binding.expression.support.CompositeStringExpression.evaluateAgainst(CompositeStringExpression.java:33)
at
org.springframework.webflow.support.ExternalRedirectSelector.makeSelection(ExternalRedirectSelector.java:73)
at org.springframework.webflow.EndState.doEnter(EndState.java:127)
at org.springframework.webflow.State.enter(State.java:192)
at
org.springframework.webflow.Transition.execute(Transition.java:216)
at
org.springframework.webflow.TransitionableState.onEvent(TransitionableState.java:80)
My guess is that ${requestScope.service} is null, even though it should
not be since hasServiceCheckAction returned "hasService".
Before I go digging inside webflow and CAS, do you have any idea on what
could be the problem?
- Renaud
More information about the cas-dev
mailing list