Another option would be to use a RESTEasy specific convention and use a 
StringConverter or StringParamUnmarshaller to give you complete control over 
how the date string is being converted into a java.util.Date. Doc are here:

http://docs.jboss.org/resteasy/docs/2.3.1.GA/userguide/html/StringConverter.html

I've done something similar with JodaTime, but it is possible to do the same 
thing with java.util.Date. At the very least, both of these approaches give you 
control on how the date string is being parsed into a java.util.Date, thus 
making these problems easier to debug.

Ryan-



On Feb 27, 2012, at 12:28 PM, Terry Jennings wrote:

> java.util.Date(String) is deprecated.  Sounds like it doesn't work in some 
> locales.  Any chance to change it to something not deprecated?
> 
> thanks,
> Terry
> 
> On 02/23/2012 11:33 AM, Bill Burke wrote:
>> Well, its going to try and parse the date by calling:
>> 
>> new java.util.Date(queryParamValue);
>> 
>> Micro-test the possible queryParam value with that constructor call.
>> That should reproduce your problem.
>> 
>> On 2/23/12 1:14 PM, Terry Jennings wrote:
>>> Using RestEasy 2.3.1GA running in Tomcat.
>>> 
>>> We are getting the following error in one locale (Ireland), but not in
>>> another (US). On the client side, we are using the client proxy and it
>>> converts a java.util.Date into a String.
>>> 
>>> Any ideas where we are going off the tracks?
>>>> *type* Status report
>>>> 
>>>> *message* _Unable to extract parameter from http request:
>>>> javax.ws.rs.QueryParam("startTimestamp") value is 'Tue Jun 01 00:00:00
>>>> BST 2010' for public abstract javax.ws.rs.core.Response
>>>> com.avaya.cca.common.api.IccarestAPI.getAgentGroupMembers(java.lang.String,java.lang.String,java.lang.String,java.util.Date,java.util.Date,java.lang.String)_
>>>> 
>>>> *description* _The request sent by the client was syntactically
>>>> incorrect (Unable to extract parameter from http request:
>>>> javax.ws.rs.QueryParam("startTimestamp") value is 'Tue Jun 01 00:00:00
>>>> BST 2010' for public abstract javax.ws.rs.core.Response
>>>> com.avaya.cca.common.api.IccarestAPI.getAgentGroupMembers(java.lang.String,java.lang.String,java.lang.String,java.util.Date,java.util.Date,java.lang.String))._
>>>> 
>>> thanks,
>>> Terry
>>> --
>>> 
>>> Terry Jennings | Consulting Engineer | Avaya, Inc. | 1300 W. 120th Ave.
>>> | Westminster, CO. 80234
>>> Voice: 303 538-5047 Email: tjenni...@avaya.com
>>> 
>>> 
>>> 
>>> ------------------------------------------------------------------------------
>>> Virtualization&   Cloud Management Using Capacity Planning
>>> Cloud computing makes use of virtualization - but cloud computing
>>> also focuses on allowing computing to be delivered as a service.
>>> http://www.accelacomm.com/jaw/sfnl/114/51521223/
>>> 
>>> 
>>> 
>>> _______________________________________________
>>> Resteasy-users mailing list
>>> Resteasy-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/resteasy-users
> 
> -- 
> 
> Terry Jennings | Consulting Engineer | Avaya, Inc. | 1300 W. 120th Ave. | 
> Westminster, CO. 80234
> Voice: 303 538-5047 Email: tjenni...@avaya.com
> 
> 
> ------------------------------------------------------------------------------
> Try before you buy = See our experts in action!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-dev2
> _______________________________________________
> Resteasy-users mailing list
> Resteasy-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/resteasy-users


------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Resteasy-users mailing list
Resteasy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/resteasy-users

Reply via email to