users@jersey.java.net

[Jersey] Re: Problem finding providers in jboss AS 6

From: <pjh_at_softwire.com>
Date: Wed, 28 Sep 2011 12:36:06 +0000 (GMT)

Hi,

Unfortunately I don't think the fix in trunk works.

In development it is fine (we deploy using an exploded ear) but on our
staging/live servers we deploy using a normal ear. The vfs URI looks
like:

vfs:/opt/.../jboss-6.0.0.Final/server/all/deploy/Foo.ear/Foo-war.war/WE
B-INF/classes/com/foo/web/rest/

In the scheme handler we're just replacing the "vfs" with "file" and
passing it to the file scheme handler. The file scheme handler turns
this into a path, but everything after the "Foo.ear" doesn't really
exist.

I guess we need to either handle the vfs scheme properly (using the URL
to get a virtual file object) or we need to detect this case and use a
loader that can read an ear file.

I'm looking at a fix for our app, but I think it would be more easily
done in jersey (it would be nice if we used the URLs directly, rather
than .toURI()ing them in PackageNamesScanner).

Regards,

Peter