You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hivemind.apache.org by "Knut Wannheden (JIRA)" <hi...@jakarta.apache.org> on 2006/08/03 13:38:14 UTC

[jira] Commented: (HIVEMIND-170) HiveMind can be too demanding about cross-dependencies within hivemind.FactoryDefaults

    [ http://issues.apache.org/jira/browse/HIVEMIND-170?page=comments#action_12425503 ] 
            
Knut Wannheden commented on HIVEMIND-170:
-----------------------------------------

It would definitely be nice if the symbols defined within one contribution (or just part of the same symbol source) could depend on each other (provided there are no circular dependencies). But I can also see why HiveMind doesn't like this. As you say it would be nice if it at the very least indicated the line number of the problematic symbol in the error message.

HiveMind could of course be even lazier about the creation of the configuration contribution objects by delaying the creation of every individual contribution element of a configuration point to the point where it is accessed in the List (using List#get(int) or Iterator#next()) as opposed to instantiate all of them at once. This would of course also delay the reporting of potential problems. But I think it's an interesting idea. Would it even make sense?

Or should the symbol sources configuration play a special role and somehow be loaded earlier during the registry creation?

> HiveMind can be too demanding about cross-dependencies within hivemind.FactoryDefaults
> --------------------------------------------------------------------------------------
>
>                 Key: HIVEMIND-170
>                 URL: http://issues.apache.org/jira/browse/HIVEMIND-170
>             Project: HiveMind
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: 1.1, 1.0
>         Environment: HiveMind 1.1
>            Reporter: Howard M. Lewis Ship
>
> I have the following contributions to hivemind.FactoryDefaults:
> 	<contribution configuration-id="hivemind.FactoryDefaults">
> 		<default symbol="peg.host" value="localhost"/>
> 		<default symbol="peg.port" value="8090"/>
> 		<default symbol="peg.context" value="pe"/>
> 		<default symbol="peg.base-url" value="http://${peg.host}:${peg.port}/${peg.context}/peg"/>
> 	</contribution>
> It seems reasonable to me that I should be able to reference other symbols defined at the same level, but I get a failure at application startup for my Tapestry application.  In fact, I get an unbelievable torrent of nested exceptions, none of which point to the above XML.
> etRootCause():
> org.apache.hivemind.ApplicationRuntimeException: Error at jar:file:/. . ./lib/runtime/hivemind-1.1.jar!/META-INF/hivemodule.xml, line 94, column 60: Unable to initialize service hivemind.FactoryDefaultsSymbolSource (by invoking method initializeService on org.apache.hivemind.service.impl.DefaultsSymbolSource): A recursive call to construct configuration hivemind.FactoryDefaults has occured.  This indicates a cycle between one or more configurations or services. [jar:file:/. . ./lib/runtime/hivemind-1.1.jar!/META-INF/hivemodule.xml, line 94, column 60]
> 	at org.apache.hivemind.impl.StrictErrorHandler.error(StrictErrorHandler.java:39)
> 	at org.apache.hivemind.impl.ErrorLogImpl.error(ErrorLogImpl.java:40)
> 	at org.apache.hivemind.service.impl.BuilderFactoryLogic.error(BuilderFactoryLogic.java:95)
> 	at org.apache.hivemind.service.impl.BuilderFactoryLogic.invokeInitializer(BuilderFactoryLogic.java:255)
> 	at org.apache.hivemind.service.impl.BuilderFactoryLogic.createService(BuilderFactoryLogic.java:81)
> . . .
> org.apache.hivemind.ApplicationRuntimeException: A recursive call to construct configuration hivemind.FactoryDefaults has occured.  This indicates a cycle between one or more configurations or services.
> 	at org.apache.hivemind.impl.ConfigurationPointImpl.constructElements(ConfigurationPointImpl.java:180)
> 	at org.apache.hivemind.impl.ElementsInnerProxyList.inner(ElementsInnerProxyList.java:46)
> 	at org.apache.hivemind.impl.ElementsInnerProxyList.size(ElementsInnerProxyList.java:62)
> 	at org.apache.hivemind.impl.ElementsProxyList.size(ElementsProxyList.java:60)
> 	at org.apache.hivemind.service.impl.DefaultsSymbolSource.initializeService(DefaultsSymbolSource.java:42)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:585)
> 	at org.apache.hivemind.service.impl.BuilderFactoryLogic.findAndInvokeInitializerMethod(BuilderFactoryLogic.java:275)
> 	at org.apache.hivemind.service.impl.BuilderFactoryLogic.invokeInitializer(BuilderFactoryLogic.java:249)
> 	at org.apache.hivemind.service.impl.BuilderFactoryLogic.createService(BuilderFactoryLogic.java:81)
> 	at org.apache.hivemind.service.impl.BuilderFactory.createCoreServiceImplementation(BuilderFactory.java:42)
> 	at org.apache.hivemind.impl.InvokeFactoryServiceConstructor.constructCoreServiceImplementation(InvokeFactoryServiceConstructor.java:84)
> 	at org.apache.hivemind.impl.servicemodel.AbstractServiceModelImpl.constructCoreServiceImplementation(AbstractServiceModelImpl.java:107)
> 	at org.apache.hivemind.impl.servicemodel.AbstractServiceModelImpl.constructNewServiceImplementation(AbstractServiceModelImpl.java:157)
> 	at org.apache.hivemind.impl.servicemodel.AbstractServiceModelImpl.constructServiceImplementation(AbstractServiceModelImpl.java:139)
> 	at org.apache.hivemind.impl.servicemodel.SingletonServiceModel.getActualServiceImplementation(SingletonServiceModel.java:68)
> 	at $SymbolSource_109faf781e9._service($SymbolSource_109faf781e9.java)
> 	at $SymbolSource_109faf781e9.valueForSymbol($SymbolSource_109faf781e9.java)
> 	at $SymbolSource_109faf781e8.valueForSymbol($SymbolSource_109faf781e8.java)
> 	at org.apache.hivemind.impl.RegistryInfrastructureImpl.valueForSymbol(RegistryInfrastructureImpl.java:307)
> 	at org.apache.hivemind.impl.SymbolExpander.expandSymbol(SymbolExpander.java:217)
> 	at org.apache.hivemind.impl.SymbolExpander.expandSymbols(SymbolExpander.java:176)
> 	at org.apache.hivemind.impl.RegistryInfrastructureImpl.expandSymbols(RegistryInfrastructureImpl.java:296)
> 	at org.apache.hivemind.impl.ModuleImpl.expandSymbols(ModuleImpl.java:144)
> 	at org.apache.hivemind.schema.rules.RuleUtils.processText(RuleUtils.java:110)
> 	at org.apache.hivemind.schema.rules.ReadAttributeRule.begin(ReadAttributeRule.java:66)
> 	at org.apache.hivemind.parse.ConversionDescriptor.begin(ConversionDescriptor.java:141)
> 	at org.apache.hivemind.impl.SchemaElement.fireBegin(SchemaElement.java:228)
> 	at org.apache.hivemind.impl.SchemaProcessorImpl.processElement(SchemaProcessorImpl.java:255)
> 	at org.apache.hivemind.impl.SchemaProcessorImpl.processRootElement(SchemaProcessorImpl.java:235)
> 	at org.apache.hivemind.impl.SchemaProcessorImpl.process(SchemaProcessorImpl.java:223)
> 	at org.apache.hivemind.impl.ConfigurationPointImpl.processContributionElements(ConfigurationPointImpl.java:268)
> 	at org.apache.hivemind.impl.ConfigurationPointImpl.constructElements(ConfigurationPointImpl.java:189)
> 	at org.apache.hivemind.impl.ElementsInnerProxyList.inner(ElementsInnerProxyList.java:46)
> 	at org.apache.hivemind.impl.ElementsInnerProxyList.size(ElementsInnerProxyList.java:62)
> 	at org.apache.hivemind.impl.ElementsProxyList.size(ElementsProxyList.java:60)
> 	at org.apache.hivemind.service.impl.DefaultsSymbolSource.initializeService(DefaultsSymbolSource.java:42)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:585)
> 	at org.apache.hivemind.service.impl.BuilderFactoryLogic.findAndInvokeInitializerMethod(BuilderFactoryLogic.java:275)
> 	at org.apache.hivemind.service.impl.BuilderFactoryLogic.invokeInitializer(BuilderFactoryLogic.java:249)
> 	at org.apache.hivemind.service.impl.BuilderFactoryLogic.createService(BuilderFactoryLogic.java:81)
> 	at org.apache.hivemind.service.impl.BuilderFactory.createCoreServiceImplementation(BuilderFactory.java:42)
> 	at org.apache.hivemind.impl.InvokeFactoryServiceConstructor.constructCoreServiceImplementation(InvokeFactoryServiceConstructor.java:84)
> 	at org.apache.hivemind.impl.servicemodel.AbstractServiceModelImpl.constructCoreServiceImplementation(AbstractServiceModelImpl.java:107)
> 	at org.apache.hivemind.impl.servicemodel.AbstractServiceModelImpl.constructNewServiceImplementation(AbstractServiceModelImpl.java:157)
> 	at org.apache.hivemind.impl.servicemodel.AbstractServiceModelImpl.constructServiceImplementation(AbstractServiceModelImpl.java:139)
> 	at org.apache.hivemind.impl.servicemodel.SingletonServiceModel.getActualServiceImplementation(SingletonServiceModel.java:68)
> 	at $SymbolSource_109faf781e9._service($SymbolSource_109faf781e9.java)
> 	at $SymbolSource_109faf781e9.valueForSymbol($SymbolSource_109faf781e9.java)
> 	at $SymbolSource_109faf781e8.valueForSymbol($SymbolSource_109faf781e8.java)
> 	at org.apache.hivemind.impl.RegistryInfrastructureImpl.valueForSymbol(RegistryInfrastructureImpl.java:307)
> 	at org.apache.hivemind.impl.ModuleImpl.valueForSymbol(ModuleImpl.java:186)
> 	at org.apache.tapestry.services.impl.SymbolSourcesPropertySource.getPropertyValue(SymbolSourcesPropertySource.java:40)
> 	at $IPropertySource_109faf781d8.getPropertyValue($IPropertySource_109faf781d8.java)
> 	at $IPropertySource_109faf781d7.getPropertyValue($IPropertySource_109faf781d7.java)
> 	at $IPropertySource_109faf781d9.getPropertyValue($IPropertySource_109faf781d9.java)
> 	at $IPropertySource_109faf78199.getPropertyValue($IPropertySource_109faf78199.java)
> 	at $IPropertySource_109faf78198.getPropertyValue($IPropertySource_109faf78198.java)
> 	at org.apache.tapestry.services.impl.PropertyObjectProvider.provideObject(PropertyObjectProvider.java:47)
> 	at $ObjectProvider_109faf78145.provideObject($ObjectProvider_109faf78145.java)
> 	at $ObjectProvider_109faf78144.provideObject($ObjectProvider_109faf78144.java)
> 	at org.apache.hivemind.service.impl.ObjectTranslator.translate(ObjectTranslator.java:75)
> 	at $Translator_109faf7813e.translate($Translator_109faf7813e.java)
> 	at org.apache.hivemind.service.impl.BuilderPropertyFacet.getFacetValue(BuilderPropertyFacet.java:55)
> 	at org.apache.hivemind.service.impl.BuilderFactoryLogic.wireProperty(BuilderFactoryLogic.java:357)
> 	at org.apache.hivemind.service.impl.BuilderFactoryLogic.setProperties(BuilderFactoryLogic.java:320)
> 	at org.apache.hivemind.service.impl.BuilderFactoryLogic.createService(BuilderFactoryLogic.java:77)
> 	at org.apache.hivemind.service.impl.BuilderFactory.createCoreServiceImplementation(BuilderFactory.java:42)
> 	at org.apache.hivemind.impl.InvokeFactoryServiceConstructor.constructCoreServiceImplementation(InvokeFactoryServiceConstructor.java:84)
> 	at org.apache.hivemind.impl.servicemodel.AbstractServiceModelImpl.constructCoreServiceImplementation(AbstractServiceModelImpl.java:107)
> 	at org.apache.hivemind.impl.servicemodel.AbstractServiceModelImpl.constructNewServiceImplementation(AbstractServiceModelImpl.java:157)
> 	at org.apache.hivemind.impl.servicemodel.AbstractServiceModelImpl.constructServiceImplementation(AbstractServiceModelImpl.java:139)
> 	at org.apache.hivemind.impl.servicemodel.SingletonServiceModel.getActualServiceImplementation(SingletonServiceModel.java:68)
> 	at $ServletRequestServicerFilter_109faf781cb._service($ServletRequestServicerFilter_109faf781cb.java)
> 	at $ServletRequestServicerFilter_109faf781cb.service($ServletRequestServicerFilter_109faf781cb.java)
> 	at $ServletRequestServicerFilter_109faf781ca.service($ServletRequestServicerFilter_109faf781ca.java)
> 	at $ServletRequestServicer_109faf781ce.service($ServletRequestServicer_109faf781ce.java)
> 	at $ServletRequestServicer_109faf781c1.service($ServletRequestServicer_109faf781c1.java)
> 	at $ServletRequestServicer_109faf781c0.service($ServletRequestServicer_109faf781c0.java)
> 	at org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:123)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira