Greg,
We're having problems with this new code. I've tried fixing a few things, but I find myself without the knowledge of what the intent of a lot of new code is, so I think my fixes are causing further problems.
For example:
ClassInstanceHandler.getComponentMap throws a NullPointerException on this line:
>if ( componentsDescriptor.getName().equals(componentName)) {
It's because componentsDescriptor is null. that's because a bit further down, in the while loop, we assign settingDescriptor = componentsDescriptor.getSubSetting(key) (which in one of the iterations returns a null) and pass settingDescriptor back into the recursion as the new componentsDescriptor.
I don't know if that case is simply unaccounted for, or if it's a problem with the config (attached). All I know is "it used to work". As a workaround, I did this at the top of the function:
if (componentsDescriptor == null) {
log.debug("componentsDescriptor is null. Map: {" + componentsMap + "} componentName: " + componentName);
return (Map)componentsMap.get(componentName);
}
here's a chunk of output that u can match to the settings file:
18:48:37,131 DEBUG MapHandler.getSetting (57): Setting Name: ComponentSettings *Begin Map*
18:48:37,131 DEBUG MapHandler.getSetting (57): Setting Name: IdASRegistry *Begin Map*
18:48:37,132 DEBUG MapHandler.getSetting (57): Setting Name: ComponentSettings *Begin Map*
18:48:37,132 DEBUG MapHandler.getSetting (57): Setting Name: JNDIContextFactory *Begin Map*
18:48:37,132 DEBUG MapHandler.getSetting (128): Setting Name: JNDIContextFactory *End Map*
18:48:37,132 DEBUG MapHandler.getSetting (114): Adding Map Entry for Name: JNDIContextFactory
18:48:37,133 DEBUG MapHandler.getSetting (57): Setting Name: InMemoryContextFactory *Begin Map*
18:48:37,134 DEBUG MapHandler.getSetting (128): Setting Name: InMemoryContextFactory *End Map*
18:48:37,134 DEBUG MapHandler.getSetting (114): Adding Map Entry for Name: InMemoryContextFactory
18:48:37,139 DEBUG MapHandler.getSetting (57): Setting Name: XMLFileContextFactory *Begin Map*
18:48:37,140 DEBUG MapHandler.getSetting (128): Setting Name: XMLFileContextFactory *End Map*
18:48:37,140 DEBUG MapHandler.getSetting (114): Adding Map Entry for Name: XMLFileContextFactory
18:48:37,140 DEBUG MapHandler.getSetting (128): Setting Name: ComponentSettings *End Map*
18:48:37,140 DEBUG MapHandler.getSetting (114): Adding Map Entry for Name: ComponentSettings
18:48:37,141 DEBUG ClassInstanceHandler.getSetting (84): Setting Name: JNDIContextFactory Value: org.eclipse.higgins.idas.cp.jndi.JNDIContextFactory
18:48:37,147 DEBUG ClassInstanceHandler.getComponentMap (39): componentsDescriptor name: ComponentSettings componentName = JNDIContextFactory
18:48:37,147 DEBUG ClassInstanceHandler.getComponentMap (37): componentsDescriptor is null. Map: {{}} componentName: JNDIContextFactory
I only halfheartedly believe my change was the right thing to do from looking at the old code. But now I'm getting a NullPointerException in IdASRegistry.registerContextFactory on this line:
for (int i=0; i< types.size(); i++) {
because types is null. So I'm assuming something didn't get read in correctly.
Any ideas?
Jim
>>> Greg Byrd <gbyrd@xxxxxxxx> 09/23/08 8:35 PM >>>
I think that I've managed to commit all changes that are needed to cope with the Configuration API modifications for dynamic updates to IdASRegistry. If I've broken one of your favorite projects, please let me know and I'll try to fix it.
This should allow us to close Bugzilla #238374.
...Greg
_______________________________________________ higgins-dev mailing list higgins-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/higgins-dev
|