找回密码
 注册成为天翎用户

[已解决] M3整合-单点登录-cas服务器报错

[复制链接]
 楼主| 北京智源普华 发表于 2014-12-25 17:14:57 | 显示全部楼层
手工在T_USER表增加DOMAINID字段,手工增加T_DOMAIN表,但依然报以下错误:
HTTP Status 500 - Request processing failed; nested exception is org.springframework.webflow.engine.ActionExecutionException: Exception thrown executing [AnnotatedAction@d54d3f targetAction = cn.myapps.sso.web.action.OBPMAuthenticationViaFormAction@1bddf367, attributes = map['method' -> 'submit']] in state 'submit' of flow 'login-webflow' -- action execution attributes were 'map['method' -> 'submit']'; nested exception is org.springframework.dao.EmptyResultDataAccessException: Incorrect result size: expected 1, actual 0


type Exception report

message Request processing failed; nested exception is org.springframework.webflow.engine.ActionExecutionException: Exception thrown executing [AnnotatedAction@d54d3f targetAction = cn.myapps.sso.web.action.OBPMAuthenticationViaFormAction@1bddf367, attributes = map['method' -> 'submit']] in state 'submit' of flow 'login-webflow' -- action execution attributes were 'map['method' -> 'submit']'; nested exception is org.springframework.dao.EmptyResultDataAccessException: Incorrect result size: expected 1, actual 0

description The server encountered an internal error that prevented it from fulfilling this request.

exception
org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.webflow.engine.ActionExecutionException: Exception thrown executing [AnnotatedAction@d54d3f targetAction = cn.myapps.sso.web.action.OBPMAuthenticationViaFormAction@1bddf367, attributes = map['method' -> 'submit']] in state 'submit' of flow 'login-webflow' -- action execution attributes were 'map['method' -> 'submit']'; nested exception is org.springframework.dao.EmptyResultDataAccessException: Incorrect result size: expected 1, actual 0
        org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:583)
        org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:643)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
        org.jasig.cas.web.init.SafeDispatcherServlet.service(SafeDispatcherServlet.java:115)
        org.inspektr.common.web.ClientInfoThreadLocalFilter.doFilterInternal(ClientInfoThreadLocalFilter.java:48)
        org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
        org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)
        org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)



root cause
org.springframework.webflow.engine.ActionExecutionException: Exception thrown executing [AnnotatedAction@d54d3f targetAction = cn.myapps.sso.web.action.OBPMAuthenticationViaFormAction@1bddf367, attributes = map['method' -> 'submit']] in state 'submit' of flow 'login-webflow' -- action execution attributes were 'map['method' -> 'submit']'; nested exception is org.springframework.dao.EmptyResultDataAccessException: Incorrect result size: expected 1, actual 0
        org.springframework.webflow.engine.ActionExecutor.execute(ActionExecutor.java:64)
        org.springframework.webflow.engine.ActionState.doEnter(ActionState.java:156)
        org.springframework.webflow.engine.State.enter(State.java:191)
        org.springframework.webflow.engine.Transition.execute(Transition.java:212)
        org.springframework.webflow.engine.TransitionableState.onEvent(TransitionableState.java:107)
        org.springframework.webflow.engine.Flow.onEvent(Flow.java:534)
        org.springframework.webflow.engine.impl.RequestControlContextImpl.signalEvent(RequestControlContextImpl.java:205)
        org.springframework.webflow.engine.ActionState.doEnter(ActionState.java:161)
        org.springframework.webflow.engine.State.enter(State.java:191)
        org.springframework.webflow.engine.Transition.execute(Transition.java:212)
        org.springframework.webflow.engine.TransitionableState.onEvent(TransitionableState.java:107)
        org.springframework.webflow.engine.Flow.onEvent(Flow.java:534)
        org.springframework.webflow.engine.impl.RequestControlContextImpl.signalEvent(RequestControlContextImpl.java:205)
        org.springframework.webflow.engine.impl.FlowExecutionImpl.signalEvent(FlowExecutionImpl.java:202)
        org.springframework.webflow.executor.FlowExecutorImpl.resume(FlowExecutorImpl.java:222)
        org.springframework.webflow.executor.support.FlowRequestHandler.handleFlowRequest(FlowRequestHandler.java:111)
        org.springframework.webflow.executor.mvc.FlowController.handleRequestInternal(FlowController.java:165)
        org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
        org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
        org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
        org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807)
        org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
        org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:643)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
        org.jasig.cas.web.init.SafeDispatcherServlet.service(SafeDispatcherServlet.java:115)
        org.inspektr.common.web.ClientInfoThreadLocalFilter.doFilterInternal(ClientInfoThreadLocalFilter.java:48)
        org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
        org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)
        org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)



