Skip to Content.
Sympa Menu

grouper-users - [grouper-users] RE: Change Log Consumer -get attributes not working

Subject: Grouper Users - Open Discussion List

List archive

[grouper-users] RE: Change Log Consumer -get attributes not working


Chronological Thread 
  • From: "Klug, Lawrence" <>
  • To: Chris Hyzer <>, Shilen Patel <>
  • Cc: "" <>
  • Subject: [grouper-users] RE: Change Log Consumer -get attributes not working
  • Date: Wed, 3 Oct 2012 18:51:56 +0000
  • Accept-language: en-US

Now I’m seeing this exception.  What am I doing wrong?

 

Code:

 

          GrouperSession gs =  GrouperSession.startRootSession(); 

          Group group =  GroupFinder.findByName(gs, currentGroup, false);

          EventLog.info("found group = " + group);

          System.out.println("found group = " + group);

          String testValue = currentGroup + ":" + PLONE_TARGET;

          EventLog.info("testValue = " + testValue);

          System.out.println("testValue = " + testValue);

          List<String> targetList = group.getAttributeValueDelegate().retrieveValuesString(testValue);

          EventLog.info("found Attribute = " + targetList + " Size = " + targetList.size());

          System.out.println("found Attribute = " + targetList + " Size = " + targetList.size());

          for(String target : targetList ) {

                EventLog.info("found Attribute = " + target);

              System.out.println("found Attribute = " + target);  

              notifyPlone(target, group.getName(), stemPath );

          }

 

 

2012-10-03 11:45:00,067: [DefaultQuartzScheduler_Worker-2] ERROR PloneChangeLogConsumer.processChangeLogEntries(123) -  - problem with id: 74343

edu.internet2.middleware.grouper.exception.AttributeDefNameNotFoundException: Cannot find (or not allowed to find) attribute def name with name: 'ucla:apps:cms:insiders:reader:ploneTarget'

                at edu.internet2.middleware.grouper.internal.dao.hib3.Hib3AttributeDefNameDAO.findByNameSecure(Hib3AttributeDefNameDAO.java:144)

                at edu.internet2.middleware.grouper.internal.dao.hib3.Hib3AttributeDefNameDAO.findByNameSecure(Hib3AttributeDefNameDAO.java:156)

                at edu.internet2.middleware.grouper.attr.finder.AttributeDefNameFinder.findByName(AttributeDefNameFinder.java:55)

                at edu.internet2.middleware.grouper.attr.value.AttributeValueDelegate.retrieveAssignmentForRead(AttributeValueDelegate.java:607)

                at edu.internet2.middleware.grouper.attr.value.AttributeValueDelegate.retrieveValuesString(AttributeValueDelegate.java:426)

                at edu.internet2.middleware.grouper.changeLog.consumer.PloneChangeLogConsumer.processChangeLogEntries(PloneChangeLogConsumer.java:110)

                at edu.internet2.middleware.grouper.changeLog.ChangeLogHelper.processRecords(ChangeLogHelper.java:242)

                at edu.internet2.middleware.grouper.app.loader.GrouperLoaderType$4.runJob(GrouperLoaderType.java:589)

                at edu.internet2.middleware.grouper.app.loader.GrouperLoaderJob.runJob(GrouperLoaderJob.java:398)

                at edu.internet2.middleware.grouper.app.loader.GrouperLoaderJob.execute(GrouperLoaderJob.java:300)

                at org.quartz.core.JobRunShell.run(JobRunShell.java:202)

                at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525)

2012-10-03 11:45:00,077: [DefaultQuartzScheduler_Worker-2] ERROR ChangeLogHelper.processRecords(271) -  - Error: null, sequenceNumber: 74343, edu.internet2.middleware.grouper.exception.AttributeDefNameNotFoundException: Cannot find (or not allowed to find) attribute def name with name: 'ucla:apps:cms:insiders:reader:ploneTarget'

                at edu.internet2.middleware.grouper.internal.dao.hib3.Hib3AttributeDefNameDAO.findByNameSecure(Hib3AttributeDefNameDAO.java:144)

                at edu.internet2.middleware.grouper.internal.dao.hib3.Hib3AttributeDefNameDAO.findByNameSecure(Hib3AttributeDefNameDAO.java:156)

                at edu.internet2.middleware.grouper.attr.finder.AttributeDefNameFinder.findByName(AttributeDefNameFinder.java:55)

                at edu.internet2.middleware.grouper.attr.value.AttributeValueDelegate.retrieveAssignmentForRead(AttributeValueDelegate.java:607)

                at edu.internet2.middleware.grouper.attr.value.AttributeValueDelegate.retrieveValuesString(AttributeValueDelegate.java:426)

                at edu.internet2.middleware.grouper.changeLog.consumer.PloneChangeLogConsumer.processChangeLogEntries(PloneChangeLogConsumer.java:110)

                at edu.internet2.middleware.grouper.changeLog.ChangeLogHelper.processRecords(ChangeLogHelper.java:242)

                at edu.internet2.middleware.grouper.app.loader.GrouperLoaderType$4.runJob(GrouperLoaderType.java:589)

                at edu.internet2.middleware.grouper.app.loader.GrouperLoaderJob.runJob(GrouperLoaderJob.java:398)

                at edu.internet2.middleware.grouper.app.loader.GrouperLoaderJob.execute(GrouperLoaderJob.java:300)

                at org.quartz.core.JobRunShell.run(JobRunShell.java:202)

                at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525)

 

From: Chris Hyzer [mailto:]
Sent: Wednesday, October 03, 2012 9:57 AM
To: Klug, Lawrence; Shilen Patel
Cc:
Subject: RE: Change Log Consumer -get attributes not working

 

Sorry, there is a new attribute framework, and an old one (which is going away soon).  With the new one, try this::

 

group.getAttributeDelegate()

 

or

 

group.getAttributeValueDelegate()

 

e.g.

 

group.getAttributeValueDelegate().retrieveValueString("some:attr:name")

 

Thanks,

Chris

 

From: Klug, Lawrence
Sent: Wednesday, October 03, 2012 12:12 PM
To: Shilen Patel
Cc: Chris Hyzer;
Subject: Change Log Consumer -get attributes not working

 

I’m not getting attributes using this code, although I’ve defined an attribute for the group in question.  What am I doing wrong?

 

 

GrouperSession gs =  GrouperSession.startRootSession(); 

Group group =  GroupFinder.findByName(gs, currentGroup, false);

EventLog.info("found group = " + group);

System.out.println("found group = " + group);

Map<String, Attribute> myMap = group.getAttributesMap(false);

EventLog.info("found Attribute = " + myMap + " Size = " + myMap.size());

System.out.println("found Attribute = " + myMap + " Size = " + myMap.size());     

 

 

**** PLONE CHANGE LOG CONSUMER ****

Processing changeLog #74324, membership.addMembership

Parent group stem: ucla:apps:cms:insiders

, group name: ucla:apps:cms:insiders:reader

, sourceId: ldap

, true

, true

, false

found group = Group[name=ucla:apps:cms:insiders:reader,uuid=9a1f35db35af477fb0b1d773e1b3ff88]

found Attribute = {} Size = 0

 

 

 

Owner group                Attribute name                 Enabled?           Assignment values         Attribute definition        Assignment UUID

Reader           ploneTarget       enabled                 it.ucla.edu/plonetarget1

                                                                            boston.it.ucla.edu/grouper_utility         ploneTarget         cd300...

 




Archive powered by MHonArc 2.6.16.

Top of Page