You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Pierre Moermans <pi...@pm-soft.be> on 2005/08/01 11:05:04 UTC
extension, configue & hivemind
Hello list,
In my project (taupe), I would like my business objects to find the DAO
objects from a hivemind registry which is defined from an XML file.
To do this, I need a singleton (DAOServiceLocator) object that provides an
interface to the hivemind registry (if you have better ideas, please share !
:-)). This singleton, should be called a first time, when the application
starts, to set the registry (by setting the location of the XML file with the
method "setRegistry").
In the taupe.application, I've added:
<extension name="DAOServiceLocator"
class="be.pmsoft.taupe.utils.DAOServiceLocator" immediate="true">
<configure property-name="registry">WEB-INF/service-dao.xml</configure>
</extension>
and in the DAOServiceLocator.java, I have the method:
public void setRegistry(String filename) {
RegistryBuilder builder = new RegistryBuilder();
builder.addModuleDescriptorProvider( new XmlModuleDescriptorProvider(new
DefaultClassResolver(), new FileResource(filename)));
builder.addDefaultModuleDescriptorProvider();
registry = builder.constructRegistry(Locale.getDefault());
}
but when I start tomcat, I have the following error:
org.apache.tapestry.util.xml.DocumentParseException: Unable to read
context:/WEB-INF/taupe.application: Class
be.pmsoft.taupe.utils.DAOServiceLocator does not contain a property named
'null'.
location: context:/WEB-INF/taupe.application
Does anybody have an idea why it says 'null', and how to solve that ?
My config is:
tomcat 5.5
tapestry 4.0-beta3
Hivemind 1.1-beta1
JDK 1.5.0_03
Many thanks,
Pierre
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org