grouper-users - RE: [grouper-users] gsh subjectAdd fails?
Subject: Grouper Users - Open Discussion List
List archive
- From: Chris Hyzer <>
- To: Martin van Es <>, "" <>
- Subject: RE: [grouper-users] gsh subjectAdd fails?
- Date: Fri, 30 Jan 2009 07:45:53 -0500
- Accept-language: en-US
- Acceptlanguage: en-US
0. Yes, when I try to add a subject which already exists, I get a different
error
1. When you startup GSH, it tells you where your log file is, try looking
there for more details.
2. There is this param which sometimes gives more info: gsh 1% GSH_DEBUG=true
3. Try adding a subject with a different ID, see if that works
4. Run this query in mysql, see if there are multiple rows (or just one
already):
select * from subject where subjectId = 'mrvanes' and subjectTypeId = 'person'
Send me all the logs related to the transaction...
this works for me:
gsh 1% GSH_DEBUG=true
true
gsh 2% addSubject("mrvanes", "person", "Martin van Es")
hibernatesubject: id='mrvanes' type='person' name='Martin van Es'
//now add again, should get failure
gsh 3% addSubject("mrvanes", "person", "Martin van Es")
// Error: subject already exists: mrvanes/person/Martin van Es
edu.internet2.middleware.grouper.exception.GrouperException: subject already
exists: mrvanes/person/Martin van Es
at
edu.internet2.middleware.grouper.RegistrySubject.add(RegistrySubject.java:96)
at
edu.internet2.middleware.grouper.app.gsh.addSubject.invoke(addSubject.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at bsh.Reflect.invokeMethod(Unknown Source)
at bsh.Reflect.invokeStaticMethod(Unknown Source)
at bsh.Reflect.invokeCompiledCommand(Unknown Source)
at bsh.Name.invokeLocalMethod(Unknown Source)
at bsh.Name.invokeMethod(Unknown Source)
at bsh.BSHMethodInvocation.eval(Unknown Source)
at bsh.BSHPrimaryExpression.eval(Unknown Source)
at bsh.BSHPrimaryExpression.eval(Unknown Source)
at bsh.Interpreter.eval(Unknown Source)
at bsh.Interpreter.eval(Unknown Source)
at bsh.Interpreter.eval(Unknown Source)
at
edu.internet2.middleware.grouper.app.gsh.ShellHelper.eval(ShellHelper.java:48)
at
edu.internet2.middleware.grouper.app.gsh.GrouperShell.run(GrouperShell.java:368)
at
edu.internet2.middleware.grouper.app.gsh.GrouperShell.grouperShellHelper(GrouperShell.java:191)
at
edu.internet2.middleware.grouper.app.gsh.GrouperShell.main(GrouperShell.java:126)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.dawidweiss.invoker.Invoker.loader(Invoker.java:167)
at com.dawidweiss.invoker.Invoker.main(Invoker.java:303)
gsh 4%
> -----Original Message-----
> From: Martin van Es
> [mailto:]
> Sent: Friday, January 30, 2009 3:59 AM
> To:
>
> Subject: [grouper-users] gsh subjectAdd fails?
>
> Hi,
>
> I managed to get my grouper up and running using a mysql5 back-end and
> am
> getting up-to-steam pretty quickly now. Going through the
> tutorials/quickstart
> guide however I come accross the addSubject() call in gsh that fails in
> my
> setup:
>
> gsh 0% addSubject("mrvanes", "person", "Martin van Es")
> // Error: unable to evaluate command: Sourced file: inline evaluation
> of:
> ``addSubject("mrvanes", "person", "Martin van Es");'' : Error invoking
> compiled command: : Error in compiled command:
> edu.internet2.middleware.grouper.internal.dao.GrouperDAOException:
> Problem in
> HibernateSession: HibernateSession: isNew: true, isReadonly: true,
> grouperTransactionType: READONLY_NEW,
> Exception in uniqueResult: (class
> edu.internet2.middleware.grouper.RegistrySubject), ByHqlStatic, query:
> 'from
> RegistrySubject as rs where rs.id = :idand rs.typeString = :type
> ',
> cacheable: false, cacheRegion: null, tx type: nullBind var[0]: 'Param
> (class
> java.lang.String): 'id'->'mrvanes'Bind var[1]: 'Param (class
> java.lang.String): 'type'->'person',
>
> The error seems to indicate that the 'uniqueResult' raised an
> exception, which
> I read as: there's allready such a subject (not unique) but there's
> not, I'm
> very sure!
>
> I'm also pretty sure the database and java environment are setup
> correctly,
> because adding a rootStem e.g. succeeds without problems:
>
> gsh 2% addRootStem("foobar", "Foo Bar")
> stem: name='foobar' displayName='Foo Bar' uuid='0c2a0269-77bf-48f2-
> b346-8da3a93642e8'
>
> The UI is also fine and dandy...
>
> Anybody any idea what's wrong?
>
> Regards
> Martin van Es
- gsh subjectAdd fails?, Martin van Es, 01/30/2009
- Re: [grouper-users] gsh subjectAdd fails?, Peter Schober, 01/30/2009
- RE: [grouper-users] gsh subjectAdd fails?, Chris Hyzer, 01/30/2009
- RE: [grouper-users] gsh subjectAdd fails?, Chris Hyzer, 01/30/2009
- Re: [grouper-users] gsh subjectAdd fails?, Peter Schober, 01/30/2009
Archive powered by MHonArc 2.6.16.