[ColdBox 4.3.0] Modules Error?

Running: Lucee 5.0.1.18

After upgrading to Coldbox 4.3 from 4.2

It seems that cannot find my modules anymore:

invalid component definition, can’t find component [myModulename.myModel.myService]
Stacktrace The Error Occurred in
coldbox/system/core/util/Util.cfc: line 222

Any ideas?

Thank you

Felipe Serrano

I did a Lucee reset, that fix my original issue, but, this is now showing:

I updated cborm to 1.2.2

Is there a list of chnages in ColdBox 4.3?

Thanks :slight_smile:

Can you provide the exact stack trace for this error? I need to see where the ORMUtilSupport.cfc component is getting instantiated.

This appears to be an issue with the new Lucee 5 abstract component support. The Git log shows that the abstract modifier has been on that CFC since 2014 so it’s likely that you’ve changed your Lucee version recently. I’ve also noticed that the getComponentMetadata() function in Lucee throws this error when pointed at an abstract component which seems like a bug to me.

And to answer your question, all the changes in 4.3 are available here. See the bottom of the post for the full release notes.

~Brad

Can you provide the stack trace for this error? I put in this ticket for Lucee the other day which is now already fixed on Lucee’s bleeding edge, but I’d like to know for sure if it was the issue: [LDEV-1042] Can't get metadata on abstract CFC - Lucee

Thanks!

~Brad

`

lucee.runtime.exp.ApplicationException: you cannot instantiate an abstract component [/modules/cborm/models/util/ORMUtilSupport.cfc], this component can only be extended by other components
at coldbox.system.core.util.util_cfc$cf.udfCall2(/coldbox/system/core/util/Util.cfc:222)
at coldbox.system.core.util.util_cfc$cf.udfCall(/coldbox/system/core/util/Util.cfc)
at coldbox.system.ioc.config.mapping_cfc$cf.udfCall7(/root/coldbox/system/ioc/config/Mapping.cfc:599)
at coldbox.system.ioc.config.mapping_cfc$cf.udfCall(/root/coldbox/system/ioc/config/Mapping.cfc)
at coldbox.system.ioc.config.binder_cfc$cf.udfCall8(/root/coldbox/system/ioc/config/Binder.cfc:992)
at coldbox.system.ioc.config.binder_cfc$cf.udfCall(/root/coldbox/system/ioc/config/Binder.cfc)
at coldbox.system.web.services.moduleservice_cfc$cf.udfCall2(/root/coldbox/system/web/services/ModuleService.cfc:430)
at coldbox.system.web.services.moduleservice_cfc$cf.udfCall(/root/coldbox/system/web/services/ModuleService.cfc)
at coldbox.system.web.services.moduleservice_cfc$cf.udfCall2(/root/coldbox/system/web/services/ModuleService.cfc:396)
at coldbox.system.web.services.moduleservice_cfc$cf.udfCall(/root/coldbox/system/web/services/ModuleService.cfc)
at coldbox.system.web.services.moduleservice_cfc$cf.udfCall2(/root/coldbox/system/web/services/ModuleService.cfc:345)
at coldbox.system.web.services.moduleservice_cfc$cf.udfCall(/root/coldbox/system/web/services/ModuleService.cfc)
at coldbox.system.web.services.loaderservice_cfc$cf.udfCall(/root/coldbox/system/web/services/LoaderService.cfc:57)
at coldbox.system.bootstrap_cfc$cf.udfCall1(/root/coldbox/system/Bootstrap.cfc:70)
at coldbox.system.bootstrap_cfc$cf.udfCall(/root/coldbox/system/Bootstrap.cfc)

`
This was from running the most recent stable release (5.1.0.34).

I can confirm that the issue is not present on the most recent snapshot version (5.1.1.32).

This is a little disappointing as it prevents us from running our application on Lucee 5 in production (since we can’t really wait for a new stable release of Lucee with the fix in it). Would Ortus be willing to make a change within Coldbox to fix this issue in a more timely manner?

Thanks,
Ben Knox

Just remove the keyword “abstract” from that file. We actually already put this fix in 9 days ago:
https://github.com/coldbox-modules/cbox-cborm/commit/5e2c9e8c3f538777fb89848bd67949427916251f

You can just install the development version of cborm for now.

Thanks!

~Brad

ColdBox/CommandBox Developer Advocate
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

Excellent! I like that solution better than what I came up with, but in case anyone else is interested you can do this instead:

Copy the ORMUtilSupport.cfc file to somewhere in your application’s source code and remove the

modifier="abstract"
attribute from the component definition. Then create a mapping to override the original object with your own version

binder.map("ORMUtilSupport@cborm").to("your.new.file.location");

Cheers,
Ben Knox

Brad,

Related to the fix that you made on cborm, I ran CommandBox (3.1.0+00360) command to get the update.

box update cborm

It returned, “There are no outdated dependencies!”

The fix to cborm is still in development (it has not been published to forgebox). You will need to define your cborm dependancy using the git endpoint (https://ortus.gitbooks.io/commandbox-documentation/content/packages/endpoints/git.html) instead. Or you can use the alternate method I suggested above (I can confirm that it works).

Cheers,
Ben Knox

Yep, what Ben said. You can either install the development branch directly or you’ll have to wait until Luis releases the change as a new version of cborm.

Unfortunately, the repository format for cborm doesn’t allow you to install it directly as a dependency. You might be tempted to do:

install coldbox-modules/cbox-cborm#development

but that won’t do what you expect since the entire repo is actually a test harness ColdBox app and the module is in a subfolder. When we merge to master, we have a job that uploads just the module to S3, but I don’t believe we have any downloadable artifacts for the bleeding edge which sort of sucks. I’ll poke at Luis to see if I’m wrong.

Thanks!

~Brad

ColdBox/CommandBox Developer Advocate
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

I think the problem is that no bleeding edge releases are built by Travis. However, they are built by our Jenkins server. Thus in the artifacts repository. So you can install from the artifacts repo directly:

http://integration.stg.ortussolutions.com/artifacts/ortussolutions/coldbox-modules/cborm/1.3.0/