Return-Path: X-Original-To: apmail-cayenne-user-archive@www.apache.org Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0DD20DE9B for ; Thu, 19 Jul 2012 11:23:14 +0000 (UTC) Received: (qmail 39212 invoked by uid 500); 19 Jul 2012 11:23:13 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 39071 invoked by uid 500); 19 Jul 2012 11:23:12 -0000 Mailing-List: contact user-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cayenne.apache.org Delivered-To: mailing list user@cayenne.apache.org Received: (qmail 39020 invoked by uid 99); 19 Jul 2012 11:23:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Jul 2012 11:23:10 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FSL_RCVD_USER,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of kanwarmanish@gmail.com designates 209.85.214.171 as permitted sender) Received: from [209.85.214.171] (HELO mail-ob0-f171.google.com) (209.85.214.171) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Jul 2012 11:23:05 +0000 Received: by obqv19 with SMTP id v19so8354524obq.16 for ; Thu, 19 Jul 2012 04:22:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=amY4pVlmE1y/9iQ0vQFveArrmTj9jN8Q3MXGrZYKUwo=; b=DvrXrZQsd+NwG4EXpYlYCFcd/6wYqGxb26xRLn1gPkoEommPSBeQ9SZs8P1opm5Vif c9JQg66PLDEc80ET7tnd4/ZIxqv4MVvAMKLy+snCA3fOhlzkv8z7/CMvYeZsV9/Gzhph e3WleG5HPAeZF6m6uDstd4m/qkgYbw5mt6HcRkrqpDf1meQb+sgydehRSFlmQTXgzPlB jaNgjhvu9o2njhr7UphT5i4TIzvFqr5l1Mwu9VTyahGZa8mzElndvemKVhNvZYAvJiX/ DJZY1Bkzlh4dUk4PKAIPhB7bOJc4FxG6M78fx57+aQ36AEpqUzjnQg/ACd4QF649H3Au zOxw== MIME-Version: 1.0 Received: by 10.182.17.42 with SMTP id l10mr2008714obd.52.1342696964936; Thu, 19 Jul 2012 04:22:44 -0700 (PDT) Received: by 10.182.74.230 with HTTP; Thu, 19 Jul 2012 04:22:44 -0700 (PDT) In-Reply-To: <072B00D6-2E85-4D7D-B816-701DE41ACE4C@objectstyle.org> References: <072B00D6-2E85-4D7D-B816-701DE41ACE4C@objectstyle.org> Date: Thu, 19 Jul 2012 16:52:44 +0530 Message-ID: Subject: Re: Stumps me.....Error "java.lang.String cannot be cast to java.util.UUID" From: Kanwar Manish To: user@cayenne.apache.org Content-Type: multipart/alternative; boundary=f46d0445172fa2d41a04c52cff25 X-Virus-Checked: Checked by ClamAV on apache.org --f46d0445172fa2d41a04c52cff25 Content-Type: text/plain; charset=ISO-8859-1 Sorry for a late reply. It was duh moment for me. Just made the column type as varchar and it worked. It was char earlier. Thanks for your time. KM On Tue, Jul 17, 2012 at 12:41 AM, Andrus Adamchik wrote: > Hi, > > so how is this entity mapped? > > Andrus > > On Jul 5, 2012, at 3:46 PM, Kanwar Manish wrote: > > > Hi Guys > > > > The statement inside the try block is causing the issue. At the end - > code > > from the object UserMaster is also copied. > > > > if ((username!=null) && (!loggedIn)) > > { > > DataContext dc = blgetcontext.getDatacontext(); > > > > logger.info(loginquery.toString()); > > List ls = dc.performQuery(loginquery); > > > > if ((ls == null) || ls.isEmpty() || ls.size()<1) > > result = true; > > else > > { > > result = false; > > this.currentuser = ((UserMaster)ls.get(0)); > > try > > { > > this.userid = this.currentuser.getUserMasterId(); > > } > > catch(Exception ex) > > { > > String s = ex.getMessage(); > > } > > > > } > > } > > > > > > Code for the UserMaster Object..... > > > > public UUID getUserMasterId() { > > return (UUID)readProperty("userMasterId"); > > } > > > > Thanks for all the help. > > Cheers > > KM > > --f46d0445172fa2d41a04c52cff25--