users@jersey.java.net

Re: [Jersey] having trouble with JBOSS 5.1.0.CR1

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Tue, 03 Nov 2009 09:09:09 +0100

Hi Denis,

We did fix an issue a while ago with JBoss 5.0.0CR1:

   https://jersey.dev.java.net/issues/show_bug.cgi?id=80

I do not know if Jersey has regressed or JBoss 5.1 changed. Is there
any other information in the logs?

JBoss 5.x introduced a new virtual file mechanism and this makes it
harder for package and class scanning techniques to work. To do this
properly will require a wider-ranging fix to plug in URI resolving
mechanisms (which i am working on w.r.t. another issue related to
class scanning and WebLogic).

Unfortunately i do not have time at the moment to play with JBoss and
investigate further. This will have to happen after we release Jersey
for GlassFish v3.


A work around is to directly reference a class that implements
Application or ResourceConfig and that class explicitly registers the
root resource and provider classes. See:

   https://jersey.dev.java.net/nonav/documentation/1.1.2-ea/user-guide.html
#d4e115

Paul.


On Nov 2, 2009, at 9:10 PM, Dennis Seah wrote:

> hi
>
> We are using jersey version is 1.1.1-ea and our war
> file is deployed on JBOSS 5.1.0
>
> and we see the following error is seen in JBOSS container logs :
>
> 2009-10-13 06:42:34,621 SEVERE
> [com.sun.jersey.server.impl.application.WebApplicationImpl] (main)
> [failed to
> localize] no.root.res.in.res.cfg()
> 2009-10-13 06:42:34,621 ERROR
> [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/
> opensso]]
> (main) StandardWrapper.Throwable
> com.sun.jersey.api.container.ContainerException: [failed to localize]
> no.root.res.in.res.cfg()
> at
> com
> .sun
> .jersey
> .server
> .impl
> .application
> .WebApplicationImpl.processRootResources(WebApplicationImpl.java:773)
> at
> com
> .sun
> .jersey
> .server
> .impl
> .application.WebApplicationImpl.initiate(WebApplicationImpl.java:645)
> at
> com
> .sun
> .jersey
> .server
> .impl
> .application.WebApplicationImpl.initiate(WebApplicationImpl.java:419)
> at
> com
> .sun
> .jersey
> .spi
> .container.servlet.ServletContainer.initiate(ServletContainer.java:
> 377)
> at
> com.sun.jersey.spi.container.servlet.ServletContainer
> $InternalWebComponent.initiate(ServletContainer.java:242)
> at
> com
> .sun
> .jersey.spi.container.servlet.WebComponent.load(WebComponent.java:455)
> at
> com
> .sun
> .jersey.spi.container.servlet.WebComponent.init(WebComponent.java:178)
> at
> com
> .sun
> .jersey
> .spi.container.servlet.ServletContainer.init(ServletContainer.java:
> 281)
> at
> com
> .sun
> .jersey
> .spi.container.servlet.ServletContainer.init(ServletContainer.java:
> 442)
> at javax.servlet.GenericServlet.init(GenericServlet.
>
>
> this war file works OK on tomcat, glassfish and few other web
> containers that we have
> test.
>
> any clues on how to resolve this?
>
> here is snippet of our web.xml
> <servlet>
> <servlet-name>ws</servlet-name>
> <servlet-
> class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-
> class>
> <init-param>
> <param-
> name>com.sun.jersey.config.property.resourceConfigClass</param-name>
> <param-
> value>com.sun.jersey.api.core.PackagesResourceConfig</param-value>
> </init-param>
> <init-param>
> <param-name>com.sun.jersey.config.property.packages</
> param-name>
> <param-value>com.sun.identity.entitlement</param-value>
> </init-param>
> <load-on-startup>1</load-on-startup>
> </servlet>
>
>
>
> thanks
>
>
> --
> Dennis Seah
> OpenSSO - https://opensso.dev.java.net
> Sun Microsystems Inc.
> Ph: (408) 276-6670 x16670
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>