root cause
org.springframework.dao.EmptyResultDataAccessException: Incorrect result size: expected 1, actual 0
        org.springframework.dao.support.DataAccessUtils.requiredSingleResult(DataAccessUtils.java:71)
        org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:722)
        org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:732)
        org.springframework.jdbc.core.simple.SimpleJdbcTemplate.queryForObject(SimpleJdbcTemplate.java:151)
        cn.myapps.sso.authentication.handler.OBPMSearchModeSearchDatabaseAuthenticationHandler.authenticateOBPMInternal(OBPMSearchModeSearchDatabaseAuthenticationHandler.java:89)
        cn.myapps.sso.authentication.handler.support.AbstractOBPMAuthenticationHandler.doAuthentication(AbstractOBPMAuthenticationHandler.java:41)
        org.jasig.cas.authentication.handler.support.AbstractPreAndPostProcessingAuthenticationHandler.authenticate(AbstractPreAndPostProcessingAuthenticationHandler.java:71)
        cn.myapps.sso.authentication.OBPMAuthenticationManagerImpl.authenticate(OBPMAuthenticationManagerImpl.java:79)
        org.jasig.cas.CentralAuthenticationServiceImpl.createTicketGrantingTicket(CentralAuthenticationServiceImpl.java:418)
        cn.myapps.sso.web.action.OBPMAuthenticationViaFormAction.submit(OBPMAuthenticationViaFormAction.java:97)
        sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        java.lang.reflect.Method.invoke(Method.java:597)
        org.springframework.webflow.util.DispatchMethodInvoker.invoke(DispatchMethodInvoker.java:99)
回复

使用道具 举报

bebo 发表于 2014-12-25 17:48:40 | 显示全部楼层
本帖最后由 bebo 于 2014-12-25 18:26 编辑

您好,开会的时候问了一下,之前那个贴子配置单点登录的是不对的,因为新建空数据库的话是取不到DOMAINID的。
正确的方法是需要关联系统库里的对应的表,是关联系统库,而不是新建空的数据库。
回复

使用道具 举报

 楼主| 北京智源普华 发表于 2014-12-26 08:53:31 | 显示全部楼层
正确的方法是需要关联系统库里的对应的表,是关联系统库,而不是新建空的数据库?
CAS服务器应该相对独立才对吧,毕竟除OBPM应用程序验证外,还有其他应用程序需验证,这样才是真正的单点登录。若只是OBPM验证,其本身就已经支持跨多企业访问了。
回复

使用道具 举报

bebo 发表于 2014-12-26 09:28:20 | 显示全部楼层
1、你可以把对应的表从系统库导到你新建的数据库中试一试可不可行。
2、因为我们平台的登录是多了一个企业域的验证,而DOMAINID就是企业域ID,你直接新建生成的表是不会生成DOMAINID的,除非关联系统库,或者自己模仿平台的表关联自己做一个关联,但这样会很麻烦。
回复

使用道具 举报

 楼主| 北京智源普华 发表于 2014-12-26 13:50:40 | 显示全部楼层
我把obmp-cas的hibernate.cfg.xml数据库连接部分改为系统用户、密码等,莫名地报数据库连接mysql错误
HTTP Status 500 - Request processing failed; nested exception is org.springframework.webflow.engine.ActionExecutionException: Exception thrown executing [AnnotatedAction@58660a9 targetAction = cn.myapps.sso.web.action.OBPMAuthenticationViaFormAction@88b6cca, attributes = map['method' -> 'submit']] in state 'submit' of flow 'login-webflow' -- action execution attributes were 'map['method' -> 'submit']'; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Could not connect to localhost:3306 : Connection refused: connect)


建议把obpm-cas你先从你本地测试一下,然后把通过测试的这个obpm-cas包及数据库备份发给我可以吗?
回复

使用道具 举报

bebo 发表于 2014-12-26 14:33:16 | 显示全部楼层
我本地这边先测试一下吧
回复

使用道具 举报

bebo 发表于 2015-1-30 14:54:09 | 显示全部楼层
感谢楼主反馈,该帖结帖!
回复

使用道具 举报

本版积分规则

手机版|天翎MyApps技术社区 ( 粤ICP备11093750号 )

GMT+8, 2026-8-14 06:49

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表