users@jersey.java.net

Re: [Jersey] Fwd: Jersey failing to deploy on GF v3

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Tue, 13 Oct 2009 10:40:51 +0200

On Oct 10, 2009, at 11:54 AM, Pavel Bucek wrote:

> Hello Felipe,
>
> do you have jersey-gf-statsproviders.jar [1] in your EAR? This might
> be some ugly classloading issue (jersey from EAR can't properly
> access glassfish-provided stats provider module)
>

Yes, but one should not have to require that dependency. The problem
is because Jersey is included in the war and also Jersey is provided
as part of GF v3.


Felipe, when using the latest promoted GF v3 you should not have to
include Jersey in the war.


Pavel, I recently modified the Jersey code for monitoring to handle
this case (it is in 1.1.3-ea):

public class GlassFishMonitoringInitializer {
     private static final Logger LOGGER =
              
Logger.getLogger(GlassFishMonitoringInitializer.class.getName());

     public static void initialize() {
         try {
             for(GlassfishMonitoringProvider monitoring :
ServiceFinder.find(GlassfishMonitoringProvider.class)) {
                 monitoring.register();
             }
         } catch (ServiceConfigurationError ex) {
             LOGGER.log(Level.SEVERE, "GlassFish Jersey monitoring
could not be enabled. " +
                     "Processing will continue but montoring is
disabled.", ex);
         }
     }
}

Paul.

> Pavel
>
> [1] http://download.java.net/maven/2/com/sun/jersey/glassfish/v3/osgi/jersey-gf-statsproviders/
>
>
>
> Felipe Gaścho wrote:
>> My application is failing to deploy in GFv3b66 due to a Jersey
>> dependency:
>>
>> [exec] com.sun.enterprise.admin.cli.CommandException: remote failure:
>> Exception while loading the app : java.lang.Exception:
>> java.lang.IllegalStateException: ContainerBase.addChild: start:
>> org.apache.catalina.LifecycleException:
>> org.apache.catalina.LifecycleException:
>> com.sun.jersey.spi.service.ServiceConfigurationError:
>> com.sun.jersey.spi.monitoring.GlassfishMonitoringProvider: The class
>> com
>> .sun
>> .jersey
>> .server.spi.monitoring.glassfish.GlassfishMonitoringServiceProvider
>> implementing provider interface
>> com.sun.jersey.spi.monitoring.GlassfishMonitoringProvider could not
>> be
>> instantiated: null
>>
>> Strange because I am including the libs of Jersey in the EAR..
>> perhaps
>> a version problem or other
>>
>> Step by step my app is getting close to deploy in GF v3.. my goal is
>> to finish the day blogging about the success :) your help is
>> welcome.........
>>
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>