[Zope-CMF] Re: Five: question on zcml
Tres Seaver
tseaver at palladion.com
Wed Mar 29 09:43:34 EST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
robert rottermann wrote:
> Hi there,
>
> I'd like to use GenericSetup in one of our tools.
> In this tool I have a directory exportimpot with a config.zcml and
> actions.py
> (everithing copied from CMFCore actually)
>
> ther is a class declaration for ActionsToolXMLAdapter in
> importexport.actions.py
>
> Why do I get the traceback at the end of this email?
>
> thanks for pointers
> Robert
>
>
> config.zcml:
>
> *<configure*
> xmlns="http://namespaces.zope.org/zope"
> xmlns:five="http://namespaces.zope.org/five"
> *>*
>
> *<include* package=".exportimport"*/>*
>
> *</configure>*
>
> exportimport.config.zcml
> <configure
> xmlns="http://namespaces.zope.org/zope"
> >
>
> <adapter
> factory=".actions.ActionsToolXMLAdapter"
> provides="Products.GenericSetup.interfaces.IBody"
> for="Products.CMFCore.interfaces.IActionsTool
> Products.GenericSetup.interfaces.ISetupEnviron"
> />
> ...
> when I start Zope I get the following error:
> zope.configuration.xmlconfig.ZopeXMLConfigurationError: File
> "/home/zope/instances/fifve/Products/Five/skel/site.zcml", line 13.2-13.23
> ZopeXMLConfigurationError: File
> "/home/zope/instances/fifve/Products/RedPick/configure.zcml", line
> 10.2-10.36
> ZopeXMLConfigurationError: File
> "/home/zope/instances/fifve/Products/RedPick/exportimport/configure.zcml",
> line 5.2-10.8
> ConfigurationError: ('Invalid value for', 'factory', 'Module
> Products.RedPick.exportimport.actions has no global
> ActionsToolXMLAdapter in .actions.ActionsToolXMLAdapter')
The factory for the adapter is identified using a "relative" lookup when
its dotted name starts with a period. You have a module,
Products.RedPick.exportimport.actions, but it doesn't have that class.
Products.CMFCore.exportimport.actions *does* have it. You need to either:
- Point to the one in CMFCore, e.g.:
factory="Products.CMFCore.exportimport.acitons.ActionsToolXMLAdapter
- Import it or override it in your local actions module.
Tres.
- --
===================================================================
Tres Seaver +1 202-558-7113 tseaver at palladion.com
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFEKp0W+gerLs4ltQ4RAoRTAKDZ8974r3lqGuWqla5EWukE7zMgqACbBHcz
8QIkWjWQIdUo75CXv32eLKw=
=cu9G
-----END PGP SIGNATURE-----
More information about the Zope-CMF
mailing list