Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
ListMembers not working
Nick_Innes_(apacsuser4_-_(deleted))
Hi,I am trying to find out which users are members of a particular group and have called ListMembers to do this. However the following error is produced. I am using Java. If anyone has a Java example or knows how to get round the error that would be appreciated.com.opentext.api.LLIllegalOperationException: get(n,name) not implemented for this datatype at com.opentext.api.LLInstance.get(LLInstance.java:85) at com.opentext.api.LLValue.toInteger(LLValue.java:864)I have attached the relevant bits of my code below. LLValue table = ( new LLValue() ).setAssocNotSet(); LAPI_USERS users = new LAPI_USERS( session ); int result = users.ListMembers( GROUP, "A Test Group", table ); id = table.toInteger( i, "ID" ); System.out.println("ID "+i+id); str = table.toString( i, "Name" ); gtype = table.toInteger( i, "Type" );Thanks
Find more posts tagged with
Comments
Howard_Pell
Message from Howard Pell <
hlpell@opentext.com
> via eLink
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">eLink
Nick,
It appears you have taken the code from the user and group exercise in the Introduction to LAPI training course; however it also appears you have removed some critical code (if the code below is exactly what you are trying to run). I suspect the error is coming from unset or incorrect
values for 'GROUP' and 'i'.
May I suggest you re-examine the original code and see how I set the values of these variables?
Howard
Howard Pell
Senior Technical Educator
Liaison, Special Projects
Open Text Corporation
www.opentext.com
(519) 888-7111 Ext. 2203
Education is for improving the lives of others and for leaving your community and world better than you found it.
- Marian Wright Edelman
From:
eLink Discussion: LAPI Discussion [mailto:lapi@elinkkc.opentext.com]
Sent:
Wednesday, September 20, 2006 5:57 AM
To:
eLink Recipient
Subject:
ListMembers not working
ListMembers not working
Posted by
apacsuser4
(Innes, Nick) on 09/20/2006 05:56 AM
Hi,
I am trying to find out which users are members of a particular group and have called ListMembers to do this. However the following error is produced. I am using Java. If anyone has a Java example or knows how to get round the error that would be appreciated.
com.opentext.api.LLIllegalOperationException: get(n,name) not implemented for this datatype
at com.opentext.api.LLInstance.get(LLInstance.java:85)
at com.opentext.api.LLValue.toInteger(LLValue.java:864)
I have attached the relevant bits of my code below.
LLValue table = ( new LLValue() ).setAssocNotSet();
LAPI_USERS users = new LAPI_USERS( session );
int result = users.ListMembers( GROUP, "A Test Group", table );
id = table.toInteger( i, "ID" );
System.out.println("ID "+i+id);
str = table.toString( i, "Name" );
gtype = table.toInteger( i, "Type" );
Thanks
eLink User
Message from Carsten Kulms via eLinkErrors "... not implemented for this datatype" occur if you use one ofLLValue's field retrieval methods not applicable for the actual datatype of the LLValue object.I guess the ListMembers call failed and so the return value "table" wasnot set. Since "table" was initialized being of type Assoc the methodget(int, String) is not supported.You should check the return value of LAPI functions if the execution wassuccessfull. In case of an error (return value != 0) the used LLSessionobject provides detailed information (e.g. by LLSession.getApiError()and LLSession.getErrMsg()).
eLink User
Message from Nair, Krishnankutty [Contractor] via eLinkWell said. As for examples here they are...I posted this
http://www.greggriffiths.org/livelink/development/lapi/userlist/
a whileback but it does show you how to enumerate some of the keys.The errorsare probably because of accessing the member data structure incorrectlyWithout seeing whether or not the status of the api call is correct ornot.I also quickly hacked the above code (not pretty or prod worthy or proudand posted this here at the community wiki area)
http://communities.opentext.com/communities/livelink.exe/wiki/162164/LAPI-Code Snippets-----Original
Message-----From: eLink Discussion: LAPI Discussion[mailto:lapi@elinkkc.opentext.com] Sent: Wednesday, September 20, 2006 7:43 AMTo: eLink RecipientSubject: RE ListMembers not working 2RE ListMembers not working 2Posted by eLink on 09/20/2006 08:43 AMMessage from Carsten Kulms via eLinkErrors "... not implemented for this datatype" occur if you use one ofLLValue's field retrieval methods not applicable for the actual datatype of the LLValue object.I guess the ListMembers call failed and so the return value "table" wasnot set. Since "table" was initialized being of type Assoc the methodget(int, String) is not supported.You should check the return value of LAPI functions if the execution wassuccessfull. In case of an error (return value != 0) the used LLSessionobject provides detailed information (e.g. by LLSession.getApiError()and LLSession.getErrMsg()).[To reply to this thread, use your normal E-mail reply function.]============================================================Topic: ListMembers not working
https://knowledge.opentext.com/knowledge/llisapi.dll/open/8088928Discussion
: LAPI Discussion
https://knowledge.opentext.com/knowledge/llisapi.dll/open/765428Livelink
Server:
https://knowledge.opentext.com/knowledge/llisapi.dllTo
Unsubscribe from this Discussion, send an e-mail tounsubscribe.lapi@elinkkc.opentext.com.-----------------------------------------*Please note my E-Mail Address has changed. Please update yourcontact list*Anadarko Confidentiality Notice: This electronic transmission and any attached documents or otherwritings are intended only for the person or entity to which it isaddressed and may contain information that is privileged,confidential or otherwise protected from disclosure. If you havereceived this communication in error, please immediately notifysender by return e-mail and destroy the communication. Anydisclosure, copying, distribution or the taking of any actionconcerning the contents of this communication or any attachments byanyone other than the named recipient is strictly prohibited.
eLink User
Message from Carsten Kulms via eLinkSince there seems to be a demand for LAPI examples I add one, too.(Java)No production quality, it may serve as a `template` for your own quick'ndirty tools / experiments.NOTE: The attached code is provided "as is" without warranty of anykind, either expressed or implied, including, but not limited to, theimplied warranties of merchantability and fitness for a particularpurpose.
eLink User
Message from Nair, Krishnankutty [Contractor] via eLinkExcellent sample,I will use this template for my smaples now on...There has always been demand for proper working examples.Most oftenlapi programming is done by modern day programmersWho have an aversion to llvalue(aka data structures) and livelink.Theyare hired by departments who use livelink and would like to "addfunctionality?" to livelink.Most often the programmer only has lapi andhas never seen livelink.LAPI programmers miss always on the boat thatmost everything you can accomplish thru the GUI you can do via lapi.Tome both livelink oscript and lapi are very well implemented,but if youwanted people to like programming via lapi you need to provide welldocumented short examples.I have been trying to put some samples outthere thinking that it may help others and stop this ridiculing aboutlapi.-----Original Message-----From: eLink Discussion: LAPI Discussion[mailto:lapi@elinkkc.opentext.com] Sent: Wednesday, September 20, 2006 9:50 AMTo: eLink RecipientSubject: another example / RE RE RE ListMembers not working 2another example / RE RE RE ListMembers not working 2 Posted by eLink on09/20/2006 10:50 AMMessage from Carsten Kulms via eLinkSince there seems to be a demand for LAPI examples I add one, too.(Java)No production quality, it may serve as a `template` for your own quick'ndirty tools / experiments.NOTE: The attached code is provided "as is" without warranty of anykind, either expressed or implied, including, but not limited to, theimplied warranties of merchantability and fitness for a particularpurpose.[To reply to this thread, use your normal E-mail reply function.]============================================================Attachment link: ListMembers.java
https://knowledge.opentext.com/knowledge/llisapi.dll/open/8101037============================================================Topic
: ListMembers not working
https://knowledge.opentext.com/knowledge/llisapi.dll/open/8088928Discussion
: LAPI Discussion
https://knowledge.opentext.com/knowledge/llisapi.dll/open/765428Livelink
Server:
https://knowledge.opentext.com/knowledge/llisapi.dllTo
Unsubscribe from this Discussion, send an e-mail tounsubscribe.lapi@elinkkc.opentext.com.-----------------------------------------*Please note my E-Mail Address has changed. Please update yourcontact list*Anadarko Confidentiality Notice: This electronic transmission and any attached documents or otherwritings are intended only for the person or entity to which it isaddressed and may contain information that is privileged,confidential or otherwise protected from disclosure. If you havereceived this communication in error, please immediately notifysender by return e-mail and destroy the communication. Anydisclosure, copying, distribution or the taking of any actionconcerning the contents of this communication or any attachments byanyone other than the named recipient is strictly prohibited.