users@jersey.java.net

RE: [Jersey] Getting nuts with hangs in Client API

From: Markus KARG <markus.karg_at_gmx.net>
Date: Fri, 25 Sep 2009 19:42:34 +0200

I see. It worked well on Windows until I did the updates to the latest
versions, so it is a rather new bug in either the JDK or Jersey. Please tell
me what exactly you need to know from me so I will send everything you need.
Maybe you like to have a complete Eclipse project that you just need to
start to see what happens?

 

From: Paul.Sandoz_at_Sun.COM [mailto:Paul.Sandoz_at_Sun.COM]
Sent: Donnerstag, 24. September 2009 22:50
To: users_at_jersey.dev.java.net
Subject: Re: [Jersey] Getting nuts with hangs in Client API

 

Hi,

 

When i stated in a previous email:

 

  "Ug, that looks like a silly windows bug"

 

i meant it looks like a bug with Jersey + JDK on Windows, because the
scanning works fine in other environments (e.g. Mac) as there are unit tests
for it that are not failing.

 

All Naresh is stating is he cannot reproduce in his Window's environment and
JDK (i dunno which version) with Jersey 1.1.2.

 

Can you send details of your environment so Naresh can sync up with that?

 

Paul.

 

On Sep 24, 2009, at 7:21 PM, Markus KARG wrote:





Naresh,

 

I doubt that it is a bug in Windows XP, because it worked well on this
machine until I updated to the latest version of JDK, Jersey and Grizzly. We
tested today on different machines and all of them had the same problem. So
I am pretty sure that it is a bug in Jersey (can you tell me what the bug in
Windows shall be like.? Windows not being able to deal with drive letters
anymore, after 20 years of their existence? I doubt that.). BTW, all the
time in the past 10 years of experience with Java, each other time some Java
programmers said that "it must be a Windows bug" and in the end it was not.
But maybe this time it is. ;-)

 

Regards

Markus

 

From: Srinivas.Bhimisetty_at_Sun.COM [mailto:Srinivas.Bhimisetty_at_Sun.COM]
Sent: Donnerstag, 24. September 2009 16:00
To: users_at_jersey.dev.java.net
Subject: Re: [Jersey] Getting nuts with hangs in Client API

 

Paul Sandoz wrote:

 

On Sep 8, 2009, at 9:48 AM, Markus KARG wrote:






Paul,

 

thank you for your tips and have nice holidays! Just came back from a great
short trip to Vienna, so if you don't know where to go to. ;-)

 

 

:-)

 






The idea with a 10 minutes sleep didn't help. :-(

 

Changing to Grizzly works well (but one really must give the package to scan
or Jersey will tell you that
"C:\C:\jersey-archive-1.0.3.1\lib\jsr311-api-1.0.jar, is not a jar file")!
:-)

 

 

Ug, that looks like a silly windows bug. We will investigate.

I tried running a simple application on Windows Vista, and it did run just
fine.
Here's an extract of what I see upon running the app:
----------------------------------------------------------------------------
--------------------------------------
24 Sep, 2009 4:07:46 PM com.sun.jersey.api.core.ClasspathResourceConfig init

INFO: Scanning for root resource and provider classes in the paths:
C:\space\naresh\workspace\JerseyClassPathScanningDemo\lib\asm-3.1.jar
C:\space\naresh\workspace\JerseyClassPathScanningDemo\lib\jersey-bundle-1.1.
2-ea.jar
C:\space\naresh\workspace\JerseyClassPathScanningDemo\lib\jsr311-api-1.1.jar

C:\space\naresh\workspace\JerseyClassPathScanningDemo\lib\grizzly-servlet-we
bserver-1.9.8.jar
C:\space\naresh\workspace\JerseyClassPathScanningDemo\build\classes
C:\space\naresh\workspace\JerseyClassPathScanningDemo\src
24 Sep, 2009 4:07:46 PM com.sun.jersey.api.core.ClasspathResourceConfig init

INFO: Root resource classes found:
class jerseyclasspathscanningdemo.resources.MyResource
24 Sep, 2009 4:07:46 PM com.sun.jersey.api.core.ClasspathResourceConfig init

INFO: Provider classes found:
24 Sep, 2009 4:07:47 PM
com.sun.jersey.server.impl.application.WebApplicationImpl initiate
INFO: Initiating Jersey application, version 'Jersey: 1.1.2-ea 08/25/2009
04:43 PM'
24 Sep, 2009 4:07:49 PM com.sun.jersey.api.client.filter.LoggingFilter log
INFO: 1 * Client out-bound request
1 > GET http://localhost:9989/resources/myresource
1 > Accept: text/plain
1 >

24 Sep, 2009 4:07:49 PM com.sun.jersey.api.client.filter.LoggingFilter log
INFO: 1 * Client in-bound response
Hi!!!
1 < 200
1 < Transfer-Encoding: chunked
1 < Content-Type: text/plain
1 < Date: Thu, 24 Sep 2009 10:37:49 GMT
1 <
Hi!!!
----------------------------------------------------------------------------
--------------------------------------

    And here's an extract from the code which creates the SelectorThread:

...
SelectorThread st = GrizzlyServerFactory.create(
<http://localhost:9989/resources> "http://localhost:9989/resources");
...

-Naresh






 






So I assume that there is a bug in the http server used internally by
Jersey, and there is a bug in Jersey's ClassPath scanner (it seems to add
another C:\ to each JAR if not giving a package to scan).

 

For my presentation, this should work. But maybe you like to have a look
into the the above items after your holidays? :-)

 

OK.

 

I have wasted way too much time with the LW HTTP server and its issues! In
my experience it is not stable on windows. I can only suggest logging an
issue against the JDK.

 

Paul.

 

--------------------------------------------------------------------- To
unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net For additional
commands, e-mail:users-help_at_jersey.dev.java.net