[ColdBox SEEK 4.0.0+00002 (Gideon Beta)] Builder.DSLDependencyNotFoundException

I have a fresh copy of ColdBox. Everything appears to be mapped and works correctly except the ORM service.

To troubleshoot, I recreated the setup used in the Udemy course: https://www.udemy.com/coldbox-platform-developer-week-2013/#/lecture/433052

I have a Contacts database with a Contact table.

I placed this code int he Application.cfc:

// Mappings //this.mappings["/"] = COLDBOX_APP_ROOT_PATH;

// ORM Settings
this.ormEnabled = true;
this.datasource = “contacts”;
this.ormSettings = {
cfclocation = “models”,
dialect = “MySQL”,
dbcreate = “update”,
logSQL = true,
flushAtRequestEnd = false,
autoManageSession = false,
eventHandling = true
};

I created an ORM entity:

/**

  • A cool Contact entity
    */
    component persistent=“true” table=“contact”{

// Primary Key
property name=“id” fieldtype=“id” column=“id” generator=“native” setter=“false” ;

// Properties
property name=“firstname” ormtype=“string”;
property name=“lastname” ormtype=“string”;
property name=“email” ormtype=“string” ;

// Validation
this.constraints = {
// Example: age = { required=true, min=“18”, type=“numeric” }
};

// Constructor
function init(){

return this;
}
}

Then I used the Created CRUD feature within CFBuilder. When I reinit and load the contacts index page I receive this error:

Type: Builder.DSLDependencyNotFoundException
Messages: The DSL Definition {JAVACAST={null},NAME={ormService},ARGNAME={},DSL={entityService:Contact},VALUE={null},SCOPE={variables},REQUIRED={true},REF={null},TYPE={any}} did not produce any resulting dependency The target requesting the dependency is: ‘ssdt.handlers.Contacts’

I’d need to see your handler to know what’s going on with that error. However, note that ORM has changed a bit in ColdBox 4 as it is now a module you need to install.

install cborm

Also, due to some chicken/egg issues with ColdFusion, you’ll need to add a /cborm mapping in Application.cfc. Plus some of the component paths have been updated.
Basically, replace coldbox.system.orm.hibernate with cborm.models.

I would recommend checking out some of our sample apps, I just went through and updated them for ColdBox 4 (Let me know if anything isn’t working).

https://github.com/ColdBox/coldbox-samples

Dump that repo in your site root. It’s a little ColdBox app. You can use CommandBox to start a server, but any examples that use SES will require you to start the server in the actual example folder and install ColdBox 4. This is because Adobe CF has built in support for SES URLs in sub folders (due to their JRun/Tomcat modifications) but Railo doesn’t support that.

There are several that use ORM under the “needs installation” tab like task manager, orm example, and simple blog.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

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

That did the trick. You may have just saved my job.