[Jersey] Problem finding providers in jboss AS 6

From: <>
Date: Tue, 6 Sep 2011 17:48:10 +0000 (GMT)

Hi All,

I'm getting a warning on startup that means that none of my @Provider
annotated classes are being found.

The issue is related to this bug (which was resolved with a one off

The warning is:

WARNING [AnnotatedClassScanner] URL,
/, is ignored, it not a file or a jar file URL

This comes from in
com.sun.jersey.server.impl.container.config.AnnotatedClassScanner and
is caused by the "vfs" scheme not being recognised.

Fundamentally the issue here (and with the previous bug) is that you
probably shouldn't just hack around with a URL as a string and assume
everything is going to be fine.

The question is whether there is much of an alternative here? Could we
not be loading the stream from the URL? It seems like a jboss specific
problem but on the other hand what jboss is doing doesn't seem to be
particularly wrong.

Any suggestions or workarounds would be much appreciated!