ORM errors in cbadmin

瀏覽次數:10 次
跳到第一則未讀訊息

Vijay K

未讀,
2020年4月17日 上午8:19:332020/4/17
收件者:ContentBox Modular CMS
I am trying to create a new user and got the following error.

{"data":"","errorcode":0,"messages":["General application error: Not an entity [class coldfusion.orm.PersistentTemplateProxy]"],"error":true}

It is happening while creating a role also.

I am using ContentBox 4.x and SQL server.

Luis Majano

未讀,
2020年4月17日 上午9:24:342020/4/17
收件者:conte...@googlegroups.com、ContentBox Modular CMS
Which CFML engine? What ORM Dialect did you choose in Application.cfc

--
--
---
You received this message because you are subscribed to the Google Groups "ContentBox Modular CMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to contentbox+...@googlegroups.com.
Sent from Mailspring

Vijay K

未讀,
2020年4月17日 上午10:05:042020/4/17
收件者:conte...@googlegroups.com
 CF2018 and MSSQLSERVER I have added in dialect.

Luis Majano

未讀,
2020年4月17日 上午10:18:422020/4/17
收件者:conte...@googlegroups.com、conte...@googlegroups.com
I think this is a bug with ACF 2018 if I remember correctly.  Can you do me a favor, I need the steps you took in order for me to replicate.
--
--
---
You received this message because you are subscribed to the Google Groups "ContentBox Modular CMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to contentbox+...@googlegroups.com.
--
--
---
You received this message because you are subscribed to the Google Groups "ContentBox Modular CMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to contentbox+...@googlegroups.com.

Vijay K

未讀,
2020年4月17日 上午11:32:482020/4/17
收件者:conte...@googlegroups.com
Nothing much Luis. 
1. Open CB admin
2. Users -> Create user ->fill the form ->click on submit button.

Got the error.

Andreas

未讀,
2020年4月19日 下午5:47:182020/4/19
收件者:ContentBox Modular CMS
Hi Vijay K,

this is just an idea, because I had similar issues with MariaDB:

Can you add this code for a moment, right into the beginning of the onRequestStart function of coldbox Application.cfc (this should be in line 91) and load a page to show a dump of the dialect set to your datasource? That should work on CF2018.

ObjORM=ORMGetSession( "put_name_of_your_datasource_here" );
WriteDump( ObjORM.getSessionFactory().getJdbcServices().getDialect());
abort;

it will dump the selected dialect, just to make sure the one that has been defined by you in the Application.cfc is correct. When hibernate can't find a dialect you have set, it may decide to guess one. 

What I've read is, that in CF you can specify dialects with the fully qualified class name. Don't know the hibernate version CF2018 use, but here is a list of 5.0:
https://github.com/hibernate/hibernate-orm/tree/5.0/hibernate-core/src/main/java/org/hibernate/dialect
.  
That means, you could try setting:
org.hibernate.dialect.SQLServerDialect
org.hibernate.dialect.SQLServer2005Dialect
org.hibernate.dialect.SQLServer2008Dialect
org.hibernate.dialect.SQLServer2012Dialect

NOTE: Somehow CF2018 stores the orm datasource dialect. When changing the dialect, you'll need to restart the engine.

Just a try and idea, don't know it this is really a help.

Good luck!
回覆所有人
回覆作者
轉寄
0 則新訊息