Eric,
It clearly doesn't seem like a Jersey issue. You might want to check the
"imat" column size of your MySql table, and compare with what is being
inserted.
Suhas
Marsh Eric wrote:
> Hi Folks,
>
> I'm suddenly seeing some very strange behavior from jersey. Something,
> I don't know what, is happening somewhere between the web connection
> and the persistence layer, but I'm not really sure exactly why I'm
> seeing it now but not previously. I did recently upgrade to the latest
> version so perhaps that's got something to do with it.
>
> Essentially Jersey doesn't seem to be setting some passed numeric
> values and so those values are defaulting to zeros. Also, a passed
> string is giving me a truncation error if there are any spaces
> embedded (see my passed values below and the error message from the
> persistence layer).
>
> I don't expect you guys to solve my problems, but if anyone else has
> mentioned anything like this happening before that might be helpful.
> Also is there any documentation explaining how to set Jersey up for
> debugging? Seems that there's a lot of mysterious things happening in
> there that I don't understand.
>
> One last thing - since a lot of information is passed on the command
> line what can be done to secure it? Just encrypt the parameters?
>
> Thanks,
>
> ERic
>
> *{"accuracy":"17",*
> *"mykey":{"@uri":"http://192.168.0.3:8080/hereiam/ws/members/?userid=emarsh&code=dW1hYjAwbg==
> <http://192.168.0.3:8080/hereiam/ws/members/?userid=emarsh&code=dW1hYjAwbg==>"},*
> *"@uri":"http://192.168.0.3:8080/hereiam/ws/mylocations/",*
> *"longitude":"-98.288691",*
> *"timestamp":"2009-02-19T08:35:51-06:00",*
> *"imat":"vallero distribution center",*
> *"latitude":"29.604120",*
> *"peopleCollection":{"people":[*
> * {"@uri":"http://192.168.0.3:8080/hereiam/ws/peoples/2/"},*
> * {"@uri":"http://192.168.0.3:8080/hereiam/ws/peoples/7/"}],*
> *"uri":"http://192.168.0.3:8080/hereiam/ws/members/"}}*
>
> results in
>
> Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.0.1 (Build
> b04-fcs (04/11/2008))):
> oracle.toplink.essentials.exceptions.DatabaseException
> Internal Exception: com.mysql.jdbc.MysqlDataTruncation: Data
> truncation: Data too long for column 'imat' at row 1
> Error Code: 0
> Call: INSERT INTO mylocation (latitude, longitude, width, timestamp,
> imat, photo, height, accuracy, mykey) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
> bind => [0.0, 0.0, 0, 2009-02-19 08:35:51.0, vallero
> distribution center, null, 0, 0, 1]
> Query: InsertObjectQuery(hereiamdb.Mylocation[pk=null])
> at
> oracle.toplink.essentials.exceptions.DatabaseException.sqlException(DatabaseException.java:311)