Lucee 6 createObject() returns instance from another project

Hey everybody, I’m running into a strange problem on our first Lucee 6 instance. We’re running 2 projects there, “api-live” and “api-stage” which are basically the same project, but different git branches for production and user testing.

Inside we have

/api
  /v2
    /Application.cfc -> Handles all requests
    /index.cfm
/index.cfm -> Returns 404

If i use following line in my /api/v2/Application.cfc’s onRequestStart:
local.test = createObject('component', 'api.v2.path.to.component')

And dump local.test, getMetaData(local.test) or getComponentMetaData(local.test), all the paths, sources point to “E:\projects\api-live\api\v2\path\to\component.cfc” (live), even tho I’m dumping from “E:\projects\api-stage\api\v2\Application.cfc” (stage) and I cannot figure out why.

  • Unfortunately I cannot upgrade the Lucee Version yet due to permission
  • I saw in .CFConfig.json, that “mode” is set to “single”
  • Both Application.cfc have a unique this.name and this.applicationName
  • I tried adding an Application.cfc to the root of the project with a unique name too
  • I tried clearing component, application and function cache in the Lucee Admin
  • I tried using the new xyz() syntax

Don’t forget to tell us about your stack!

OS: Windows Server 2022 10.0.20348
Java Version: 16.0.2 (from /lucee/jre/release)
Tomcat Version: 9.0.62
Lucee Version: 6.1.0.243

does this show any clues?

We had the same problem. We ended up having to take Lucee out of single mode and that resolved the issue. Next week I will see if I can figure a way to duplicate it and share the results.

In my testing, I was able make things work by clearing the caches in the admin area in a specific order. It would then work for a bit until both sites applications were loaded.

I wasn’t able to find a pattern as to why, but some cfcs would load correctly, while other CFC/functions would load from the other site.

I know this wasn’t exactly helpful in figuring out what is going on, but wanted to share my experience.

I see there is a test suite for this. Single Mode Test Suite I will expand on that.