Return-Path: X-Original-To: apmail-jackrabbit-dev-archive@www.apache.org Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7AF3A82F2 for ; Sat, 20 Aug 2011 06:12:42 +0000 (UTC) Received: (qmail 81590 invoked by uid 500); 20 Aug 2011 06:12:41 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 81203 invoked by uid 500); 20 Aug 2011 06:12:35 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 81185 invoked by uid 99); 20 Aug 2011 06:12:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 20 Aug 2011 06:12:29 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of suatgonul@gmail.com designates 209.85.161.42 as permitted sender) Received: from [209.85.161.42] (HELO mail-fx0-f42.google.com) (209.85.161.42) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 20 Aug 2011 06:12:22 +0000 Received: by fxe23 with SMTP id 23so5242896fxe.1 for ; Fri, 19 Aug 2011 23:11:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=7pbKZfXiM42ptEyXUFZLIky969x+xAIlqPhWBoN7/UQ=; b=rq2YLwsoI+K1Q8w5aYDv1YPm3H+HXVylj841kTDd82uOqEagK/byiQ+fkZAlqyKGKq SL6Xx3BdjBHvLNde8v4uNoKhuowNNo2rI1qrEceLgEkWx3mU+jgSyuRTzMx5Lmozzly7 ooX0LIYEW7pi6+Su/9a9ti4vpGtYylnjPYE28= MIME-Version: 1.0 Received: by 10.223.5.155 with SMTP id 27mr370867fav.90.1313820716867; Fri, 19 Aug 2011 23:11:56 -0700 (PDT) Received: by 10.223.86.73 with HTTP; Fri, 19 Aug 2011 23:11:56 -0700 (PDT) In-Reply-To: References: Date: Sat, 20 Aug 2011 09:11:56 +0300 Message-ID: Subject: Re: Failed to get values of URI typed properties From: =?ISO-8859-1?Q?Suat_G=F6n=FCl?= To: dev@jackrabbit.apache.org Content-Type: multipart/alternative; boundary=00151747b4c220a09104aae9b95c --00151747b4c220a09104aae9b95c Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 2011/8/19 Stefan Guggisberg > 2011/8/19 Suat G=F6n=FCl : > > Hi everybody, > > > > I can create a URI typed property for a node and set its value by a cod= e > > snippet as follows: > > > > Node n; > > //somehow initialize the node > > String uriprop =3D "uriprop"; > > String val =3D "http://www.example.org"; > > n.setProperty(uriprop, val, PropertyType.URI); > > > > After this code, when I try to get the value I set with the code below, > > "javax.jcr.ValueFormatException: Unknown value type 11" exception is > thrown. > > > > Property p =3D n.getProperty(uriprop); > > p.getValue(); > > > > Is this a bug, or is there any way to get values of URI typed propertie= s? > > you're accessing the repository through RMI, right? > > Yes, through RMI. > it seems that jackrabbit-jcr-rmi doesn't yet support all new JCR 2.0 > property types. > > here's the related container issue: > https://issues.apache.org/jira/browse/JCRRMI-26 > > Thanks for the pointer. I also get another exceptions regarding this issue, but I think I should wait for the implementation. Best, Suat > cheers > stefan > > > > > BTW, I also tried set the value through > > session.getValueFactory().createValue(val, PropertyType.URI), but this > code > > also throws the same exception. I also tried to obtain string value wit= h > > p.getString(), but again the same exception. > > > > As far as I see, this property is not handled in > > org.apache.jackrabbit.rmi.value.SerialValueFactory class though I am no= t > > sure it is the exact responsible class from the property value retrieva= l. > > > > Best, > > Suat > --00151747b4c220a09104aae9b95c Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

2011/8/19 Stefan Guggisberg <stefan.guggisberg@= gmail.com>
2011/8/19 Suat G=F6n=FCl <suatgon= ul@gmail.com>:
> Hi everybody,
>
> I can create a URI typed property for a node and set its value by a co= de
> snippet as follows:
>
> Node n;
> //somehow initialize the node
> String uriprop =3D "uriprop";
> String val =3D "http://www.example.org";
> n.setProperty(uriprop, val, PropertyType.URI);
>
> After this code, when I try to get the value I set with the code below= ,
> "javax.jcr.ValueFormatException: Unknown value type 11" exce= ption is thrown.
>
> Property p =3D n.getProperty(uriprop);
> p.getValue();
>
> Is this a bug, or is there any way to get values of URI typed properti= es?

you're accessing the repository through RMI, right?


Yes, through RMI.
=A0
it seems that jackrabbit-jcr-rmi d= oesn't yet support all new JCR 2.0
property types.

here's the related container issue:
https://issues.apache.org/jira/browse/JCRRMI-26


Thanks for the pointer. I also get another except= ions regarding this issue, but I think I should wait for the implementation= .

Best,
Suat
=A0
cheers
stefan

>
> BTW, I also tried set the value through
> session.getValueFactory().createValue(val, PropertyType.URI), but this= code
> also throws the same exception. I also tried to obtain string value wi= th
> p.getString(), but again the same exception.
>
> As far as I see, this property is not handled in
> org.apache.jackrabbit.rmi.value.SerialValueFactory class though I am n= ot
> sure it is the exact responsible class from the property value retriev= al.
>
> Best,
> Suat

--00151747b4c220a09104aae9b95c--