Skip to Content.
Sympa Menu

grouper-dev - [grouper-dev] Using Grouper API in a maven project

Subject: Grouper Developers Forum

List archive

[grouper-dev] Using Grouper API in a maven project


Chronological Thread 
  • From: "Nakandala, Supun Chathuranga" <>
  • To: "" <>
  • Subject: [grouper-dev] Using Grouper API in a maven project
  • Date: Thu, 16 Jun 2016 19:50:03 +0000
  • Accept-language: en-US

Hi Devs,

I trying to create a project which directly interacts with the Grouper Java API. The project is a maven project and I have added the following dependency.

<dependency>
    <groupId>edu.internet2.middleware.grouper</groupId>
    <artifactId>grouper</artifactId>
    <version>2.3.0</version>
</dependency>

I also copied the files inside the conf directory in the binary distribution into resources directory in the project and configured the correct database connections in the hibernate properties file. Also using the gsh I initialized the database.

But when I tried to run simple example code provided in the API.txt document I get the following error
.
.
Grouper warning: cannot find class com.thoughtworks.xstream.alias.CannotResolveClassException, perhaps you are missing jar: xstream.jar
Grouper error: grouper versions do not match, GrouperVersion.class: 2.3.0, grouper.version.properties: null, manifest: null
Exception in thread "main" java.lang.NullPointerException
at edu.internet2.middleware.grouper.GrouperSourceAdapter$2.callback(GrouperSourceAdapter.java:317)
Disconnected from the target VM, address: '127.0.0.1:56978', transport: 'socket'
at edu.internet2.middleware.grouper.GrouperSession.callbackGrouperSession(GrouperSession.java:974)
at edu.internet2.middleware.grouper.GrouperSourceAdapter.getSubjectsByIds(GrouperSourceAdapter.java:311)
at edu.internet2.middleware.grouper.GrouperSourceAdapter.getSubject(GrouperSourceAdapter.java:215)
at edu.internet2.middleware.grouper.subj.SourcesXmlResolver$1.callLogic(SourcesXmlResolver.java:119)
at edu.internet2.middleware.grouper.subj.SourcesXmlResolver$1.callLogic(SourcesXmlResolver.java:116)
at edu.internet2.middleware.grouper.subj.SourcesXmlResolver$LogLabelCallable.call(SourcesXmlResolver.java:169)
at edu.internet2.middleware.grouper.subj.SourcesXmlResolver.executeCallables(SourcesXmlResolver.java:230)
at edu.internet2.middleware.grouper.subj.SourcesXmlResolver.find(SourcesXmlResolver.java:125)
at edu.internet2.middleware.grouper.subj.CachingResolver.find(CachingResolver.java:125)
at edu.internet2.middleware.grouper.subj.ValidatingResolver.find(ValidatingResolver.java:91)
at edu.internet2.middleware.grouper.SubjectFinder.findById(SubjectFinder.java:431)
at edu.internet2.middleware.grouper.SubjectFinder.findById(SubjectFinder.java:405)
at org.apache.airavata.groupmanager.Main.main(Main.java:38)

After Googling for the exception message I found this grouper email thread [https://lists.internet2.edu/sympa/arc/grouper-dev/2011-10/msg00069.html] which is discussing the same issue. There is an open issue for this https://bugs.internet2.edu/jira/browse/GRP-673 and I tried to manually copy this file into my project to overcome the issue. But I cannot find the misc/version.properties file in the API binary distribution.

Where can I get this file? Or else your help on how to fix this issue is highly appreciated.

Thanks
-Supun



  • [grouper-dev] Using Grouper API in a maven project, Nakandala, Supun Chathuranga, 06/16/2016

Archive powered by MHonArc 2.6.16.

Top of Page