Any tips on how to debug this error? > lucee.r...
# lucee
p
Any tips on how to debug this error?
lucee.runtime.exp.ApplicationException: No entity (persistent component) with name [Activation] found, available entities are []
I get this when I try to
EntityLoadByPK()
I'm not seeing anything in the logs. The odd things is this app has been running for years and mostly runs fine, but every now and then will start to throw this error. A re-start will clear it up eventually. In my local environment, I can get past this error at all. Full stack trace
Copy code
lucee.runtime.exp.ApplicationException: No entity (persistent component) with name [Activation] found, available entities are []
 at lucee.runtime.op.ExceptonImpl.createApplicationException(ExceptonImpl.java:93)
 at lucee.runtime.orm.ORMExceptionUtil.createException(ORMExceptionUtil.java:45)
 at lucee.runtime.util.ORMUtilImpl.createException(ORMUtilImpl.java:109)
 at ortus.extension.orm.util.ExceptionUtil.createException(ExceptionUtil.java:94)
 at ortus.extension.orm.util.ExceptionUtil.createException(ExceptionUtil.java:76)
 at ortus.extension.orm.HibernateORMEngine.create(HibernateORMEngine.java:391)
 at ortus.extension.orm.HibernateORMSession.create(HibernateORMSession.java:492)
 at ortus.extension.orm.functions.EntityNew.call(EntityNew.java:55)
 at ortus.extension.orm.functions.EntityNew.call(EntityNew.java:49)
 at ortus.extension.orm.functions.EntityNew.invoke(EntityNew.java:106)
 at lucee.runtime.functions.FunctionHandlerPool.invoke(FunctionHandlerPool.java:40)
 at debug.index_cfm$cf$mr.call(/debug/index.cfm:20)
 at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:1112)
 at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:1006)
 at lucee.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:213)
 at lucee.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:41)
 at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2810)
 at lucee.runtime.PageContextImpl._execute(PageContextImpl.java:2797)
 at lucee.runtime.PageContextImpl.executeCFML(PageContextImpl.java:2768)
 at lucee.runtime.engine.Request.exe(Request.java:45)
 at lucee.runtime.engine.CFMLEngineImpl._service(CFMLEngineImpl.java:1109)
 at lucee.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:1066)
 at lucee.loader.engine.CFMLEngineWrapper.serviceCFML(CFMLEngineWrapper.java:97)
 at lucee.loader.servlet.jakarta.CFMLServlet.service(CFMLServlet.java:52)
 at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:710)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:130)
 at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:109)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:79)
 at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:483)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:116)
 at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:666)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
 at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:718)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
 at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:396)
 at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
 at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:903)
 at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1744)
 at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
 at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
 at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
 at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:59)
 at java.base/java.lang.Thread.run(Unknown Source)
Application.cfc has
Copy code
this.datasources["mydsn"] = { class            : 'com.microsoft.sqlserver.jdbc.SQLServerDriver'
										  , bundleName       : 'org.lucee.mssql'
										  , bundleVersion    : '8.4.1.jre8'
										  , connectionString : 'jdbc:sqlserver://#this.env.MSSQL_HOST#:#this.env.MSSQL_PORT#;DATABASENAME=#this.env.MSSQL_DBNAME#;sendStringParametersAsUnicode=true;SelectMethod=direct'
										  , username         : "#this.env.MSSQL_USERNAME#"
										  , password         : "#this.env.MSSQL_PASSWORD#"
										  , blob             : false
										  , clob             : false
										  , connectionLimit  : 100
										  , liveTimeout      : 60
										  , storage          : true
										  , validate         : false
										  };
		this.datasource = "mydsn";

		

		this.ormenabled  = true;
		this.ormsettings = { datasource        : this.datasource
						   , cfclocation       : "/components"
						   , eventHandling     : true
						   , automanageSession : false
						   , flushatrequestend : false
						   , logsql            : true
						   , dialect           : "MicrosoftSQLServer"
                           , savemapping       : true
						   };
Even though
savemapping
is set to true, I'm not seeing any mapping files.
If I call
ormGetSession()
I get "There is no Session for the datasource".
g
not sure what the default is for
skipCFCWithError    = false
but you could add it to orm settings… So my guess is, that either it’s not finding your orm models or there is an error in one of the models
p
Where is that
Activation
component being called at? Likely just being called before models are loaded. If your property for that component just add i`inject="provider:Activation"` on your injection
q
So, that error pretty much says that the Activation.cfc either wasn't found or it has a syntax error. Unfortunately, both situations result in no logs by default (unless you upgrade to the latest snapshot release of the Ortus ORM engine, in which case you will get some logs in the orm.log). I've seen some people have poorly setup applications where they have multiple Application.cfcs that refer to the same application name, or if they extend/inherit the Application.cfc and have relative paths in the ormSettings.cfcLocation property. For poops and giggles, try changing that cfclocation to "./components/" indead of "/components" and restart the Lucee runtime. Make sure to hit a page that would call that Application.cfc first so the ORM stuff gets built out.
The ormGetSession() error you are seeing is a red haring. The "No Session" error could mean a million things, but ultimately means that the ORM engine dumped the session before it returned any data or closed the transaction.