Aahhhhh... HiveMind-57 and HiveMind-15 Sorry for the noise.
-----Original Message----- From: Steve Gibson Sent: Tuesday, October 12, 2004 3:36 PM To: [email protected] Subject: [SPAM] - Possible bug in ResourceTranslator - Email has different SMTP TO: and MIME TO: fields in the email addresses Hi. I thought I would shoot this to the dev group before I create a bug, in case I am doing something wrong, or misdiagnosing this. I have a schema which includes: <schema id="Configuration"> <element name="file"> <attribute name="location" required="true" translator="resource"/> <rules> <push-attribute attribute="location"/> <invoke-parent method="addElement"/> </rules> </element> ... </schema> I have a contribution: <file location="${bus.mgr.config.dir}/${hibernate.mapfile}"/> I have ... aaahh, just realised my problem, but I will keep going (for feedback) bus.mgr.config.dir is an absolute path I have code in a service that does: Resource res = (Resource)item; org.apache.hivemind.Registry reg = com.cowww.commons.hivemind.RegistryFactory.getRegistry(); try { configuration.addResource(reg.expandSymbols(res.getPath(), new LocationImpl(res))); } catch (MappingException me) { log.error("Error in resource: " + res.getName(), me); throw new ApplicationRuntimeException(me); } Ignore the bad combination of logging and exception handling, please. My problem is I specified an absolute path for my resource location, and the resource translator prepended the path to the hivemodule.xml. I end up with: net.sf.hibernate.MappingException: Resource: file:/C:/Documents%20and%20Settings/steveg/dev/cowww/obj/META-INF/C:\Doc uments and Settings\steveg\dev\cowww/cfg/mapping.hbm.xml not found Besides the fact I had to manually expand the symbols, it seems odd that, though an error is logged, as documented, the Resource object is still in the configuration. Downstream code has no idea that the resource does not exist until it effectively duplicates the effort of the ResourceTranslator. So, 2 issues: 1. ResourceTranslator does not expandSymbols 2. ResourceTranslator returns invalid Resource. Steve Gibson Software Engineer COWWW Software --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
