liferay 配置ldap+cas 出错

问题描述

按照网上的讲解,配置ldap+cas时要配置deployerConfigContext.xml但是怎么配怎么错,错误如下:SafeDispatcherServlet:TheSpringDispatcherServletwewrapthrewoninit.Butforourhavingcaughtthiserror,theservletwouldnothaveinitialized.org.springframework.beans.factory.BeanCreationException:Errorcreatingbeanwithname'centralAuthenticationService'definedinServletContextresource[/WEB-INF/applicationContext.xml]:Cannotresolvereferencetobean'authenticationManager'whilesettingbeanproperty'authenticationManager';nestedexceptionisorg.springframework.beans.factory.BeanCreationException:Errorcreatingbeanwithname'authenticationManager'definedinServletContextresource[/WEB-INF/deployerConfigContext.xml]:Initializationofbeanfailed;nestedexceptionisjava.lang.VerifyError:classorg.jasig.cas.adaptors.ldap.AbstractLdapUsernamePasswordAuthenticationHandleroverridesfinalmethodafterPropertiesSet.()VCausedby:org.springframework.beans.factory.BeanCreationException:Errorcreatingbeanwithname'authenticationManager'definedinServletContextresource[/WEB-INF/deployerConfigContext.xml]:Initializationofbeanfailed;nestedexceptionisjava.lang.VerifyError:classorg.jasig.cas.adaptors.ldap.AbstractLdapUsernamePasswordAuthenticationHandleroverridesfinalmethodafterPropertiesSet.()VCausedby:java.lang.VerifyError:classorg.jasig.cas.adaptors.ldap.AbstractLdapUsernamePasswordAuthenticationHandleroverridesfinalmethodafterPropertiesSet.()Vatjava.lang.ClassLoader.defineClass1(NativeMethod)atjava.lang.ClassLoader.defineClass(ClassLoader.java:620)atjava.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)atorg.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1819)atorg.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:872)atorg.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1327)atorg.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1206)atjava.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)atjava.lang.ClassLoader.defineClass1(NativeMethod)atjava.lang.ClassLoader.defineClass(ClassLoader.java:620)atjava.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)atorg.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1819)atorg.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:872)atorg.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1327)atorg.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1206)atjava.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)atjava.lang.Class.forName0(NativeMethod)atjava.lang.Class.forName(Class.java:247)atorg.springframework.util.ClassUtils.forName(ClassUtils.java:160)atorg.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:324)atorg.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:833)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:317)atorg.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBeanDefinition(BeanDefinitionValueResolver.java:174)atorg.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:105)atorg.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:241)atorg.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:118)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:801)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:592)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:392)atorg.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:240)atorg.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:132)atorg.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:237)在这个deployerConfigContext.xml中只要添加<beanclass="org.jasig.cas.adaptors.ldap.BindLdapAuthenticationHandler">就有这样的错误,里边没有内容也会错,但是这个是必须添加的啊。配置如下:<?xmlversion="1.0"encoding="UTF-8"?><!DOCTYPEbeansPUBLIC"-//SPRING//DTDBEAN//EN""http://www.springframework.org/dtd/spring-beans.dtd"><beans><beanid="authenticationManager"class="org.jasig.cas.authentication.AuthenticationManagerImpl"><propertyname="credentialsToPrincipalResolvers"><list><beanclass="org.jasig.cas.authentication.principal.UsernamePasswordCredentialsToPrincipalResolver"/><!--|HttpBasedServiceCredentialsToPrincipalResolversupportsHttpBasedCredentials.ItsupportstheCAS2.0approachof|authenticatingservicesbySSLcallback,extractingthecallbackURLfromtheCredentialsandrepresentingitasa|SimpleServiceidentifiedbythatcallbackURL.||IfyouarerepresentingservicesbysomethingmoreorotherthananHTTPSURLwhereattheyareableto|receiveaproxycallback,youwillneedtochangethisbeandeclaration(oraddadditionaldeclarations).+--><beanclass="org.jasig.cas.authentication.principal.HttpBasedServiceCredentialsToPrincipalResolver"/></list></property><!--|WhereasCredentialsToPrincipalResolversidentifywhoitissomeCredentialsmightauthenticate,|AuthenticationHandlersactuallyauthenticatecredentials.HerewedeclaretheAuthenticationHandlersthat|authenticatethePrincipalsthattheCredentialsToPrincipalResolversidentified.CASwilltrythesehandlersinturn|untilitfindsonethatbothsupportstheCredentialspresentedandsucceedsinauthenticating.+--><propertyname="authenticationHandlers"><list><!--|ThisistheauthenticationhandlerthatauthenticatesservicesbymeansofcallbackviaSSL,therebyvalidating|aserversideSSLcertificate.+--><beanclass="org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler"/><!--|ThisistheauthenticationhandlerdeclarationthateveryCASdeployerwillneedtochangebeforedeployingCAS|intoproduction.ThedefaultSimpleTestUsernamePasswordAuthenticationHandlerauthenticatesUsernamePasswordCredentials|wheretheusernameequalsthepassword.YouwillneedtoreplacethiswithanAuthenticationHandlerthatimplementsyour|localauthenticationstrategy.Youmightaccomplishthisbycodinganewsuchhandleranddeclaring|edu.someschool.its.cas.MySpecialHandlerhere,oryoumightuseoneofthehandlersprovidedintheadaptorsmodules.+--><!--<beanclass="org.jasig.cas.authentication.handler.support.SimpleTestUsernamePasswordAuthenticationHandler"/>--><beanclass="org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler"/><beanclass="org.jasig.cas.adaptors.ldap.BindLdapAuthenticationHandler"><propertyname="filter"value="uid=%u"/><propertyname="searchBase"value="ou=users,o=tcl,c=cn"/><propertyname="contextSource"ref="contextSource"/></bean></list></property></bean><beanid="contextSource"class="org.springframework.ldap.core.support.LdapContextSource"><propertyname="anonymousReadOnly"value="true"/><propertyname="password"value="{password_goes_here}"/><propertyname="pooled"value="true"/><propertyname="urls"><list><value>ldap://jdeps:389/</value></list></property><propertyname="userDn"value="{username_goes_here}"/><propertyname="baseEnvironmentProperties"><map><entry><key><value>java.naming.security.protocol</value></key><value>ssl</value></entry><entry><key><value>java.naming.security.authentication</value></key><value>simple</value></entry></map></property></bean></beans>其中ldap为o=tcl,c=cnmanagersecrctou=groupsou=sysou=userou=userscn=joebloggscn=bruno

