Status: New
Owner: ----
Labels: Type-Defect Priority-Medium Component-SLEE SubComponent-SLEE-Core Version-2.2.1 Release-Type-FINAL SLEE-2.2.1.FINAL

New issue 1993 by nrgizer.fi: ClassLoader chaining problem for profile-spec-ref in RA.
http://code.google.com/p/mobicents/issues/detail?id=1993

Version tested: 2.2.0

Bug Description: When using a profile-spec-ref in an RA the profile classes cannot be found by the RA class loader.

Precondition: We have a configuration ra component that collects configuration and inserts them into a configuration profile table for other components to read. The RA implementation project had a profile-spec-ref tag to the appropriate configuration profile.

Execution: In the raActive() method the following code was run (after the initial profile table lookup:)

ConfigurationProfileLocalObject profile;
try {
  profile = (ConfigurationProfileLocalObject) profileTable.create(key);
} catch (ProfileAlreadyExistsException ex) {
tracer.info("Duplicate configuration value key " + key + " found in the configuration profile table. Trying to update the value.", ex);
  profile = (ConfigurationProfileLocalObject) profileTable.find(key);
}
if (profile == null) {
tracer.severe("Could not create or fetch profile for configuration key " + key);
} else {
  profile.setValue(configuration.getProperty(key));
}

The ConfigurationProfileLocalObject was defined in the profile project.

Result: The attached stack trace was thrown.

Fix: To get around this problem I created a slee-library project that only contained the exact same profile-spec-ref as the RA implementation project. Then I added a library-ref to that library in the RA implementation project. After a recompile it worked.

At least to me this seems like a bug in the ClassLoader chaining that prevents the RA instance to find the ConfigurationProfileLocalObject if the profile is only referenced directly from the RA implementation project, and from my understanding of the SLEE 1.1 specification this should be possible.

Attachements Required: (semi-obfuscated) stacktrace.txt attached.

Attachments:
        stacktrace.txt  5.9 KB

Reply via email to