Eclipse调试cas server 3.5.2.1
由于在配置CAS+LDAP总是报错,决定Eclipse调试cas server,跟踪问题出在哪里?
=============================================================
WHO: [username: aaaa]
WHAT: 'principal' cannot be null.
Check the correctness of @Audit annotation at the following audit point: execution(public abstract org.jasig.cas.authentication.Authentication org.jasig.cas.authentication.AuthenticationManager.authenticate(org.jasig.cas.authentication.principal.Credentials))
ACTION: TICKET_GRANTING_TICKET_NOT_CREATED
APPLICATION: CAS
WHEN: Thu May 29 17:04:41 CST 2014
CLIENT IP ADDRESS: 127.0.0.1
SERVER IP ADDRESS: 127.0.0.1
=============================================================
这里以cas-server-3.5.2.1-release.zip说明如何配置调试环境:
1. 下载cas-server-3.5.2.1-release.zip,这里面包含了源码和打包后的文件。
2. 解压缩cas-server-3.5.2.1-release.zip,在modules子目录里面找到cas-server-webapp-3.5.2.1.war。
3. 解压缩cas-server-webapp-3.5.2.1.war到eclipse的workspace目录,这样可以让cas-server-webapp-3.5.2.1方便成为eclipse的一个项目。
4. 在cas-server-webapp-3.5.2.1下新建WebContent子目录。WebContent是eclipse web项目的网站根目录。
5. 将原来cas-server-webapp-3.5.2.1目录下的所有内容都移动到WebContent。
6. 删除WebContent/WEB-INF/classes目录下的org目录。这个目录对应的是cas-server-webapp的源码。
7. 将cas-server-3.5.2.1-releas/cas-server-core/src/main/java目录下的源码复制到cas-server-webapp-3.5.2.1/cas-server-core。只需要java目录就可以,其它都不要。
8. 重复第7步,将cas-server-webapp和cas-server-support-ldap目录下的源码都复制过来。最后的目录结构如下图:
9. 编译cas-server-support-ldap时需要用到spring-ldap-core和spring-ldap-core-tiger,注意要1.3.2的版本,不要用最新的2.0.2的版本。这两个文件不容易找到,可以用maven去自动下载。
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.mycompany.app</groupId> <artifactId>my-app</artifactId> <packaging>jar</packaging> <version>1.0-SNAPSHOT</version> <name>my-app</name> <url>http://maven.apache.org</url> <dependencies> <dependency> <groupId>org.springframework.ldap</groupId> <artifactId>spring-ldap-core</artifactId> <version>1.3.2.RELEASE</version> </dependency> <dependency> <groupId>org.springframework.ldap</groupId> <artifactId>spring-ldap-core-tiger</artifactId> <version>1.3.2.RELEASE</version> </dependency> </dependencies> </project>
10. 创建Dyanmic Web Project,注意源码目录的定义,不是默认的src。
11. 配置完毕,可以调试了。
相关文章
- SQL Server - Management Studio - Client Statistics - Wait time on server replies vs Client processing time
- How to Activate TLS 1.2 on Windows Server 2008 R2 and IIS 7.5
- file /usr/lib64/mysql/plugin/dialog.so from install of Percona-Server-server-56-5.6.24-rel72.2.el6.x86_64 conflicts with file from package mariadb-libs-1:5.5.60-1.el7_5.x86_64
- Nginx: could not build the server_names_hash 解决办法
- C#构造方法(函数) C#方法重载 C#字段和属性 MUI实现上拉加载和下拉刷新 SVN常用功能介绍(二) SVN常用功能介绍(一) ASP.NET常用内置对象之——Server sql server——子查询 C#接口 字符串的本质 AJAX原生JavaScript写法
- SQL SERVER错误:已超过了锁请求超时时段。 (Microsoft SQL Server,错误: 1222)
- SQL Server常见的约束条件
- 关于web-dev-server 记录
- Host is not allowed to connect to this MySQL server解决方法
- com.sun.xml.internal.ws.server.ServerRtException: Server Runtime Error: java.net.BindException: Cannot assign requested address: bind
- 《Windows Server 2012活动目录管理实践》——2.4 计算机安装“AD DS域服务”前后变化
- 《PowerShell V3——SQL Server 2012数据库自动化运维权威指南》——2.8 创建数据库
- 转 FAL[server, ARC3]: FAL archive failed Error 16401 creating standby archive log file at host
- sql server 小技巧(3) SQL Server 2012 数据库完整导出到SQL Azure (包括数据)
- SQL Server 2016安装教程
- SQL Server数据库基础的级联删除、级联更新与三层架构之窥
- sql server作业报错:从ICassFactory为CLSID为{17BCA6E8-A950-497E-B2F9-AF6AA475916F}的COM组件创建实例失败,原因是出现以下错误:c001f011.(Microsoft.Server.manageDTS)
- sql server删除订阅发布失败,无法作为数据库主题执行,因为主体"dbo"不存在、无法模拟这种类型的主体,或您没有所需要的权限。
- sql server存储引擎启动错误(SQL Server could not spawn FRunCM thread)
- 【转】sql server数据收集和监控
- 【sql server复制】教你使用SQL SERVER复制
- (4.29)sql server中有关于GO的坑
- 在sql server中循环语句
- SQL Server 字符串截取