Re: [coldbox:25737] ColdBox 4.20 problem

48 views
Skip to first unread message

Sana Ullah

unread,
Jun 3, 2016, 6:08:34 AM6/3/16
to col...@googlegroups.com
Hi

If you are using Adobe CF then in administrator
Server Settings > Caching -->  "Component cache" + "Cache web server paths" both should be unchecked

The "Cache web server paths" cause lot of similar problems.



On 3 June 2016 at 11:00, cubortea <cubo...@gmail.com> wrote:
Hi thomas, here is my note for coldbox forum. Maybe you want to at something?

Hello,

I just upgrade my coldbox 3.8.1 to coldbox 4.2.0 and I have a strange problem in my adminsite application. Sometime, in my application I've got this error:

Message : Could not find the ColdFusion component or interface cborm.models.VirtualEntityService. | Detail : Ensure that the name is correct and that the component or interface exists.

in my code (admin.cfc), there is line to call :

var service = new cborm.models.VirtualEntityService(entityName=rc.table);
My code location is at /html/web/go/handlers/intern/admin.cfc

I have add the mapping in Application.cfc for this cborm.

 <cfset THIS.mappings[ "/cborm" ] = ExpandPath("./modules/cborm")>

and I have tried to addd mapping like this too

<cfset THIS.mappings[ "/cborm" ] = COLDBOX_APP_ROOT_PATH & "modules/cborm">

My Application location at /html/web/go/Application.cfc and I also extend /html/web/Application.cfc

The location for cborm is at /html/web/go/modules/cborm and my coldbox code is at /html/coldbox.
Another Info:
- /html is my document root and /web is an Alias in WebServer config.
- I use iframe to open my adminsite application

But the error still there. What make me strange is, I have to refresh the browser -/+ 3times and then the error is not shown anymore. Anyone know about this problem?

Thanks

Andri

--
--
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
For News, visit http://blog.coldbox.org
For Documentation, visit http://wiki.coldbox.org
For Bug Reports, visit https://ortussolutions.atlassian.net/browse/COLDBOX
---
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coldbox+u...@googlegroups.com.
To post to this group, send email to col...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/coldbox/7a1e5cc6-2856-4b39-a547-e3fb1887f60a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

cubortea

unread,
Jun 3, 2016, 6:23:41 AM6/3/16
to ColdBox Platform
Hi Sana,

thanks for the fast response. FYI, "Cache web server paths" is OFF. But  Trusted cache, Cache Template in request, Component cache and  all are ON

maybe you know the other issues for this case ?

br...@bradwood.com

unread,
Jun 3, 2016, 10:37:23 AM6/3/16
to col...@googlegroups.com
To debug if your mappings are correct, dump out #expandPath( '/orm' )# and see if points to where you expect.  Also note, cborm is the only ColdBox module that usually needs you to manually create a mapping since ORM loads before ColdBox.
 
Let's leave aside the mapping for a moment though and look at this line of code:
 
> var service = new cborm.models.VirtualEntityService(entityName=rc.table);
 
Don't create CFC's manually using createObject() or new().  You should be asking WireBox to create/inject/persist this for you!  This ensures that all the correct dependencies are injected in and your model is persisted correctly.
 
Instead of that line, place this cfproperty at the top of your /admin.cfc inside the component tag/keyword:
 
property name="userService" inject="entityService:user";
 
If you really need the entity name to be dynamic, you can ask WireBox for entity services ad-hoc:
 
service = getInstance( dsl="entityService:#rc.table#" );
 
This will still provide all the injection and singleton persistence.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

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

cubortea

unread,
Jun 6, 2016, 12:50:51 AM6/6/16
to ColdBox Platform
Hi Brad,

Thanks For the info, I will try it.




On Friday, June 3, 2016 at 5:08:34 PM UTC+7, Sana wrote:
Reply all
Reply to author
Forward
0 new messages