tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alicia Sánchez-Mora" <aliciasm...@gmail.com>
Subject Re: Inicialization of an UnsignedByte variable
Date Thu, 15 Feb 2007 12:23:37 GMT
This is the contrctor:
*UnsignedByte*<http://ws.apache.org/axis/java/apiDocs/org/apache/axis/types/UnsignedByte.html#UnsignedByte(java.lang.String)>
(java.lang.String sValue)

of course, if you do some research on this and I found that internally when
you pass  a string as parameter to the constructor, the class will try to
set this value to a value of type long. The following UnsignedByte class
snippet shows this issue:
public UnsignedByte <javascript:searchRef('UnsignedByte')>(String
javascript:searchRef('String')> sValue
javascript:searchRef('sValue')>) throws NumberFormatException
javascript:searchRef('NumberFormatException')> { setValue
javascript:searchRef('setValue')>(Long
javascript:searchRef('Long')>.parseLong
javascript:searchRef('parseLong')>(sValue
javascript:searchRef('sValue')>)); }

What happens here is that you cannot convert a string to long and this
cause tomcat to throw a NumberFormatException. This is why I created a
custom UnsignedByte class as I already wrote. So my question is still why in
the server side (tomcat is running) the blob length is cero?



On 2/15/07, David Delbecq <delbd@oma.be> wrote:
>
> En l'instant précis du 02/15/07 13:10, Alicia Sánchez-Mora s'exprimait
> en ces termes:
> > Hello again,
>
> > final UnsignedByte ptr = new  UnsignedByte("this is a test") ;
>
> "this is a test" <-- How do you expect any implementation of anything to
> convert this string to a number????
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

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