You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by an...@kattare.com on 2007/03/27 17:11:37 UTC

Re: Locale issues?

All,

Further to the series of emails I sent to the list earlier last week - I
am happy to report that the issue has been resolved. You may recall
there was an issue parsing a date when setting the value of an
attribute on one of my objects. It worked fine on my local environment
and not on my service provider's server. The issue was actually to do
with there being two setter methods on my object - both with the same
name but taking parameters of different types - one 'Date' and one
'String'. My local environment was using the correct setter method. The
service provider's environment was using the incorrect 'String' setting
method, which caused the parse exception. I have no idea why one used
the correct one and one not - perhaps someone can enlighten me about
that?

Thanks for everyone's efforts though. Trying some of the suggestions led
me to the issue - so I am most grateful to all those who posted
responses to my pleas for help!

Best regards, Andrew

Re: Locale issues?

Posted by an...@kattare.com.
Ted,

Cheers for your comment. I would have told everyone earlier still should
I not have contracted a cold......

Best regards,
Andrew



Quoting Ted Schrader <te...@gmail.com>:

> A gold star for Andrew for taking the time to tell us how things were
> resolved.
>
> Ted
>
> On 28/03/07, andrew.kitchen@kattare.com <an...@kattare.com>
> wrote:
> > Hi,
> >
> > If the JavaBean spec specifies that only one setter method can be
> > defined per attribute, therefore no overloading, then yes I am
> breaking
> > it. Well I was - I am not now as I have altered the code but I have
> just
> > slapped myself on the wrist for the initial error ;-)
> >
> > The JVMs are different too.
> >
> > Thanks,
> > Andrew
> >
> >
> >
> > Quoting Graeme J Sweeney <ib...@gjsweeney.com>:
> >
> > > On Tue, 27 Mar 2007, andrew.kitchen@kattare.com wrote:
> > >
> > > > The issue was actually to do
> > > > with there being two setter methods on my object - both with
> the
> > > same
> > > > name but taking parameters of different types - one 'Date' and
> one
> > > > 'String'. My local environment was using the correct setter
> method.
> > > The
> > > > service provider's environment was using the incorrect 'String'
> > > setting
> > > > method, which caused the parse exception. I have no idea why
> one
> > > used
> > > > the correct one and one not - perhaps someone can enlighten me
> > > about
> > > > that?
> > >
> > > Are you breaking the JavaBean spec?
> > >
> > > void setDate(Date)
> > > void setDate(String)
> > > Date getDate()
> > >
> > > I'm no reflection expert but according to the API docs the
> methods
> > > found in a class aren't returned in any particular order.
> > >
> > > Were both JVM versions were the same?
> > >
> > > --
> > > Graeme -
> > >
> >
> >
>


Re: Locale issues?

Posted by Ted Schrader <te...@gmail.com>.
A gold star for Andrew for taking the time to tell us how things were resolved.

Ted

On 28/03/07, andrew.kitchen@kattare.com <an...@kattare.com> wrote:
> Hi,
>
> If the JavaBean spec specifies that only one setter method can be
> defined per attribute, therefore no overloading, then yes I am breaking
> it. Well I was - I am not now as I have altered the code but I have just
> slapped myself on the wrist for the initial error ;-)
>
> The JVMs are different too.
>
> Thanks,
> Andrew
>
>
>
> Quoting Graeme J Sweeney <ib...@gjsweeney.com>:
>
> > On Tue, 27 Mar 2007, andrew.kitchen@kattare.com wrote:
> >
> > > The issue was actually to do
> > > with there being two setter methods on my object - both with the
> > same
> > > name but taking parameters of different types - one 'Date' and one
> > > 'String'. My local environment was using the correct setter method.
> > The
> > > service provider's environment was using the incorrect 'String'
> > setting
> > > method, which caused the parse exception. I have no idea why one
> > used
> > > the correct one and one not - perhaps someone can enlighten me
> > about
> > > that?
> >
> > Are you breaking the JavaBean spec?
> >
> > void setDate(Date)
> > void setDate(String)
> > Date getDate()
> >
> > I'm no reflection expert but according to the API docs the methods
> > found in a class aren't returned in any particular order.
> >
> > Were both JVM versions were the same?
> >
> > --
> > Graeme -
> >
>
>

Re: Locale issues?

Posted by an...@kattare.com.
Hi,

If the JavaBean spec specifies that only one setter method can be
defined per attribute, therefore no overloading, then yes I am breaking
it. Well I was - I am not now as I have altered the code but I have just
slapped myself on the wrist for the initial error ;-)

The JVMs are different too.

Thanks,
Andrew



Quoting Graeme J Sweeney <ib...@gjsweeney.com>:

> On Tue, 27 Mar 2007, andrew.kitchen@kattare.com wrote:
>
> > The issue was actually to do
> > with there being two setter methods on my object - both with the
> same
> > name but taking parameters of different types - one 'Date' and one
> > 'String'. My local environment was using the correct setter method.
> The
> > service provider's environment was using the incorrect 'String'
> setting
> > method, which caused the parse exception. I have no idea why one
> used
> > the correct one and one not - perhaps someone can enlighten me
> about
> > that?
>
> Are you breaking the JavaBean spec?
>
> void setDate(Date)
> void setDate(String)
> Date getDate()
>
> I'm no reflection expert but according to the API docs the methods
> found in a class aren't returned in any particular order.
>
> Were both JVM versions were the same?
>
> --
> Graeme -
>


Re: Locale issues?

Posted by Graeme J Sweeney <ib...@gjsweeney.com>.
On Tue, 27 Mar 2007, andrew.kitchen@kattare.com wrote:

> The issue was actually to do
> with there being two setter methods on my object - both with the same
> name but taking parameters of different types - one 'Date' and one
> 'String'. My local environment was using the correct setter method. The
> service provider's environment was using the incorrect 'String' setting
> method, which caused the parse exception. I have no idea why one used
> the correct one and one not - perhaps someone can enlighten me about
> that?

Are you breaking the JavaBean spec?

void setDate(Date)
void setDate(String)
Date getDate()

I'm no reflection expert but according to the API docs the methods 
found in a class aren't returned in any particular order.

Were both JVM versions were the same?

-- 
Graeme -