[Coldbox 5.2] - could not initialize proxy - no Session

Hi,

I am using ColdBox and trying to leverage some of the ORM features. I have a handler which ultimately runs a SQL query for authentication and then sets some session variables in a struct. Providing the user is authenticated I redirect them to my handler (account.dashboard).

For some reason after redirection the key in my structure “objUser” isn’t accessible. Before the redirect it is and I can dump it out using writedump(), after the setNextEvent() call I dump it out and get the error: “could not initialize proxy - no Session”.

Any idea what’s going on?

// check if we have a user in our database with the email passed in from the login form
var objUser = ORMService.findIt( “from User as u where u.email=:email”,{ email=rc.email} );

// if we find a record, password may still be wrong though
if( !isNull( objUser ) ) {

inputHash = Hash(rc.pwd & objUser.getSalt(), ‘SHA-512’);
prc.validAccount = NOT Compare(inputHash, objUser.getPwd());

if(prc.validAccount) {

// based on the account type log the user in
switch(objUser.getAccountTypeId()) {
// business account
case 1:
session.user.isLoggedIn = true;
session.user.objUser = objUser;
setNextEvent(“account.dashboard”);
break;

}
}

Can you add the full stack trace please. ave you placed the orm objects in session?

– -- You received this message because you are subscribed to the Google Groups “ColdBox Platform” group. For News, visit For Documentation, visit For Bug Reports, visit — 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 . To post to this group, send email to . To view this discussion on the web visit . For more options, visit .