users@hk2.java.net

Re: RunLevelController issue

From: Dan Armbrust <daniel.armbrust.list_at_gmail.com>
Date: Thu, 4 Feb 2016 13:34:35 -0500

Requested followup information:

If I execute these against the service locator being used by jersey:

         ServiceLocator jerseyServiceLocator =
container.getApplicationHandler().getServiceLocator();
         System.err.println("parent?" + jerseyServiceLocator.getParent());
ServiceLocatorUtilities.dumpAllDescriptors(jerseyServiceLocator);
         System.err.println("Found RunLevelController? " +
jerseyServiceLocator.getService(RunLevelController.class));
         System.err.println("Found AsyncRunLevelContext? " +
jerseyServiceLocator.getService(AsyncRunLevelContext.class));


I get:

parent? null
Found RunLevelController? null
java.lang.NoClassDefFoundError:
org/glassfish/hk2/runlevel/internal/AsyncRunLevelContext
     at
gov.vha.isaac.rest.ApplicationConfig.onStartup(ApplicationConfig.java:69)

I attached the descriptors as the jersey controller.log file.

This is when my war file does not contain any HK2 libraries.

Likewise - dumping the contents of my dynamically populated service
locator (where I scan for annotated classes on the classpath)

Found RunLevelController? null

[2016-02-04T12:21:02.002-0500] [glassfish 4.1] [SEVERE] []
[javax.enterprise.web] [tid: _ThreadID=47 _ThreadName=admin-listener(4)]
[timeMillis: 1454606462002] [levelValue: 1000] [[
   WebModule[/isaac-rest-1.0-SNAPSHOT]StandardWrapper.Throwable
java.lang.NoClassDefFoundError:
org/glassfish/hk2/runlevel/internal/AsyncRunLevelContext
     at gov.vha.isaac.ochre.api.LookupService.get(LookupService.java:114)
     at
gov.vha.isaac.rest.ApplicationConfig.onStartup(ApplicationConfig.java:78)

I've attached the descriptors for my load as well - no surprises that I
can find in either dump - they simply don't have the missing classes.

Just to get the bug report into this thread - here is the bug I filed on
glassfish:

https://java.net/jira/browse/GLASSFISH-21509

Thanks,

Dan