<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16890" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=082262518-13082009><FONT face=Arial size=2>Hi
everyone</FONT></SPAN></DIV>
<DIV><SPAN class=082262518-13082009><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=082262518-13082009><FONT face=Arial size=2>I'm trying to
programatically add a relation between two resources, and things are not going
so well.</FONT></SPAN></DIV>
<DIV><SPAN class=082262518-13082009><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=082262518-13082009><FONT face=Arial size=2>What I want to do is
establish a relation between an xmlcontents type resource (structured
content) and an image resource, so that the image gets published
when the xmlcontents file is published with related resources. This
is actually quite important, because many editors forget to
publish images, resulting in an error message for any user who's not logged
in... </FONT></SPAN></DIV>
<DIV><SPAN class=082262518-13082009><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=082262518-13082009><FONT face=Arial size=2>I'm putting my code
inside a Java class method that creates the image (thumbnail) resource.
</FONT></SPAN><SPAN class=082262518-13082009><FONT face=Arial size=2>When using
the call like this (tried other CmsRelationTypes as well, same
result):</FONT></SPAN></DIV>
<DIV><SPAN class=082262518-13082009><FONT face="Courier New"
size=2>cmso.addRelationToResource("/en/index.html", "/images/thumbs/image.jpg",
CmsRelationType.JSP_WEAK.getName());</FONT></SPAN></DIV>
<DIV><SPAN class=082262518-13082009><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=082262518-13082009><FONT face=Arial size=2>I get the following
error:</FONT></SPAN></DIV>
<DIV><SPAN class=082262518-13082009><SPAN class=Apple-style-span
style="WORD-SPACING: 0px; FONT: 16px 'Times New Roman'; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate; orphans: 2; widows: 2; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"><SPAN
class=Apple-style-span style="FONT-SIZE: 11px; FONT-FAMILY: Verdana"><FONT
face="Courier New" size=2>Error while adding a relation from resource
"/en/index.html" to resource "/images/thumbs/image.jpg" with type
"JSP_WEAK".</FONT></SPAN></SPAN></SPAN></DIV>
<DIV><SPAN class=082262518-13082009><SPAN class=Apple-style-span
style="WORD-SPACING: 0px; FONT: 16px 'Times New Roman'; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate; orphans: 2; widows: 2; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"><SPAN
class=Apple-style-span style="FONT-SIZE: 11px; FONT-FAMILY: Verdana"><FONT
face="Courier New" size=2></FONT></SPAN></SPAN></SPAN> </DIV>
<DIV><SPAN class=082262518-13082009><SPAN class=Apple-style-span
style="WORD-SPACING: 0px; FONT: 16px 'Times New Roman'; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate; orphans: 2; widows: 2; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"><SPAN
class=Apple-style-span style="FONT-SIZE: 11px; FONT-FAMILY: Verdana"><FONT
face=Arial size=2>Can anyone tell me what I'm doing
wrong - and/or show me how it's
done?</FONT></SPAN></SPAN></SPAN></DIV>
<DIV><SPAN class=082262518-13082009><SPAN class=Apple-style-span
style="WORD-SPACING: 0px; FONT: 16px 'Times New Roman'; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate; orphans: 2; widows: 2; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"><SPAN
class=Apple-style-span style="FONT-SIZE: 11px; FONT-FAMILY: Verdana"><FONT
face=Arial size=2></FONT></SPAN></SPAN></SPAN> </DIV>
<DIV><SPAN class=082262518-13082009><SPAN class=Apple-style-span
style="WORD-SPACING: 0px; FONT: 16px 'Times New Roman'; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate; orphans: 2; widows: 2; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"><SPAN
class=Apple-style-span style="FONT-SIZE: 11px; FONT-FAMILY: Verdana"><FONT
face=Arial size=2>Cheers,</FONT></SPAN></SPAN></SPAN></DIV>
<DIV><SPAN class=082262518-13082009><SPAN class=Apple-style-span
style="WORD-SPACING: 0px; FONT: 16px 'Times New Roman'; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate; orphans: 2; widows: 2; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"><SPAN
class=Apple-style-span style="FONT-SIZE: 11px; FONT-FAMILY: Verdana"><FONT
face=Arial size=2>Paul</FONT></SPAN></SPAN></SPAN></DIV></BODY></HTML>