-- You are currently subscribed to cas-...@lists.jasig.org as: jasig-cas-user...@googlegroups.com To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user
This “may” be an issue with person directory. Don’t know yet, but your other option for now would be to have 2 DAOs and merge the result together finally.
What version of person directory is this by the way? Can you dulicate the problem with the latest?
From: Manfredo Hopp [mailto:mhopp....@gmail.com]
Sent: Wednesday, August 19, 2015 11:26 AM
To: cas-...@lists.jasig.org
Subject: [cas-user] Resolving attirbutes dao results in "no value specified for parameter 2"
Hello I am using singleRowJdbcPersonAttributeDao to resolve principal attributes defined as:
singleRowJdbcPersonAttributeDao
class="org.jasig.services.persondir.support.jdbc.SingleRowJdbcPersonAttributeDao">
<constructor-arg index="0" ref="dataSourceA" />
<constructor-arg index="1"
value="(SELECT a, b, c , d
FROM u WHERE {0}
UNION
(SELECT a, b ,c d
FROM r WHERE {0})" />
<property name="queryAttributeMapping">
<map>
<entry key="username" value="id" />
</map>
</property>
And get SQLException->No value specified for parameter 2
NO replacement for second {0}, so I am not able to use this query.
Is there any reason for the behaviour of this implementation?
Regards Manfredo
--
You are currently subscribed to cas-...@lists.jasig.org as: mmoa...@unicon.net
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user
protected List<IPersonAttributes> getPeopleForQuery(PartialWhereClause queryBuilder, String queryUserName) {
results = this.simpleJdbcTemplate.query(querySQL, rowMapper, queryBuilder.arguments.toArray())
-- You are currently subscribed to cas-...@lists.jasig.org as: mhopp....@gmail.com
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user
-- You are currently subscribed to cas-...@lists.jasig.org as: mhopp....@gmail.com
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user
The ctor arguments you’re calling don’t exist. You want to set properties instead for that class:
p>Example Sprring Configuration:</p> | |
* | |
* <bean id="rolesUserSource" class="org.jasig.services.persondir.support.jdbc.NamedParameterJdbcPersonAttributeDao"> | |
* <property name="dataSource" ref="PersonDB" /> | |
* <property name="sql"> | |
* <value> | |
* SELECT rolename AS scsRoleName | |
* from s_external_role | |
* where oprid = UPPER(:username) | |
* </value> | |
* </property> | |
* <property name="usernameAttributeProvider" ref="usernameAttributeProvider" /> | |
* <property name="userAttributeNames"> | |
* <set> | |
* <value>scsRoleName</value> | |
* </set> | |
* </property> | |
* </bean> |