I am some problem for create the Principal with SingleRowJdbcPersonAttributeDao for poupulate data in my Pricipal.
<bean id="primaryPrincipalResolver"
class="org.jasig.cas.authentication.principal.PersonDirectoryPrincipalResolver"
p:principalFactory-ref="principalFactory"
p:attributeRepository-ref="singleRowJdbcPersonAttributeDao" />
<bean id="singleRowJdbcPersonAttributeDao"
class="org.jasig.services.persondir.support.jdbc.SingleRowJdbcPersonAttributeDao">
<constructor-arg index="0" ref="dbCasDataSource" />
<constructor-arg index="1"
value="SELECT login FROM my_schema.my_table WHERE {0}" />
<property name="queryAttributeMapping">
<map>
<entry key="username" value="login" />
</map>
</property>
<property name="resultAttributeMapping">
<map>
<entry key="login" value="login" />
</map>
</property>
</bean>
2016-07-21 21:53:36,406 DEBUG [org.jasig.cas.authentication.principal.PersonDirectoryPrincipalResolver] - <Attempting to resolve a principal...>
2016-07-21 21:53:36,407 DEBUG [org.jasig.cas.authentication.principal.PersonDirectoryPrincipalResolver] - <Creating SimplePrincipal for [test]>
2016-07-21 21:53:36,407 DEBUG [org.jasig.services.persondir.support.jdbc.SingleRowJdbcPersonAttributeDao] - <Created seed map='{username=[test]}' for uid='test'>
2016-07-21 21:53:36,407 DEBUG [org.jasig.services.persondir.support.jdbc.SingleRowJdbcPersonAttributeDao] - <Adding attribute 'login' with value 'test]' to query builder 'null'>
2016-07-21 21:53:36,407 DEBUG [org.jasig.services.persondir.support.jdbc.SingleRowJdbcPersonAttributeDao] - <Generated query builder 'sql=[login = ?] args=[test]' from query Map {username=[test]}.>
2016-07-21 21:53:36,410 DEBUG [org.springframework.jdbc.core.JdbcTemplate] - <Executing prepared SQL query>
2016-07-21 21:53:36,410 DEBUG [org.springframework.jdbc.core.JdbcTemplate] - <Executing prepared SQL statement [SELECT login, password FROM agadir_annuaire.compte_utilisateur WHERE login = ?]>
2016-07-21 21:53:36,415 DEBUG [org.springframework.jdbc.datasource.DataSourceUtils] - <Fetching JDBC Connection from DataSource>
2016-07-21 21:53:36,418 TRACE [org.springframework.jdbc.core.StatementCreatorUtils] - <Setting SQL statement parameter value: column index 1, parameter value [test], value class [java.lang.String], SQL type unknown>
2016-07-21 21:53:36,422 DEBUG [org.springframework.jdbc.datasource.DataSourceUtils] - <Returning JDBC Connection to DataSource>
2016-07-21 21:53:36,424 WARN [org.jasig.cas.web.flow.token.TokenAuthenticationAction] - <'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.AuthenticationTransaction))
java.lang.IllegalArgumentException: 'principal' cannot be null.
I tested since 3 days.