Cannot find entity after uninstall / reinstall

Hi Gang,
After tying to find an issue with the number of records/object being returned by the ORM - I have had to re-install Lucee onto my local machine.

Now, I am getting an error - stating that;

ERROR","ajp-nio-127.0.0.1-8009-exec-4","05/16/2022","22:17:01","","entity [question] with cfc name [gsncfc.db.webSurvey.question] does not exist, existing  entities are [answer, ..., question, ...], surveyRecipientState, surveySpec];

I don’t get it - the CFC it is saying doesn’t exist - is in the existing entities list it provides!

All my mappings / datasources / etc are all correct and match our Staging / Prod servers.
The code on my machine hasn’t changed - just the uninstall and reinstall of Lucee.
So I am pretty certain - that I have missed something in my reinstall - but can’t think of what.

I have uninstalled / reinstalled Lucee, 5.3.8.201 - via the windows installer.
I installed the IIS connector
I installed mod_cfml

Lucee Administrator works fine and dandy.

I updated Lucee to 5.3.8.206, via the Admin GUI.
I have configured all the mappings / datasources / customtags / etc.
My Lucee (admin) config is identical to our staging server.

IIS is configured with a separate website and app pool for each of our apps - the URLs work - in that they load the correct application (albeit with the above error).

Apart from restating the error message I see on screen - the logs are unremarkable.

I use MariaDB - so I also changed out the MySQL driver that I normally use for the MariaDB one.
No difference.
I have returned to using MySQL - as that is what we use in Staging / Prod.

Can anyone think of anything I have missed?
Thanks!

Don’t forget to tell us about your stack!

OS: Windows 10
Java Version: AdoptOpenJDK 11.0.11
Tomcat Version: 9.0.46
Lucee Version: 5.3.8.206

Are you totally sure? Did you dump the application mappings on both environments to be totally sure? E.g. with:

<cfscript>
dump([application.getApplicationSettings()]);

</cfscript>

I’d recheck the mappings that way.

Thanks very much…
In the admin GUI (server) the following is set;
image

When I run your code,
The mappings are empty.
|shrugs| : I have no idea!

Thanks
Gavin.

Hmmmm, I can’t follow. Are the settings you’ve posted from your local dev Lucee Server Admin? Or the prod Server Admin?

If you dump the code I’ve submitted in your local web application, and they are empty, then I suspect that:

  • you are accessing different Lucee instances (with different settings), or
  • you are resetting the mappings somewhere in your local Application.cfc code so they are set as empty.

What does the Lucee Web Admin say? Do the mappings show up?

Also, I’d try moving the mapping and all other settings from your Server Admin to the Application.cfc, so these don’t get wiped out if you need to upgrade Lucee or reset the lucee server context.

Hi there again,

The mappings are in the Server and the Web versions of the Admin GUI.

I don’t really understand what you mean by Lucee contexts… other than what appears in the Server/Overview section of the admin GUI - where I normally edit the MD5 hash into a “nice” label.

And if I click on the “centra” link in Overview, I get a Lucee web admin, with my app’s starting url;
http://centra.localhost/lucee/admin/web.cfm

And in this, the mappings are present, too.

As an extra I did an Application EXPORT to get the mappings out of the Admin - and added them into the Application.cfc of the application. But it hasn’t helped - I get the same error (missing entity), as before.

When we produce an error - we create an email with dumps of the available scopes.
and the mappings are present - and correct for my local environment.

Thanks
Gavin.

What does an expandpath on the component show?

Actually it isn’t. It’s finding question but not gsncfc.db.webSurvey.question. Which suggests it doesn’t know how to resolve gsncfc.db.webSurvey. Hence Andreas’s and Zac’s questions about your mappings.

Might be worth showing us your ormSettings in Application.cfc as well.

We have 4 apps that make up our suite, all of which run on the same server.

ALL of the 4 suffer from the same problem, but of course complain about different entities not being found.

Here is the Application.cfc for the websurvey app, used in this thread’s error;

this.ormEnabled = true;
	this.ormSettings = {
		datasource = "GSN_websurvey"
		, dbcreate = "none"
		, cfclocation = "/gsncfc/db/websurvey"
		, automanagesession = false
		, flushatrequestend = false
		, useDBForMapping = false
		, eventHandling = true
		, eventhandler = "gsncfc.db.GlobalEventHandler"
		, logSQL = false
	};

Thanks - again!

Does this return the correct location of your question component?

dump( ExpandPath( "/gsncfc/db/webSurvey/" ) )
C:\inetpub\wwwroot\cfmapping\gsn\db\webSurvey\

which is correct. the CFC is in that directory.

Hmmm… Let’s see, did you check if the user running Lucee (on a default win install its “local service”) is allowed to read those files and components?

Just saw that the dump only shows mappings set in Application.cfc, but doesn’t show if they’ve been set within the server admin. Sorry for that. Was my wrong assumption.

Yes;
local.service has full rights to everything in /inetpub/wwwroot

Thanks

Hi Andreas,
The mappings are defined in Server and visible in Web Lucee Admin UIs

Thanks

Mysterious. Not sure it’ll make a difference but try clearing your WEB-INF/cfclasses/ directory and running SystemCacheClear( "component" ); in case there’s a caching issue of some kind.

Hi Julian,
I certainly have tried all those things.
And it made no difference.

I am pretty convinced that it is a install / config issue of some sort.

I have just created a docker image version of a Lucee install - without IIS - and my app works fine.
No mention at all of entities not being found.
SO it is good that I have it working…

But I still can’t work out the issue with IIS.
I’ll keep lugging away at it and see if I can find anything more.

Thanks to everyone for your help.
Gavin.

  1. Check your permissions. The IIS_USER, needs to work in conjunction with Lucee Service user, and both need permission to at least read and execute cfml, as well as view directories.

Check your firewall settings
Better yet, bind a Microsoft virtual adapter to a dedicated private ip so you can better log and debug

  1. Unless you specifically need IIS features, you do not need IIS. Any windows binary of apache httpd is faster than IIS, less of a security concern and uses far less memory.