Closed GoogleCodeExporter closed 9 years ago
I've been thinking about how this error could occur. I'm not certain how to
reproduce, but I'm going to add a
check for an empty list (where I already check for the list being null).
Perhaps doing a toArray call on an empty
list is a problem.
Original comment by dkavan...@gmail.com
on 10 Apr 2009 at 1:58
Original comment by dkavan...@gmail.com
on 10 Apr 2009 at 1:59
ArrayStoreException docs say "Thrown to indicate that an attempt has been made
to store the wrong type of
object into an array of objects". In this case, the source list comes from the
jaxb generated code which is (by
contract) supposed to return a List<String>. I call toArray(new String [] {}).
By passing an empty array of the
correct type I want returned, I'm telling the toArray code the proper data
type, so it has to match the url list
passed in. Not sure where it could go wrong.
Do you have any details about how to reproduce this? Is
Constants.AWS_MAPPLAYEDQUE a queue that already
exists in your SQS account?
Original comment by dkavan...@gmail.com
on 10 Apr 2009 at 2:08
This seems to happen at random (around every 500-600th attempt to connect).
The que already exists in my account.
Original comment by magnus.a...@gmail.com
on 16 Apr 2009 at 8:11
I'm looking at this again. I suppose I'll try creating the queue over and over
till it fails. (or till I tire of running the
test code). I would suggest re-using the MessageQueue object however. It does
not maintain state. I routinely
create a MessageQueue and simply call methods on it over and over (and over and
over).
Original comment by dkavan...@gmail.com
on 13 Oct 2009 at 11:10
I've been running a loop that simply calls SQSUtils.connectToQueue(...) prints
the queue URL, then does it again.
Been running a couple of hours so far.
To be perfectly honest, some of the code in SQSUtils was there to match
functionality in the Amazon SOAP client
code. I wanted to make sure it was easy to migrate from the (thread un-safe)
amazon client to typica.
I think that method of connecting to the queue is heavy weight. What I use is
the code I added to the SQSutils.
There are methods like getQueueOrElse(..) and sendMessageForSure(..) that are
light weight and do exactly what
they say. they keep trying the call until it works. That gets around the
occasional 5xx error.
Original comment by dkavan...@gmail.com
on 14 Oct 2009 at 1:39
I'm closing this. I've marked SQSutils.getMessageQueue() deprecated. See issue
#80 for
explanation.
Original comment by dkavan...@gmail.com
on 23 Mar 2010 at 11:03
Original issue reported on code.google.com by
magnus.a...@gmail.com
on 9 Apr 2009 at 8:46