Hi Eric,
i am using cas 4,2.5 and i have also the same problem like you. Did you
resolve your issue ? if yes, please advise how to solve it.
Thank you
Am Donnerstag, 21. Juli 2016 22:14:13 UTC+2 schrieb Eric PAPET:
>
> hi evry boby,
>
> I am some problem for create the Principal
> with SingleRowJdbcPersonAttributeDao for poupulate data in my Pricipal.
> My Config :
> <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>
>
>
> In database log the sql request is good :
> LOG: exécute <unnamed>: SELECT login FROM my_schema.my_table WHERE login
> = $1
> paramètres : $1 = 'test'
>
>
> My cas log :
> 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.
>
> Somme body use SingleRowJdbcPersonAttributeDao problem ?
>
> I tested since 3 days.
>
> Best regards
> Eric Papet
>
>
--
CAS gitter chatroom: https://gitter.im/apereo/cas
CAS mailing list guidelines: https://apereo.github.io/cas/Mailing-Lists.html
CAS documentation website: https://apereo.github.io/cas
CAS project website: https://github.com/apereo/cas
---
You received this message because you are subscribed to the Google Groups "CAS
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/a/apereo.org/group/cas-user/.
To view this discussion on the web visit
https://groups.google.com/a/apereo.org/d/msgid/cas-user/534103ff-5dab-4988-b0d3-00fae7c6f209%40apereo.org.
For more options, visit https://groups.google.com/a/apereo.org/d/optout.