Me neither, though I have seen it.
In general, we include the message/detail from 'CFCATCH.' in messages
that are thrown in this way, maybe ColdSpring should to ?
--
Tom
Do I need to log a bug for this then ?
--
Tom
The error I'm getting is: [quote] Bean definition for bean named:
configbean could not be found.[/quote] Configbean is the first one
accessed by coldspring, so it tells me there's something really basic wrong.
If I cut and paste the configbean definition back into the coldspring.xml
file, the error refers to the next bean instead, so that tells me there is
something wrong with my import.
Can anyone see where I've got it wrong?
<!--////////My main coldspring.xml file: ////////-->
<beans>
<import resource="/cfcs/config/Resources/Utility-beans.xml"/>
<import resource="/cfcs/config/Resources/CMS-TreeControl-beans.xml"/>
<import resource="/cfcs/config/Resources/CMS-Content-beans.xml"/>
<import resource="/cfcs/config/Resources/Admin-beans.xml"/>
<import resource="/cfcs/config/Resources/user-beans.xml"/>
...
</beans>
<!--////////One of these imported files: ////////-->
<beans>
<bean id="TimeZoneCFC" class="cfcs.utilities.TimeZone" />
<bean id="Pagination" class="cfcs.utilities.Pagination" lazy-init="true"/>
<bean id="UtilitiesLibrary" class="cfcs.utilities.UtilitiesLibrary"
lazy-init="true">
<constructor-arg name="argsConfiguration">
<ref bean="configbean"/>
</constructor-arg>
</bean>
<bean id="fckeditor" class="forms.scripts.ajax.fckeditor.fckeditor"
lazy-init="true"/>
<bean id="configbean" class="cfcs.config.configbean">
<constructor-arg name="argsConfigXMLname">
<value>/cfcs/config/config.xml</value>
</constructor-arg>
<constructor-arg name="Timezone">
<ref bean="TimeZoneCFC"/>
</constructor-arg>
</bean>
</beans>
The bean definitions are merely a cut and paste from the previously working
coldspring.xml file, so I know they are all correctly spelled etc, and the
paths are correct.
I just KNOW this is going to be one of those 'slap the forehead' moments!
Cheers
Mike Kear
Windsor, NSW, Australia
0414 622 847
Adobe Certified Advanced ColdFusion Developer
AFP Webworks Pty Ltd
http://afpwebworks.com
Full Scale ColdFusion hosting from A$15/month
Thanks Dan.
There is no change to a working application, except moving the definitions into the imported xml files, so I know the actual config bean is ok, and I know the config bean xml snippet is correct, except perhaps for paths. But then I haven’t moved any of the cfcs, so the paths should still be the same.
And if I move the bean definition for config bean from the imported file back into Coldspring.xml where it was, it works and the error I get relates to the next bean coldspring is trying to find. So that tells me the problem is either:
[A] the import directive – the syntax or path or something wrong with that or
[B] the subsidiary xml file that I’m importing
Nothing else has changed on a working application. I change it back and it works again.
Cheers
Mike Kear
Windsor, NSW, Australia
0414 622 847
Adobe Certified Advanced ColdFusion Developer
AFP Webworks Pty Ltd
Full Scale ColdFusion hosting from A$15/month
No virus
found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.422 / Virus Database: 270.14.20/2441 - Release Date: 10/19/09
14:33:00
The error message is as I said in my original post:
[quote]
|
|
|
Bean definition for bean named: configbean could not be found. |
|
|
|
|
|
The error occurred in E:\Sites\Mysites\Sitename\wwwroot\cms\coldspring\beans\DefaultXmlBeanFactory.cfc: line 342 |
|
|
340 : <cfreturn variables.parent.getBean(arguments.beanName)> 341 : <cfelse> 342 : <cfthrow type="coldspring.NoSuchBeanDefinitionException" detail="Bean definition for bean named: #arguments.beanName# could not be found."/> 343 : </cfif> 344 : |
[/quote]
Your solution is girlish (no offense, girls). Checking boxes & using
built in debugging features?
Real Men use Brute Force.
Eliminate all variables, then walk the line. Like Pat said.
--
Crime in full glory consolidates authority by the sacred fear it inspires.
Emile M. Cioran
Thanks Brian.
The configbean hasn’t moved. Nor has the XML file it uses to set all the variables it uses. The file called argsConfigXMLname contains all the actual settings that are to be configured for this site – email addresses, passwords, dsn names, etc etc. about a hundred variables of different kinds that set everything from datasource name and type to thumbnail height to path locations etc.
So there is no need to change anything inside the bean definition.
It’s a fully working application. The only things I’m changing are the Coldspring.xml file, which as you know contains the bean definitions. Even then, I’m not retyping the bean definitions – only cut and paste them into the new file, then importing that file into the already-existing coldspring.xml file.
When I take a fully working Coldspring.xml file, comment out the following line:
<bean id="TimeZoneCFC" class="cfcs.utilities.TimeZone" />
And paste that exact same line into a file called Utility-beans.xml, which contains only the following:
<beans>
<bean id="TimeZoneCFC" class="cfcs.utilities.TimeZone" />
</beans>
Then I replace the commented-out line in the coldspring.xml with the following:
<import resource="Utility-beans.xml"/>
(the two xml files are in the same directory)
Then it ought to work I’d have thought. All I’m doing now is moving a single bean definition into a separate file which is supposed to be imported. But it isn’t.
The next thing I thought was that maybe the location of the import statement is important. So I tried putting it at the very top of the coldspring.xml document, outside the <beans></beans> tag. It said the document was not well formed. So that didn’t work.
I tried putting the import line inside the <beans> tag but ahead of everything else. Then I got the error message: There is no bean registered with the factory with the id TimeZoneCFC So I’m assuming the XML syntax is correct now, but isn’t working.
Remember no paths have changed. All I’ve done is move a single line from one file to a second file which is imported. I’ve even checked the case of all the file names etc to make sure they’re exactly the same in case the XML import directive is case sensitive.
Oh and @denstar, I might be a girl, but I thought your response was particularly unhelpful. I don’t have a bloody clue what ‘walk the line’ means in this context. I am taking what I thought was a logical step-by-step approach to isolating this problem
I have looked for some kind of documentation on the import directive in case perhaps I’ve made a syntax error, but there isn’t any that I could find. The reference.pdf on the coldspringframework.org site wont download for me, so all I have to go on is Sean Corfield’s post in the CF-TALK a few months ago. And that’s what I copied in the first place.
Cheers
Mike Kear
Windsor, NSW, Australia
0414 622 847
Adobe Certified Advanced ColdFusion Developer
AFP Webworks Pty Ltd
Full Scale ColdFusion hosting from A$15/month
From: coldspri...@googlegroups.com
[mailto:coldspri...@googlegroups.com] On Behalf Of Brian Kotek
Sent: Tuesday, 20 October 2009 1:24 PM
To: coldspri...@googlegroups.com
Subject: [coldspring-users] Re: What's wrong with my import xml?
Are you sure that once you move the XML into the separate include file, that the file path you are specifying for the "argsConfigXMLname" is still valid, or that whatever is using that path is still using it correctly?
[A] what’s Narwhal?
[B] it’s Coldspring 1.2 – the latest stable version. ( I never use bleeding edge of anything – only the latest full release version) But you make a good point – I’ll check that a previous version hasn’t crept in by copying some folders from somewhere else or some such.
Cheers
Mike Kear
Windsor, NSW, Australia
0414 622 847
Adobe Certified Advanced ColdFusion Developer
AFP Webworks Pty Ltd
Full Scale ColdFusion hosting from A$15/month
It’s definitely ColdSpring 1.2 stable – the latest supported stable download.
Cheers
Mike Kear
Windsor, NSW, Australia
0414 622 847
Adobe Certified Advanced ColdFusion Developer
AFP Webworks Pty Ltd
Full Scale ColdFusion hosting from A$15/month
Thanks but I have been punished enough by being forced (by needs of a current project) to sign on to Facebook. Now I am stunned to learn about Peter Tilbrook’s achievements in Mafia Wars and Farmville, what Heather Robin is having for breakfast, how tired Jeff Davis is, how bored LuAnn Lozer is, and Scott Barnes agonising over how he’s going to get by without work for 3 months. I don’t need to learn even more trivial facts that have no impact whatsoever on me.
Twitter remains off my radar until I have a money-earning reason to change my mind.
Whoops! Sorry Mike, I was calling Dan a girl, not you.
And I was just kidding about that, he's got balls too. Did you see
the way he handled the lost convention emails?
Bravo, I say.
As for walking the line... I didn't mean the "in jail" kind of line,
I meant the logical step-by-step approach deal you're doing. A
telephone or electric line... a fence... maybe just logic... eh.
Tony is walking the line. =)
--
Criticism is a misconception: we must read not to understand others
but to understand ourselves.
Emile M. Cioran