Forum OpenACS Q&A: Response to Problem adding groups.

Collapse
Posted by Kevin Crosbie on

Hi Janus,

Here are two ways that I got rid of this problem.

1. Re-install OACS, install only the packages that you need. It only appeared the first time I installed, as I did an install and mount of every package on the system.

2. When a group type is created, a table called (what_you_named_it)_EXT and a package with a new and a delete procedure get created. If you look at the new() procedure, you will notice that it is expecting a parameter for LDAP.

If you use something like toad to change your package, you can remove the parameter for LDAP.

Here is an example of what the package looks like(You need to change MY_GROUP to whatever your group_type name is). You should be able to save this to a .sql file and run sqlplus dbpass/dbpass < .sqlfile

**Note** Try to save the origional package if you can. This will overwrite it.

package my_group as

  --/** THIS IS AN AUTO GENERATED PACKAGE. Kevin Crosbie was the
  --    user who created it
  --
  --    @creation-date 2002-04-02
  --*/

  function new (
         GROUP_ID        IN MY_GROUP_EXT.GROUP_ID%TYPE DEFAULT NULL,
         GROUP_NAME      IN GROUPS.GROUP_NAME%TYPE,
         EMAIL           IN PARTIES.EMAIL%TYPE DEFAULT NULL,
         URL             IN PARTIES.URL%TYPE DEFAULT NULL,
         OBJECT_TYPE     IN ACS_OBJECTS.OBJECT_TYPE%TYPE DEFAULT 'my_group',
         CREATION_DATE   IN ACS_OBJECTS.CREATION_DATE%TYPE DEFAULT sysdate,
         CREATION_IP     IN ACS_OBJECTS.CREATION_IP%TYPE DEFAULT NULL,
         LAST_MODIFIED   IN ACS_OBJECTS.LAST_MODIFIED%TYPE DEFAULT sysdate,
         MODIFYING_IP    IN ACS_OBJECTS.MODIFYING_IP%TYPE DEFAULT NULL,
         CREATION_USER   IN ACS_OBJECTS.CREATION_USER%TYPE DEFAULT NULL,
         CONTEXT_ID      IN ACS_OBJECTS.CONTEXT_ID%TYPE DEFAULT NULL,
         JOIN_POLICY     IN GROUPS.JOIN_POLICY%TYPE DEFAULT NULL
 ) return MY_GROUP_EXT.GROUP_ID%TYPE;

 procedure delete (
   GROUP_ID      in MY_GROUP_EXT.GROUP_ID%TYPE
 );
 
END my_group;

package body my_group
as

  --/** THIS IS AN AUTO GENERATED PACKAGE. Kevin Crosbie was the
  --    user who created it
  --
  --    @creation-date 2002-04-02
  --*/

  function new (
         GROUP_ID        IN MY_GROUP_EXT.GROUP_ID%TYPE DEFAULT NULL,
         GROUP_NAME      IN GROUPS.GROUP_NAME%TYPE,
         EMAIL           IN PARTIES.EMAIL%TYPE DEFAULT NULL,
         URL             IN PARTIES.URL%TYPE DEFAULT NULL,
         OBJECT_TYPE     IN ACS_OBJECTS.OBJECT_TYPE%TYPE DEFAULT 'my_group',
         CREATION_DATE   IN ACS_OBJECTS.CREATION_DATE%TYPE DEFAULT sysdate,
         CREATION_IP     IN ACS_OBJECTS.CREATION_IP%TYPE DEFAULT NULL,
         LAST_MODIFIED   IN ACS_OBJECTS.LAST_MODIFIED%TYPE DEFAULT sysdate,
         MODIFYING_IP    IN ACS_OBJECTS.MODIFYING_IP%TYPE DEFAULT NULL,
         CREATION_USER   IN ACS_OBJECTS.CREATION_USER%TYPE DEFAULT NULL,
         CONTEXT_ID      IN ACS_OBJECTS.CONTEXT_ID%TYPE DEFAULT NULL,
         JOIN_POLICY     IN GROUPS.JOIN_POLICY%TYPE DEFAULT NULL
  ) return MY_GROUP_EXT.GROUP_ID%TYPE
  is
    v_GROUP_ID MY_GROUP_EXT.GROUP_ID%TYPE;
  begin

    v_GROUP_ID := acs_group.new (
                     group_id         => new.GROUP_ID,
                     GROUP_NAME       => new.GROUP_NAME,
                     EMAIL            => new.EMAIL,
                     URL              => new.URL,
                     OBJECT_TYPE      => new.OBJECT_TYPE,
                     CREATION_DATE    => new.CREATION_DATE,
                     CREATION_IP      => new.CREATION_IP,
                     CREATION_USER    => new.CREATION_USER,
                     CONTEXT_ID       => new.CONTEXT_ID,
                     JOIN_POLICY      => new.JOIN_POLICY
                   );

    insert into MY_GROUP_EXT
    (GROUP_ID)
    values
    (v_GROUP_ID);

    return v_GROUP_ID;

  end new;

  procedure delete (
    GROUP_ID      in MY_GROUP_EXT.GROUP_ID%TYPE
  )
  is
  begin

    acs_group.delete( my_group.delete.GROUP_ID );

  end delete;

end my_group;