My structure is as follows:
Calling app file -
Location of file I’m calling -
I’ve defined a custom tag in the Lucee admin with a name of
empportal and resource of
C:\lucee\tomcat\webapps\empportal\ (also tried without a trailing
\). I restarted the server after adding the custom tag.
invalid component definition, can’t find component [empportal.Champs.CFC.invoice]
The Error Occurred in
C:\lucee\tomcat\webapps\web-portal\web-champs\dsp_outstandingInvoices.cfm: line 1
1: <cfinvoke component="empportal.Champs.CFC.invoice" method="getOutstandingItems" org_ID="#session.orgID#" returnvariable="getOutstandingItems" />
I also tried creating the component using
new empportal.Champs.CFC.invoice() and same issue.
OS: Windows 10
Java Version: 11.0.4 (AdoptOpenJDK) 64bit
Tomcat Version: Apache Tomcat/9.0.24
Lucee Version: 188.8.131.52 (also tried 184.108.40.206)
Don’t know if this helps, but by seeing your
I think there is a location structure issue. I’m missing Tomcat’s default ROOT folder there. Did you place or define a context for Tomcat somewhere? I’d say with your app and Tomcats defaults, Tomcat might not deploy your app correctly. Could you try the following as test? Let’s go step by step:
Move your webroot files to
That means, your index.cfm should be located at C:\lucee\tomcat\webapps\ROOT\index.cfm
Then move also your empportal files also to the ROOT, like so:
C:\lucee\tomcat\webapps\ROOT\empportal\ That means that your component invoice.cfc will be in
the ROOT, like so:
Restart Tomcat and let us know what the responses are. Then we can go further.
Thanks andreas, that fixed that issue!
I am running into another issue around custom tags.
I’m trying to access a CFC calling from
In groundForm.cfm I’m trying to call
<cfset select = new TravelPrefs.select()>
The CFC is located at
The error I’m getting is
invalid component definition, can't find component [TravelPrefs.select]`
Stacktrace The Error Occurred in
C:\lucee\tomcat\webapps\ROOT\champs\GroundTransport\groundForm.cfm: line 1
I’ve defined a custom tag of TravelPrefs with a directory of
I also tried adding a custom tag of champs with the parent directory and calling as
champs.TravelPrefs.select() and also tried as
../TravelPrefs.select() but same issue with everything I tried.
Ok. Glad you are making progress.
What I don’t understand right is, you are talking about adding custom_tags. Custom tags are certain cfm files that serve custom cfml tags. For example you would call a custom tag created with a myfooter.cfm file with
<cf_myfooter attr1="somevalue"... But somehow you are telling you are defining foldernames as custom tags. I’m some how confused. Sorry for questioning… Is it possible that you mean components (files that have .cfc ) extensions that are called with
<cfobject> <cfinvoke> createObject() or new() and not cfml custom tags? I’ve only seen components in your references. For clarification look at http://www.learncfinaweek.com/course/index/section/Code_Reuse/item/Custom_Tags/
See this article about components.
Take also a look at the following Stsckoverflow question.
Other place to set paths for components (not custom tags) would be the attribute
of your Application.cfc
Good luck and please let us know about your progress.
I am using components, in the ACF admin everything was defined under Custom Tags and I did not realize there’s a separate place to define components in the Lucee admin. That was a massive oversight on my part. Defining my path the same way under components has resolved the issue.