You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hivemind.apache.org by belaran <be...@gmail.com> on 2005/05/23 15:45:33 UTC

Troubles with configuration

Hi,

I want, inside the same module, to have two distinct configuration
point, associated with a contribution point each one...
At the first call to the registry, i ask for the first contribution,
no problem. Several lines of java later, when i ask for the second
configuration, i have this :

org.apache.hivemind.ApplicationRuntimeException: Configuration point
Module.ConfigTwo does not exist

Have i misunderstand something ? A configuration is unique in an
module ? Or there a problem somewhere else ?

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org


Re: Troubles with configuration

Posted by Knut Wannheden <kn...@gmail.com>.
Belaran,

On 5/23/05, belaran <be...@gmail.com> wrote:
> well the module exist because when i do :
> 
> List silver = registry.getConfiguration("UserProfilService.Silver");
> bob = (UserProfile)silver.get(0);
> // here it's okay, i get the configuration
> List gold = registry.getConfiguration("UserProfileService.User");
> alice = (UserProfile)gold.get(0);
> // here it's failed with precedent error message...
> 

Note the extraneous letter 'e' (after "UserProfil") in the second
getConfiguration() call. It should read:

List gold = registry.getConfiguration("UserProfilService.User");

--knut

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org


Re: Troubles with configuration

Posted by Knut Wannheden <kn...@gmail.com>.
Looks like a typo in the module name...

<module id="UserProfilService" version="1.0.0">

vs.

"Configuration point UserProfileService.User does not exist."

I suppose a message like this would have been more helpful:

"Module UserProfileService does not exist."

--knut

On 5/23/05, belaran <be...@gmail.com> wrote:
> I check this, the additionnal configuration point was a cut/paste
> error ( everyone knows that cut/paste are evil, but we all do it
> anyway)...
> I corrected this but i still got this error:
> 
> org.apache.hivemind.ApplicationRuntimeException: Configuration point
> UserProfileService.User does not exist.
> 
> with this 'correct' hivmodule :
> 
> <?xml version="1.0"?>
> <module id="UserProfilService" version="1.0.0">
>         <configuration-point id="Silver">
>                 <schema>
>                         <element name="profile">
>                                 <attribute name="id" required="true"/>
>                                 <attribute name="securityClearance" required="true"/>
>                                         <conversion class="user.implementation.SilverUser"/>
>                         </element>
>                 </schema>
>         </configuration-point>
> 
>         <configuration-point id="User">
>                 <schema>
>                         <element name="profile">
>                                 <attribute name="id" required="true"/>
>                                 <attribute name="securityClearance" required="true"/>
>                                         <conversion class="user.implementation.GoldUser"/>
>                         </element>
>                 </schema>
>         </configuration-point>
> 
>         <contribution configuration-id="hivemind.SymbolSources">
>                 <source name="configurator" class="user.implementation.Configurator"/>
>         </contribution>
> 
>         <contribution configuration-id="User">
>                 <profile id="1" securityClearance="${firstLevel}"/>
>         </contribution>
> 
>                 <contribution configuration-id="Silver">
>                 <profile id="1" securityClearance="${secondLevel}"/>
>         </contribution>
> </module>
> 
> 2005/5/23, Knut Wannheden <kn...@gmail.com>:
> > Belaran,
> >
> > I think that if you check the logs you should find that HiveMind
> > reports an error stating that the "Silver" configuration point is
> > duplicated. Can you verify this? Does this solve your problem?
> >
> > --knut
> >
> > On 5/23/05, Knut Wannheden <kn...@gmail.com> wrote:
> > > One thing that caught my eye was that you have defined two
> > > configuration points with the id "Silver". That isn't allowed. I'm
> > > surprised that this doesn't result in an error being reported. I'll
> > > try to verify this.
> > >
> > > --knut
> > >
> >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org


Re: Troubles with configuration

Posted by Knut Wannheden <kn...@gmail.com>.
Belaran,

I think that if you check the logs you should find that HiveMind
reports an error stating that the "Silver" configuration point is
duplicated. Can you verify this? Does this solve your problem?

--knut

