Hi,

a workaround is to return a String instance:

public UUID authenticateUser(String username, String passwd) {

[...]
return resource.loginUser().toString();
[...]
}

Best regards,
Thierry Boileau

2015-03-16 15:12 GMT+01:00 Thierry Boileau <tboil...@restlet.com>:

> Hello,
>
> could you tell us what kind of converters are you using on server side,
> and those on client side?
> If this question is not clear, could you send us the list of extensions
> used on both side (all jars like org.restlet.ext.*).
>
> Best regards,
> Thierry Boileau
>
> 2015-03-16 12:30 GMT+01:00 Chirayu Desai <chir...@purpledocs.com>:
>
>> I am working on a client server application. I was using Restlet 2.0.3.
>> Due
>> to a heavy load task my client was getting timed-out. I searched on the
>> forum and found that switching over to Restlet 2.2 would help. So I did
>> that. I upgraded my Restlet to 2.2.1. But now my code has stopped working
>> at
>> precisely this method.
>>
>> *public synchronized UUID generateUniqueSessionId(String userAtDomain)
>>     {
>>         UUID newSessionId = UUID.randomUUID();
>>         SessionAttributes sessionAttributes = new SessionAttributes();
>>         sessionAttributes.setAlive(true);
>>         sessionAttributes.setFQUserName(userAtDomain);
>>         loggedInUsers.put(newSessionId, sessionAttributes);
>>         return newSessionId;
>>     }*
>> So I am returning the UUID at last. This code is on the server and invoked
>> during login. Following is the error that I am getting from the logs.
>>
>> *16 Mar 2015 11:23:18 WARN - Unable to find a converter for this object :
>> f3d2edda-443c-454d-856a-fb4e7ed9c535*
>>
>> And this object referred in the log belongs to java.util.UUID
>>
>> The code on the client side which invokes the server looks like this.
>>
>> *public UUID authenticateUser(String username, String passwd) {
>>
>>         try {
>>             String url =
>> RESTLetWebSvcsFactory.getFactoryInstance().getServer_URL() + "login/" +
>> username + "/" + passwd;
>>
>>             Context context = new Context();
>>
>>             Client client = new Client(context, Protocol.HTTP);
>>             ClientHelper helper = new ClientHelper(client);
>>             helper.getHelpedParameters().set("socketConnectTimeoutMs",
>> "60000");
>>
>>             ClientResource cr = new ClientResource(url);
>>             LoginLogoutResource resource =
>> cr.wrap(LoginLogoutResource.class);
>>             return resource.loginUser();
>>         } catch (ResourceException re) {
>>             if (re.getStatus().isConnectorError()) {
>>                 try {
>>                     RESTLetWebSvcsFactory.enableFallBackServer();
>>                     String url =
>> RESTLetWebSvcsFactory.getFactoryInstance().getServer_URL() + "login/" +
>> username + "/" + passwd;
>>                     ClientResource cr = new ClientResource(url);
>>                     LoginLogoutResource resource =
>> cr.wrap(LoginLogoutResource.class);
>>                     return resource.loginUser();
>>                 } catch (ResourceException re1) {
>>                     int statusCode = new
>> RESTLetErrorHandler().handleServerError(re);
>>                     if (statusCode != -1) {
>>                         throw new UserCRUDException(statusCode);
>>                     }
>>                 }
>>             } else {
>>                 throw new UserCRUDException(new
>> RESTLetErrorHandler().handleServerError(re));
>>             }
>>         }
>>         return null;
>>     }*
>> Note: USERCRUDException is my own exception and not one of JAVA
>>
>> Please help me resolve this problem which probably prevents returning the
>> UUID from the server and thus my application isn't moving ahead.
>>
>> Thanks in advance
>>
>>
>>
>> --
>> View this message in context:
>> http://restlet-discuss.1400322.n2.nabble.com/Unable-to-find-converter-for-java-util-UUID-tp7579358.html
>> Sent from the Restlet Discuss mailing list archive at Nabble.com.
>>
>> ------------------------------------------------------
>>
>> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3105559
>>
>
>
>
> --
> *Thierry Boileau, Mr B*
> +1 (408) 387-3184 • tboil...@restlet.com
>
> <http://restlet.com/>
> 6 Rue Rose Dieng-Kuntz • Nantes, 44300 • France
>



-- 
*Thierry Boileau, Mr B*
+1 (408) 387-3184 • tboil...@restlet.com

<http://restlet.com/>
6 Rue Rose Dieng-Kuntz • Nantes, 44300 • France

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3105600

Reply via email to