Hi. Thanks for the prompt reply.

I am using the following:

org.restlet.jar
And for the ext. I am using the following
1.fileupload
2.slf4j
3.xml
4.servlet

This on the server side..

On the client side I have org.restlet.jar only..

------------------------
I will also try your work around that you sent regarding returning the
String instead of UUID and get back to you with the results. However it
would be great if the problem solves at an architecture level and not
specific to this class only.

On Mon, Mar 16, 2015 at 7:51 PM, Thierry Boileau-4 [via Restlet Discuss] <
[email protected]> wrote:

> 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 <[hidden email]
> <http:///user/SendEmail.jtp?type=node&node=7579360&i=0>>:
>
>> 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 <[hidden email]
>> <http:///user/SendEmail.jtp?type=node&node=7579360&i=1>>:
>>
>>> 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 • [hidden email]
>> <http:///user/SendEmail.jtp?type=node&node=7579360&i=2>
>>
>> <http://restlet.com/>
>> 6 Rue Rose Dieng-Kuntz • Nantes, 44300 • France
>>
>
>
>
> --
> *Thierry Boileau, Mr B*
> +1 (408) 387-3184 • [hidden email]
> <http:///user/SendEmail.jtp?type=node&node=7579360&i=3>
>
> <http://restlet.com/>
> 6 Rue Rose Dieng-Kuntz • Nantes, 44300 • France
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://restlet-discuss.1400322.n2.nabble.com/Unable-to-find-converter-for-java-util-UUID-tp7579358p7579360.html
>  To unsubscribe from Unable to find converter for java.util.UUID, click
> here
> <http://restlet-discuss.1400322.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=7579358&code=Y2hpcmF5dUBwdXJwbGVkb2NzLmNvbXw3NTc5MzU4fDIwOTYxNjc5MDU=>
> .
> NAML
> <http://restlet-discuss.1400322.n2.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>



-- 
-Regards,
-Chirayu Desai




--
View this message in context: 
http://restlet-discuss.1400322.n2.nabble.com/Unable-to-find-converter-for-java-util-UUID-tp7579358p7579363.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.

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

Reply via email to