cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kanwar Manish <kanwarman...@gmail.com>
Subject Stumps me.....Error "java.lang.String cannot be cast to java.util.UUID"
Date Thu, 05 Jul 2012 12:46:34 GMT
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message