On 12/06/14 12:30, Salatiel Filho wrote:
>>> The other problem i am facing is that randomly i just can't connect
>>> and i get this message in logcat:
>>>
>>> 06-08 15:46:40.607: W/DefaultFilterChain(7132): GRIZZLY0013: Exception
>>> during FilterChain execution
>>> 06-08 15:46:40.607: W/DefaultFilterChain(7132):
>>> java.lang.IllegalStateException: java.lang.NumberFormatException
>>> 06-08 15:46:40.607: W/DefaultFilterChain(7132): at
>>>
>>> org.glassfish.grizzly.http.HttpClientFilter.onHttpHeaderError(HttpClientFilter.java:206)
>>> 06-08 15:46:40.607: W/DefaultFilterChain(7132): at
>>>
>>> org.glassfish.grizzly.http.HttpCodecFilter.handleRead(HttpCodecFilter.java:492)
>>> 06-08 15:46:40.607: W/DefaultFilterChain(7132): at
>>>
>>> org.glassfish.grizzly.http.HttpClientFilter.handleRead(HttpClientFilter.java:174)
>>> 06-08 15:46:40.607: W/DefaultFilterChain(7132): at
>>>
>>> org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
>>> 06-08 15:46:40.607: W/DefaultFilterChain(7132): at
>>>
>>> org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
>>> 06-08 15:46:40.607: W/DefaultFilterChain(7132): at
>>>
>>> org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
>>> 06-08 15:46:40.607: W/DefaultFilterChain(7132): at
>>>
>>> org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
>>> 06-08 15:46:40.607: W/DefaultFilterChain(7132): at
>>>
>>> org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
>>> 06-08 15:46:40.607: W/DefaultFilterChain(7132): at
>>> org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
>>> 06-08 15:46:40.607: W/DefaultFilterChain(7132): at
>>>
>>> org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561)
>>> 06-08 15:46:40.607: W/DefaultFilterChain(7132): at
>>>
>>> org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
>>> 06-08 15:46:40.607: W/DefaultFilterChain(7132): at
>>>
>>> org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
>>> 06-08 15:46:40.607: W/DefaultFilterChain(7132): at
>>>
>>> org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
>>> 06-08 15:46:40.607: W/DefaultFilterChain(7132): at
>>>
>>> org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
>>> 06-08 15:46:40.607: W/DefaultFilterChain(7132): at
>>>
>>> org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
>>> 06-08 15:46:40.607: W/DefaultFilterChain(7132): at
>>>
>>> org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
>>> 06-08 15:46:40.607: W/DefaultFilterChain(7132): at
>>> java.lang.Thread.run(Thread.java:841)
>>> 06-08 15:46:40.607: W/DefaultFilterChain(7132): Caused by:
>>> java.lang.NumberFormatException
>>> 06-08 15:46:40.607: W/DefaultFilterChain(7132): at
>>> org.glassfish.grizzly.http.util.Ascii.parseInt(Ascii.java:211)
>>> 06-08 15:46:40.607: W/DefaultFilterChain(7132): at
>>>
>>> org.glassfish.grizzly.http.HttpClientFilter.decodeInitialLineFromBytes(HttpClientFilter.java:340)
>>> 06-08 15:46:40.607: W/DefaultFilterChain(7132): at
>>>
>>> org.glassfish.grizzly.http.HttpCodecFilter.decodeHttpPacketFromBytes(HttpCodecFilter.java:606)
>>> 06-08 15:46:40.607: W/DefaultFilterChain(7132): at
>>>
>>> org.glassfish.grizzly.http.HttpCodecFilter.decodeHttpPacket(HttpCodecFilter.java:587)
>>> 06-08 15:46:40.607: W/DefaultFilterChain(7132): at
>>>
>>> org.glassfish.grizzly.http.HttpCodecFilter.handleRead(HttpCodecFilter.java:458)
>>> 06-08 15:46:40.607: W/DefaultFilterChain(7132): ... 15 more
>>
>> Seems like some issue from the past - which version of Tyrus do you use? Can
>> you try to upgrade to latest release - 1.6?
> I am using [6264f7da683ed003fb1ee01a72164e0f
> tyrus-standalone-client-1.6.jar], i think it is the latest one. Isn't
> it ?
yes, that is the latest one.. hm.. can you log the headers which are
causing this issue? (it might be difficult - I usually do that using 3rd
party tools like tcpdump). But it should be reproducible from standalone
java and not just from android runtime. I reported this to Grizzly dev
team some time ago and it was fixed, but it might be re-introduced or
not fixed properly..
Or, as I already mentioned, you can test
tyrus-standalone-client-jdk-1.7-SNAPSHOT.jar
>> And if you want to help, you can test JDK 7 AIO client implementation on
>> Android (it has significantly smaller footprint) .. (please use 1.7-SNAPSHOT
>> if you will do that).
>>
>> Thanks and regards,
>> Pavel
>>
> Sure, i will try it.
Cool. Please let us know how it went.
Thanks,
Pavel