On 5/23/05, Knut Wannheden <kn...@gmail.com> wrote:
> One thing that caught my eye was that you have defined two
> configuration points with the id "Silver". That isn't allowed. I'm
> surprised that this doesn't result in an error being reported. I'll
> try to verify this.
> 
> --knut
>

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org


Re: Troubles with configuration

Posted by Knut Wannheden <kn...@gmail.com>.
One thing that caught my eye was that you have defined two
configuration points with the id "Silver". That isn't allowed. I'm
surprised that this doesn't result in an error being reported. I'll
try to verify this.

--knut

On 5/23/05, belaran <be...@gmail.com> wrote:
> Basicly , i want to create two distinct object :
>  one is SilverUser
>  the other is goldUser
>  
>  (Theirs configuration attribut are same just because i'm too lazy to make
> different one)
>  
>  here is the hivemodule.xml:
>  <?xml version="1.0"?>
>  <module id="UserProfilService" version="1.0.0">
>      <configuration-point id="Silver">
>          <schema>
>              <element name="profile">
>                  <attribute name="id" required="true"/>
>                  <attribute name="securityClearance" required="true"/>
>                      <conversion class="user.implementation.SilverUser"/>   
>             
>              </element>
>          </schema>
>      </configuration-point>
>  
>      <configuration-point id="User">
>          <schema>
>              <element name="profile">
>                  <attribute name="id" required="true"/>
>                  <attribute name="securityClearance" required="true"/>
>                      <conversion class="user.implementation.GoldUser"/>     
>           
>              </element>
>          </schema>
>      </configuration-point>
>  
>      <contribution configuration-id="hivemind.SymbolSources">
>          <source name="configurator"
> class="user.implementation.Configurator"/>
>      </contribution>
>      <contribution configuration-id="User">
>          <profile id="1"
> securityClearance="${firstLevel}"/>
>      </contribution>
>      <configuration-point id="Silver">
>          <schema>
>              <element name="profile">
>                  <attribute name="id" required="true"/>
>                  <attribute name="securityClearance" required="true"/>
>                      <conversion class="user.implementation.SilverUser"/>   
>             
>              </element>
>          </schema>
>      </configuration-point>
>          <contribution configuration-id="Silver">
>          <profile id="1"
> securityClearance="${secondLevel}"/>
>      </contribution>
>  </module>
> 
> 2005/5/23, Knut Wannheden <kn...@gmail.com>:
> > Belaran,
> > 
> > I think you've mixed up the concepts "configuration point" and
> > "contribution" in your problem description. Could you please supply
> > the contents of your hivemodule.xml and the Java code? 
> > 
> > --knut
> > 
> > On 5/23/05, belaran <be...@gmail.com> wrote:
> > > Hi,
> > >
> > > I want, inside the same module, to have two distinct configuration
> > > point, associated with a contribution point each one... 
> > > At the first call to the registry, i ask for the first contribution,
> > > no problem. Several lines of java later, when i ask for the second
> > > configuration, i have this :
> > >
> > > org.apache.hivemind.ApplicationRuntimeException :
> Configuration point
> > > Module.ConfigTwo does not exist
> > >
> > > Have i misunderstand something ? A configuration is unique in an
> > > module ? Or there a problem somewhere else ?
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> hivemind-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
> hivemind-user-help@jakarta.apache.org
> > >
> > >
> > 
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org


Re: Troubles with configuration

Posted by Knut Wannheden <kn...@gmail.com>.
Belaran,

I think you've mixed up the concepts "configuration point" and
"contribution" in your problem description. Could you please supply
the contents of your hivemodule.xml and the Java code?

--knut

On 5/23/05, belaran <be...@gmail.com> wrote:
> Hi,
> 
> I want, inside the same module, to have two distinct configuration
> point, associated with a contribution point each one...
> At the first call to the registry, i ask for the first contribution,
> no problem. Several lines of java later, when i ask for the second
> configuration, i have this :
> 
> org.apache.hivemind.ApplicationRuntimeException: Configuration point
> Module.ConfigTwo does not exist
> 
> Have i misunderstand something ? A configuration is unique in an
> module ? Or there a problem somewhere else ?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org