解决方案

本帖最后由 zn01611 于 2010-07-21 14:51:46 编辑

时间: 2024-12-28 19:37:44

liferay 配置ldap+cas 出错的相关文章

如何在Outlook 2010中配置LDAP查询(Domino)

由于公司的人数比较多,然后用户重名自然就多了,有很多用户发送邮件不知道对方的邮件地址等信息,那有什么办法可以查询么,我们也知道,Outlook可以创建通讯薄,这样把日常的联系人可以添加到通讯薄,然后在发送邮件的时候直接打开收件人就可以选择了,但是我们需要一个一个去手动输入而且不敢确认联系人的真实地址,这样就带来很多问题,但是我们可以在Outlook下配置LDAP查询,通过有效的邮箱账户密码进行验证查找,具体见下: 1. 打开Outlook,单击文件 2. 信息-账户设置-添加和删除账户或更改现有

Ubuntu10.04安装配置LDAP服务

  注:以Ubuntu 10.04版本为例,LDAP服务器和客户端为同一台机器,最新openldap软件服务器端无单独的配置文件,而是将配置信息保存于数据库中. 1. LDAP服务器端安装与配置 1.1 安装LDAP服务器相关软件 sudo apt-get install slapd ldap-utils 1.2 配置LDAP服务器数据库 sudo ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/cosine.ldifsudo ldapa

XP系统命令行配置防火墙提示出错怎么办

  XP系统命令行配置防火墙提示出错怎么办           由于WinXP的防火墙会把还原精灵进程挡住了,所以需要手动添加还原精灵进程到防火墙规则里,才能在主控端看到客户机.但是很多朋友在使用命令配置防火墙时被系统提示语法出错.这是什么原因呢?该如何解决. 为此小编看了下发现大部分语法错误的朋友都犯了一个错误,就是把命令写成: netsh firewall add allowedprogram C:Program FilesGoldenSoftNetRGWinNTClientNetRGClt

CentOS 6.4安装配置ldap

CentOS 6.5安装配置ldap 时间:2015-07-14 00:54来源:blog.51cto.com 作者:"ly36843运维" 博客 举报 点击:274次 一.安装ldap [root@dev ~]# yum install openldap openldap-* -y [root@dev ~]# yum install nscd nss-pam-ldapd nss-* pcre pcre-* -y 二.配置ldap [root@dev ~]# cd /etc/openl

变量-win7系统jdk配置完成后出错

问题描述 win7系统jdk配置完成后出错 所有的变量都配置过了,但是貌似没有安装成功 解决方案 打开资源管理器 真的存在 C:programdataoraclejavajavapath这一系列的目录么? javapath这个目录名就很奇怪. 你环境变量配置了,没错,可是没配置对. 解决方案二: 直接进入安装路径里 如:cd C:Program FilesJavajdk1.8.0_25bin (这根据你自己的安装路径输入哈) 再java一下看看 如果ok 可能你环境变量配置错了 解决方案三: 没

win10 VS2015配置opencv3.1出错

问题描述 win10 VS2015配置opencv3.1出错 按照网上的教程配置好opencv后,运行程序出错,提示limits.h头文件打不开 解决方案 limits.h应该是C标准库里的头文件 楼主在自己电脑里搜索下这个头文件看能不能找到 解决方案二: http://jingyan.baidu.com/article/1974b28975a0abf4b1f774a4.html 解决方案三: opencv配置(win10+VS2015+opencv3.1)win10+opencv3.1+vs

java-Hibernate配置组件映射出错!可能是因为namingStrategy,求解答!

问题描述 Hibernate配置组件映射出错!可能是因为namingStrategy,求解答! 这是我的配置 <hibernate-mapping package="com.test.domain" > <class name="Company" table="Company" > <id name="id" column="ID" > <generator cla

Hadoop配置LDAP集成Kerberos

本文主要记录 cdh hadoop 集群集成 ldap 的过程,这里 ldap 安装的是 OpenLDAP .LDAP 用来做账号管理,Kerberos作为认证.授权一般来说是由应用来决定的,通过在 LDAP 数据库中配置一些属性可以让应用程序来进行授权判断. 关于 Kerberos 的安装和 HDFS 配置 kerberos 认证,请参考 HDFS配置kerberos认证. 1. 环境说明 系统环境: 操作系统:CentOs 6.6 Hadoop版本:CDH5.4 JDK版本:1.7.0_71

ssh中spring的配置加上事务配置后就出错,恳请大家帮忙

问题描述 出错信息:2011-3-27 20:15:08 org.apache.catalina.core.AprLifecycleListener lifecycleEvent信息: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:Program Filesjavabin;D