Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [higgins-dev] configuration changes committed

I'm surprised if this is the problem.  I can't find anywhere on http://wiki.eclipse.org/Higgins_Configuration_Management that says I need to change my config files.  This config file works fine with the old configuration.xml code.  In fact, I'm using it right now.


The classinstance setting below does appear directly below a ComponentSettings section:

<Setting Name="ComponentSettings" Type="htf:map">

   <Setting Name="JNDIContextFactory" Type="htf:map" />

   <Setting Name="InMemoryContextFactory" Type="htf:map" />

   <Setting Name="XMLFileContextFactory" Type="htf:map" />

</Setting>
<Setting Name="JNDIContextFactory" Type="htf:classinstance">org.eclipse.higgins.idas.cp.jndi.JNDIContextFactory</Setting>

<Setting Name="InMemoryContextFactory" Type="htf:classinstance">org.eclipse.higgins.idas.cp.inmem.InMemoryContextFactory</Setting>

<Setting Name="XMLFileContextFactory" Type="htf:classinstance">org.eclipse.higgins.idas.cp.xmlfile.NonsharedContextFactory</Setting>


so, are you saying these have to come after the outer-most ComponentSettings section?


Also, why would IdASRegistry need to be identified as IdentityAttributeService?  Is that a special setting name now?  In the config I attached, it's called IdASRegistry both as a child of the ComponentSettings as well as in the classinstance that follows, so it's consistent.


<Setting Name="ComponentSettings" Type="htf:map">

   <Setting Name="IdASRegistry" Type="htf:map">

...

</Setting>

<Setting Name="IdASRegistry" Type="htf:classinstance">org.eclipse.higgins.idas.registry.IdASRegistry</Setting>



>>> Rajalakshmi S Iyer <iyer_rajalakshmi@xxxxxxxxxx> 10/07/08 1:30 AM >>>
Hi Jim,

I went through your configuration file and identified the problem:

<Setting Name="JNDIContextFactory" Type="htf:classinstance">
org.eclipse.higgins.idas.cp.jndi.JNDIContextFactory</Setting>

should be defined after defining the configuration settings for the context
factory, i.e. after the 'ComponentSettings' section.

Also the IdASRegistry is identified by the setting name
'IdentityAttributeService' in the configuration file and not as
'IdASRegistry'.

Thanks,
Best regards,
Rajalakshmi Iyer


                                                                                                
  From:       "Jim Sermersheim" <jimse@xxxxxxxxxx>                                              
                                                                                                
  To:         "Higgins (Trust Framework) Project developer discussions"                         
              <higgins-dev@xxxxxxxxxxx>                                                         
                                                                                                
  Date:       10/04/2008 12:58 AM                                                               
                                                                                                
  Subject:    Re: [higgins-dev] configuration changes committed                                 
                                                                                                





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[attachment
"otis-config.client.local.xml" deleted by Rajalakshmi S Iyer/India/IBM]
_______________________________________________
higgins-dev mailing list
higgins-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/higgins-dev



_______________________________________________
higgins-dev mailing list
higgins-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/higgins-dev


Back to the top