Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error Adding News to Channel

Status
Not open for further replies.

awiesauer

Programmer
Oct 30, 2005
7
AT
Hello,

I'm trying to add a news item to a channel by using Java LAPI.

here is my method:

LLValue newsType = new LLValue().setAssoc();
LLValue createInfo = new LLValue().setAssocNotSet();

//set values of newsType
LLValue request = new LLValue().setAssoc();
request.add("Story", news.getStory());
request.add("DateEffective", news.getEffectiveDate());
request.add("DateExpiration", news.getExpirationDate());
request.add("Headline", news.getHeadline());
request.add("IMG_ID", 0);
request.add("Comment", "-");

newsType.add("Request", request);

try {

System.out.println("Beginning to add News...");

status = documents.CreateObjectEx(parentVolumeID,
parentObjectID,
documents.OBJECTTYPE,
documents.NEWSSUBTYPE,
news.getName(),
newsType,
createInfo
);


if (status != 0) {

//error occurred

throw new Exception(this.getLivelinkErrorMessage());
}


}
catch (Exception e) {
System.out.println("Exception occured...");
//forward Exception
throw e;
}

I get an error message from Livelink: "Error Creating node , Status: 101103".

What does it mean? I can't find any error (the rights on the channel are ok and the name of the news item is unique.)

Thanks for your help!
 
have you looked at the error details in the LLSESSION object ? this should give you an error message and some details about the issue.


Greg Griffiths
Livelink Certified Developer & ECM Global Star Champion 2005
 
We looked at the CreateObjectEX code that executes and the 101103 error is returned after a call to "_MergeCatVersionListIntoAttrData" which is manipulating category information. This is followed by a check of required attributes and then the actual node (news item) creation call. If any of these fail you get the error you are seeing. So, we would guess you probably have some required attributes on the category that are not being populated.

The only efficient way to really figure out what is going on is to put a debug break in the Builder code and trace through the execution to see where the failure is. If you haven't done this before check out the Tips and Tricks page on our website which has a feature called "Debugging LAPI Errors Can Actually be Simple" at
If you have specific questions on debugging this you can send the code to our support email address and we can take a look at it for you. Our guess is that is probably data related.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top