Skip to Content.
Sympa Menu

grouper-users - Re: [grouper-users] sources.xml problems

Subject: Grouper Users - Open Discussion List

List archive

Re: [grouper-users] sources.xml problems


Chronological Thread 
  • From: Tom Barton <>
  • To: Chris Franks <>
  • Cc:
  • Subject: Re: [grouper-users] sources.xml problems
  • Date: Wed, 29 Aug 2007 08:16:11 -0500

Do your <search> elements contain a 'numParameters' declaration, as in

<search>
<searchType>searchSubject</searchType>
<param>
<param-name>numParameters</param-name>
<param-value>1</param-value>
</param>
<param>
<param-name>sql</param-name>
<param-value>select * from Subject where (subjectId=?)</param-value>
</param>
</search>

This was introduced in subject v0.3.X, which is included in grouper 1.2.0. The value of numParameters is the number of '?' in the following 'sql' parameter that must be substituted.

Chris Franks wrote:
Hi Everyone,

I'm having trouble with the sources.xml in Grouper 1.2.

When I log in to the system, by default I have to use the "name"
attribute in the Subject table (I assume because the sources.xml
searchSubjectByIdentifier search block says select * from Subject where
(name=?) and the searchSubject search block says select * from Subject
where (subjectId=?)). When I switch these around (which seems to make
more sense because the searchSubjectByIdentifier used the subjectId
attribute) this is cured.

When I can do this, I can login. But when I try to view my subject's
summary I get:

Unexpected error -
edu.internet2.middleware.subject.SubjectNotFoundException:subject not
found:
,person

Is this because the searchSubjectByIdentifier and searchSubject search
blocks in the sources.xml have been switched? In grouper 1.1 I could
rectify this by editing the searches so that:

searchSubjectByIdentifier = select * from Subject where
(subjectId='%TERM%') or (name='%TERM%')

and

searchSubject = select * from Subject where (subjectId='%TERM%') or
(name='%TERM%')

But if I do the equivalent in Grouper 1.2, so:

searchSubjectByIdentifier = select * from Subject where (name=?) or
(subjectId=?)

and

searchSubject = select * from Subject where (subjectId=?) or (name=?)

Neither logging in with the subjectId attribute nor the name attribute
works.

Looking at the query logs, the queries with "or" in them don't seem to
get executed at all. Similarly, if I make no changes at all to the
sources and login with the GrouperSystem user and try to do a search,
with working Subject and SubjectAttribute entries in the database, I get
no results and it looks as though the search query has not been
executed. This only happens in Grouper 1.2.

Can anyone shed any light? I'm using MySQL 5 if this helps?

Thanks in advance,

Chris Franks
Newcastle University



Archive powered by MHonArc 2.6.16.

Top of Page