Its a combination bug in OGNL and the JVM I believe. If you're not using the most recent OGNL, you can try upgrading.
On Tue, Aug 17, 2010 at 4:33 AM, yaowei <[email protected]> wrote: > hi all. > i have did some modification about cas 3.4, > it seems work normally. > but under pressure testing, > some problems occured, > the stack trace is blow: > <[weblogic.servlet.internal.webappservletcont...@e51960 - appName: 'cas', > name: 'cas', context-path: '/cas', spec-version: '2.5', request: > weblogic.servlet.internal.servletrequesti...@18311fc[ > POST /cas/login?fromsite=2 HTTP/1.1 > Content-Type: application/x-www-form-urlencoded > Cache-Control: no-cache > Referer: https://10.153.195.55:7002/cas/login?fromsite=2 > User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET > CLR 2.0.50727) > Accept-Encoding: gzip, deflate > Accept-Language: zh-cn > Accept: */* > Connection: Keep-Alive > Cookie: > JSESSIONID=RqnhMqTSVpGSf8vsr9KQ6Qj1k2h7Zw2jQG012JKTWQ2LQpLQp8k1!-175800201 > Content-Length: 117 > > ]] Root cause of ServletException. > org.springframework.webflow.execution.ActionExecutionException: Exception > thrown executing [annotatedact...@17d8325 targetAction = > [evaluateact...@12cf90e expression = > authenticationViaFormAction.submit(flowRequestContext, > flowScope.credentials, messageContext), resultExposer = [null]], attributes > = map[[empty]]] in state 'realSubmit' of flow 'login' -- action execution > attributes were 'map[[empty]]' > at > org.springframework.webflow.execution.ActionExecutor.execute(ActionExecutor.java:60) > at > org.springframework.webflow.engine.ActionState.doEnter(ActionState.java:101) > at org.springframework.webflow.engine.State.enter(State.java:194) > at > org.springframework.webflow.engine.Transition.execute(Transition.java:227) > at > org.springframework.webflow.engine.impl.FlowExecutionImpl.execute(FlowExecutionImpl.java:391) > Truncated. see log file for complete stacktrace > org.springframework.binding.expression.EvaluationException: An > OgnlException occurred getting the value for expression > 'authenticationViaFormAction.submit(flowRequestContext, > flowScope.credentials, messageContext)' on context [class > org.springframework.webflow.engine.impl.RequestControlContextImpl] > at > org.springframework.binding.expression.ognl.OgnlExpression.getValue(OgnlExpression.java:92) > at > org.springframework.webflow.action.EvaluateAction.doExecute(EvaluateAction.java:77) > at > org.springframework.webflow.action.AbstractAction.execute(AbstractAction.java:188) > at > org.springframework.webflow.execution.AnnotatedAction.execute(AnnotatedAction.java:145) > at > org.springframework.webflow.execution.ActionExecutor.execute(ActionExecutor.java:51) > Truncated. see log file for complete stacktrace > ognl.MethodFailedException: Method "submit" failed for object > org.jasig.cas.web.flow.authenticationviaformact...@e64641[java.lang.nullpointerexception] > at ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:1265) > at > ognl.ObjectMethodAccessor.callMethod(ObjectMethodAccessor.java:68) > at ognl.OgnlRuntime.callMethod(OgnlRuntime.java:1329) > at ognl.ASTMethod.getValueBody(ASTMethod.java:90) > at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212) > Truncated. see log file for complete stacktrace > java.lang.NullPointerException > at > weblogic.servlet.internal.ServletRequestImpl$SessionHelper.initSessionInfo(ServletRequestImpl.java:2509) > at > weblogic.servlet.internal.ServletRequestImpl$SessionHelper.getSessionInternal(ServletRequestImpl.java:2281) > at > weblogic.servlet.internal.ServletRequestImpl$SessionHelper.getSession(ServletRequestImpl.java:2271) > at > weblogic.servlet.internal.ServletRequestImpl.getSession(ServletRequestImpl.java:1245) > at > weblogic.servlet.internal.ServletRequestImpl.getSession(ServletRequestImpl.java:1241) > Truncated. see log file for complete stacktrace > > > the login-webflow.xml is blow: > <?xml version="1.0" encoding="UTF-8"?> > <flow xmlns="http://www.springframework.org/schema/webflow" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://www.springframework.org/schema/webflow > > http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd"> > > <on-start> > <evaluate expression="initialFlowSetupAction" /> > </on-start> > <decision-state id="ssoauthFlagCheck"> > <if test="flowScope.ssoauthFlag neq null" then="viewLoginForm" > else="registerFlagCheck"/> > </decision-state> > <decision-state id="registerFlagCheck"> > <if test="flowScope.registerFlag neq null" then="viewRegisterForm" > else="ticketGrantingTicketExistsCheck"/> > </decision-state> > <decision-state id="ticketGrantingTicketExistsCheck"> > <if test="flowScope.ticketGrantingTicketId neq null" > then="ticketGrantingTicketValidCheck" else="gatewayRequestCheck" /> > </decision-state> > <decision-state id="ticketGrantingTicketValidCheck"> > <if test="flowScope.isValidTGT neq null" then="hasServiceCheck" > else="viewLoginForm"/> > </decision-state> > <decision-state id="gatewayRequestCheck"> > <if test="externalContext.requestParameterMap['gateway'] neq > '' && externalContext.requestParameterMap['gateway'] neq null > && flowScope.service neq null" then="redirect" else="viewLoginForm" > /> > </decision-state> > > <decision-state id="hasServiceCheck"> > <if test="flowScope.service != null" > then="renewRequestCheck" else="viewGenericLoginSuccess" /> > </decision-state> > > <decision-state id="renewRequestCheck"> > <if test="externalContext.requestParameterMap['renew'] neq > '' && externalContext.requestParameterMap['renew'] neq null" > then="viewLoginForm" else="generateServiceTicket" /> > </decision-state> > > <!-- > The "warn" action makes the determination of whether to > redirect directly to the requested > service or display the "confirmation" page to go back to the > server. > --> > <decision-state id="warn"> > <if test="flowScope.warnCookieValue" then="showWarningView" > else="redirect" /> > </decision-state> > > <!-- > <action-state id="startAuthenticate"> > <action bean="x509Check" /> > <transition on="success" to="sendTicketGrantingTicket" /> > <transition on="warn" to="warn" /> > <transition on="error" to="viewLoginForm" /> > </action-state> > --> > <view-state id="viewRegisterForm" view="registerView" > model="credentials"> > <var name="credentials" > class="org.jasig.cas.authentication.principal.SitechCredentials" /> > <binder> > <binding property="username" /> > <binding property="password" /> > <binding property="randomCode" /> > <binding property="passportPassword" /> > <binding property="nickName" /> > </binder> > <on-entry> > <set name="viewScope.commandName" value="'credentials'" /> > </on-entry> > <transition on="submit" bind="true" validate="true" > to="realSubmit"> > <set name="flowScope.credentials" value="credentials" /> > <evaluate > expression="authenticationViaFormAction.doBind(flowRequestContext, > flowScope.credentials)" /> > </transition> > </view-state> > <view-state id="viewLoginForm" view="casLoginView" > model="credentials"> > <var name="credentials" > class="org.jasig.cas.authentication.principal.SitechCredentials" /> > <binder> > <binding property="username" /> > <binding property="passwordType" /> > <binding property="password" /> > <binding property="validateCode"/> > </binder> > <on-entry> > <set name="viewScope.commandName" value="'credentials'" /> > </on-entry> > <transition on="submit" bind="true" validate="true" > to="realSubmit"> > <set name="flowScope.credentials" value="credentials" /> > <evaluate > expression="authenticationViaFormAction.doBind(flowRequestContext, > flowScope.credentials)" /> > </transition> > </view-state> > > > <action-state id="realSubmit"> > <evaluate > expression="authenticationViaFormAction.submit(flowRequestContext, > flowScope.credentials, messageContext)" /> > <transition on="warn" to="warn" /> > <transition on="success" to="sendTicketGrantingTicket" /> > <transition on="error" to="submitCheck" /> > <!--transition on="error" to="ahredirectview"/--> > </action-state> > <decision-state id="submitCheck"> > <if test="flowScope.registerFlag neq null" > then="viewRegisterForm" else="viewLoginForm"/> > </decision-state> > <action-state id="sendTicketGrantingTicket"> > <evaluate expression="sendTicketGrantingTicketAction" /> > <transition to="serviceCheck" /> > </action-state> > > <decision-state id="serviceCheck"> > <if test="flowScope.service neq null" > then="generateServiceTicket" else="registerCheck" /> > </decision-state> > <decision-state id="registerCheck"> > <if test="flowScope.registerFlag neq null" > then="registerSuccessView" else="viewGenericLoginSuccess"/> > </decision-state> > <action-state id="generateServiceTicket"> > <evaluate expression="generateServiceTicketAction" /> > <transition on="success" to ="warn" /> > <!--transition on="error" to="viewLoginForm" /--> > <transition on="error" to="generateServiceTicketError0"/> > <transition on="gateway" to="redirect" /> > </action-state> > <decision-state id="generateServiceTicketError0"> > <if test="flowScope.cookieValue neq null" > then="generateServiceTicketErrorRedirect" > else="generateServiceTicketError"/> > </decision-state> > <decision-state id="generateServiceTicketError"> > <if test="flowScope.registerFlag neq null" > then="viewRegisterForm" else="viewLoginForm"/> > </decision-state> > <action-state id="redirect"> > <evaluate > expression="flowScope.service.getResponse(requestScope.serviceTicketId)" > result-type="org.jasig.cas.authentication.principal.Response" > result="requestScope.response" /> > <transition on="requestScope.response" to="postView" /> > <transition to="redirectViewCheck" /> > </action-state> > <decision-state id="redirectViewCheck"> > <if test="flowScope.ssoredirect neq null" then="ssoredirect" > else="redirectView" /> > </decision-state> > <!-- > the "viewGenericLogin" is the end state for when a user > attempts to login without coming directly from a service. > They have only initialized their single-sign on session. > --> > <end-state id="viewGenericLoginSuccess" > view="casLoginGenericSuccessView" /> > > <!-- > The "showWarningView" end state is the end state for when > the user has requested privacy settings (to be "warned") to be turned on. > It delegates to a > view defines in default_views.properties that display the > "Please click here to go to the service." message. > --> > <end-state id="showWarningView" view="casLoginConfirmView" /> > > <end-state id="postView" view="postResponseView"> > <output name="viewScope.parameters" > value="requestScope.response.attributes" /> > <output name="viewScope.originalUrl" value="flowScope.service.id" > /> > </end-state> > > <!-- > The "redirect" end state allows CAS to properly end the > workflow while still redirecting > the user back to the service required. > --> > <!--end-state id="redirectView" > view="externalRedirect:${requestScope.response.url}" /--> > <end-state id="redirectView" view="ahredirectview" /> > <end-state id="registerSuccessView" view="registerSuccessView"/> > <end-state id="ssoredirect" > view="externalRedirect:${requestScope.response.url}"/> > <end-state id="generateServiceTicketErrorRedirect" > view="externalRedirect:${flowScope.service.id}"/> > <!--end-state id="ahredirectview" view="ahredirectview"/--> > <end-state id="viewServiceErrorView" view="viewServiceErrorView" /> > > <end-state id="viewServiceSsoErrorView" view="viewServiceSsoErrorView" > /> > > <global-transitions> > <transition to="viewServiceErrorView" > on-exception="org.springframework.webflow.execution.repository.NoSuchFlowExecutionException" > /> > <transition to="viewServiceSsoErrorView" > on-exception="org.jasig.cas.services.UnauthorizedSsoServiceException" /> > <transition to="viewServiceErrorView" > on-exception="org.jasig.cas.services.UnauthorizedServiceException" /> > </global-transitions> > </flow> > the java code with little modification. > i donot know what cause the problem, > can any one help me? > thanks! > -- > You are currently subscribed to [email protected] as: > [email protected] > To unsubscribe, change settings or access archives, see > http://www.ja-sig.org/wiki/display/JSG/cas-dev > -- You are currently subscribed to [email protected] as: [email protected] To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-dev
