Skip to Content.
Sympa Menu

grouper-dev - [grouper-dev] RE: Grouper .../lib/custom libraries not copied in Web Services ?

Subject: Grouper Developers Forum

List archive

[grouper-dev] RE: Grouper .../lib/custom libraries not copied in Web Services ?


Chronological Thread 
  • From: Chris Hyzer <>
  • To: Gagné Sébastien <>, "" <>
  • Cc: Marchand Robert <>
  • Subject: [grouper-dev] RE: Grouper .../lib/custom libraries not copied in Web Services ?
  • Date: Thu, 3 May 2012 19:08:36 +0000
  • Accept-language: en-US

This is fixed in 2.1.1

 

https://bugs.internet2.edu/jira/browse/GRP-782

 

Yes, you can manually copy the jars to the lib dir no problem, or diff the build.xml in 2.1.1 and merge into 2.1.0 build.xml to fix it. 

http://anonsvn.internet2.edu/viewvc/viewvc.py/i2mi/branches/GROUPER_2_1_BRANCH/grouper-ws/grouper-ws/build.xml?view=log 

(note, that link takes some time to sync from real svn) 

Line 409: 

FROM: 


  <target name="dev" description="copy libs to cvs webapp dir so the app can be run in dev, 
    not, grouper and grouper-ws libs should not be there, note that if you set your local 
    tomcat to grouper-ws-home/webapp is should run locally. Note this should only need 
    to be done once (unless non grouper jars change)" depends="checkGrouper"> 
    <mkdir dir="${basedir}/webapp/WEB-INF/lib" /> 
    <delete dir="${basedir}/webapp/WEB-INF/lib" /> 
    <mkdir dir="${basedir}/webapp/WEB-INF/lib" /> 
    <copy todir="${basedir}/webapp/WEB-INF/lib"> 
      <fileset dir="${basedir}/lib/axis" includes="*.jar" /> 
      <fileset dir="${basedir}/lib/rampart" includes="*.jar" /> 
      <fileset dir="${grouper.lib.dir}/../jdbcSamples"> 
        <include name="*.jar"/> 
      </fileset> 
      <!-- this is for junit which is needed in dev since text classes extend GrouperTest --> 
      <fileset file="${grouper.jar.name}/../test/grouper-test.jar" /> 


TO: 


  <target name="dev" description="copy libs to cvs webapp dir so the app can be run in dev, 
    not, grouper and grouper-ws libs should not be there, note that if you set your local 
    tomcat to grouper-ws-home/webapp is should run locally. Note this should only need 
    to be done once (unless non grouper jars change)" depends="checkGrouper"> 
    <mkdir dir="${basedir}/webapp/WEB-INF/lib" /> 
    <delete dir="${basedir}/webapp/WEB-INF/lib" /> 
    <mkdir dir="${basedir}/webapp/WEB-INF/lib" /> 
    <copy todir="${basedir}/webapp/WEB-INF/lib"> 
      <fileset dir="${basedir}/lib/axis" includes="*.jar" /> 
      <fileset dir="${basedir}/lib/rampart" includes="*.jar" /> 
      <fileset dir="${grouper.lib.dir}/../jdbcSamples"> 
        <include name="*.jar"/> 
      </fileset> 
      <fileset dir="${grouper.lib.dir}/../custom"> 
        <include name="*.jar"/> 
      </fileset> 
      <!-- this is for junit which is needed in dev since text classes extend GrouperTest --> 
      <fileset file="${grouper.jar.name}/../test/grouper-test.jar" /> 


And line: 513 

FROM: 

<copy todir="${webapp.folder}/WEB-INF/lib"> 
<fileset dir="${basedir}/lib/axis" includes="*.jar" /> 
      <fileset dir="${basedir}/lib/rampart" includes="*.jar" /> 
<fileset dir="${grouper.lib.dir}"> 
<include name="*.jar"/> 
        <exclude name="grouper*.jar"/> 
</fileset> 
      <fileset dir="${grouper.lib.dir}"> 
        <include name="grouperClient.jar"/> 
      </fileset> 
      <fileset file="${grouper.jar.name}" /> 
<fileset dir="${basedir}/lib/grouper-ws" includes="*.jar" /> 
      <fileset dir="${basedir}/lib/custom" includes="*.jar" /> 
<fileset dir="${dist.home}" includes="grouper-ws.jar" /> 
</copy> 

TO: 


<copy todir="${webapp.folder}/WEB-INF/lib"> 
<fileset dir="${basedir}/lib/axis" includes="*.jar" /> 
      <fileset dir="${basedir}/lib/rampart" includes="*.jar" /> 
<fileset dir="${grouper.lib.dir}"> 
<include name="*.jar"/> 
        <exclude name="grouper*.jar"/> 
</fileset> 
      <fileset dir="${grouper.lib.dir}/../custom"> 
        <include name="*.jar"/> 
      </fileset> 
      <fileset dir="${grouper.lib.dir}"> 
        <include name="grouperClient.jar"/> 
      </fileset> 
      <fileset file="${grouper.jar.name}" /> 
<fileset dir="${basedir}/lib/grouper-ws" includes="*.jar" /> 
      <fileset dir="${basedir}/lib/custom" includes="*.jar" /> 
<fileset dir="${dist.home}" includes="grouper-ws.jar" /> 
</copy> 

 

From: [mailto:] On Behalf Of Gagné Sébastien
Sent: Wednesday, May 02, 2012 9:48 AM
To:
Cc: Marchand Robert
Subject: [grouper-dev] Grouper .../lib/custom libraries not copied in Web Services ?

 

Hello,

I notice an error when doing some tests with Grouper’s WebService.  This was in Tomcat’s catalina.out when Grouper is starting when I accessed the WebService status page :

 

Grouper error: Cant process property hooks.group.class in resource: grouper.properties, the current value is 'ca.umontreal.dgtic.grouper.hooks.GroupUniqueExtensionHook', which should be of type: edu.internet2.middleware.grouper.hooks.GroupHooks, java.lang.RuntimeException: Problem loading class: ca.umontreal.dgtic.grouper.hooks.GroupUniqueExtensionHook

 

We added a Group Hook in the Grouper API in Grouper’s …/api/lib/custom (groupUniqueExtension.jar) and included it in grouper.properties :

hooks.group.class=ca.umontreal.dgtic.grouper.hooks.GroupUniqueExtensionHook

 

After rebuilding the web service (using ant dist or ant quick) I did a search in the web service’s dist folder and the groupUniqueExtension.jar file wasn’t found. I figured this was the problem since the WS tried to load a class that doesn’t exist. I tried to copy it in the WebService’s lib folder (WebService/build/dist/grouper-ws/WEB-INF/lib/) and the exception is gone.

 

Building the UI doesn’t have that problem, since the whole lib/custom folder (containing the Hook jar file) is copied and the hook is working properly.

 

My question :

Should the jar be copied automatically in the WS’s lib folder ? As far as a I know the whole lib/custom folder isn’t copied in the web service.

or

Should I copy it manually ? It doesn’t sound practical but my test showed that it worked

or

Should I edit grouper.property to remove the hook in the WebServices ? I don’t think so since we wouldn’t want WS transaction to create groups with the same extension.

 

Thank you all

 

 

Sébastien Gagné,     | Analyste en informatique

514-343-6111 x33844  | Université de Montréal,

                     | Pavillon Roger-Gaudry, local X-100-11

 




Archive powered by MHonArc 2.6.16.

Top of Page