ORM issue in Lucee 5

I’ve got some code which worked fine in Lucee 4.5; it’s doing a very simple

entitySave(entity);

But in Lucee 5 I am seeing the error:

lucee.runtime.orm.ORMDatasourceConnection cannot be cast to lucee.runtime.db
.DatasourceConnectionImpl

I’m running Lucee 5.0.0.252, against a PostgreSQL database.

I saw a similar casting error a few days ago, in cachePut(). I don’t
remember the exact error, but it was a Double not being cast to a Timespan
if you set the timespan argument as a number (e.g. “1” for 1 day). I got
around it by explicitly creating a timespan, but I shouldn’t have had to…

Any ideas?

  • Seb

I reported it too, it has been fixed (according to Jira)
https://luceeserver.atlassian.net/browse/LDEV-872 https://luceeserver.atlassian.net/browse/LDEV-872

MD> On 6 Jun 2016, at 15:42, Seb Duggan <@Seb_Duggan> wrote:

I’ve got some code which worked fine in Lucee 4.5; it’s doing a very simple

entitySave(entity);

But in Lucee 5 I am seeing the error:

lucee.runtime.orm.ORMDatasourceConnection cannot be cast to lucee.runtime.db.DatasourceConnectionImpl

I’m running Lucee 5.0.0.252, against a PostgreSQL database.

I saw a similar casting error a few days ago, in cachePut(). I don’t remember the exact error, but it was a Double not being cast to a Timespan if you set the timespan argument as a number (e.g. “1” for 1 day). I got around it by explicitly creating a timespan, but I shouldn’t have had to…

Any ideas?

  • Seb


Win a ticket to dev.objective from Lucee via Twitter, see http://bit.ly/1UbTMWj http://bit.ly/1UbTMWj for details, good luck and see you there…

You received this message because you are subscribed to the Google Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+unsubscribe@googlegroups.com mailto:lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com mailto:lucee@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/5885676f-f53a-402a-a15d-fca057bcc204%40googlegroups.com https://groups.google.com/d/msgid/lucee/5885676f-f53a-402a-a15d-fca057bcc204%40googlegroups.com?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout https://groups.google.com/d/optout.

Ah, should probably have checked Jira first… Wonder how soon that will be
on the stable release - it’s not even in the snapshot yet…

Strangely, it only occurred when creating a new entity, not updating an
existing one.

I’ll try to replicate that cacheput() error and log a ticket for that, if
it’s not already in there.On Monday, 6 June 2016 15:42:43 UTC+1, Seb Duggan wrote:

I’ve got some code which worked fine in Lucee 4.5; it’s doing a very simple

entitySave(entity);

But in Lucee 5 I am seeing the error:

lucee.runtime.orm.ORMDatasourceConnection cannot be cast to lucee.runtime.
db.DatasourceConnectionImpl

I’m running Lucee 5.0.0.252, against a PostgreSQL database.

I saw a similar casting error a few days ago, in cachePut(). I don’t
remember the exact error, but it was a Double not being cast to a Timespan
if you set the timespan argument as a number (e.g. “1” for 1 day). I got
around it by explicitly creating a timespan, but I shouldn’t have had to…

Any ideas?

  • Seb

OK, went ahead and installed snapshot 5.0.1.9 (the version that the ticket
says it was fixed in) and all now works perfectly.

Weirdly though, when I changed Lucee updater to the Snapshot channel,
although it said the snapshot to be installed was 5.0.1.9, this particular
ticket (LDEV-872) wasn’t listed in the changes. But it did get installed…

  • SebOn Monday, 6 June 2016 15:49:11 UTC+1, Seb Duggan wrote:

Ah, should probably have checked Jira first… Wonder how soon that will
be on the stable release - it’s not even in the snapshot yet…

Strangely, it only occurred when creating a new entity, not updating an
existing one.

I’ll try to replicate that cacheput() error and log a ticket for that, if
it’s not already in there.

On Monday, 6 June 2016 15:42:43 UTC+1, Seb Duggan wrote:

I’ve got some code which worked fine in Lucee 4.5; it’s doing a very
simple

entitySave(entity);

But in Lucee 5 I am seeing the error:

lucee.runtime.orm.ORMDatasourceConnection cannot be cast to lucee.runtime
.db.DatasourceConnectionImpl

I’m running Lucee 5.0.0.252, against a PostgreSQL database.

I saw a similar casting error a few days ago, in cachePut(). I don’t
remember the exact error, but it was a Double not being cast to a Timespan
if you set the timespan argument as a number (e.g. “1” for 1 day). I got
around it by explicitly creating a timespan, but I shouldn’t have had to…

Any ideas?

  • Seb