ColdFusion 9 ORM - 未针对当前应用程序进行配置
我有一个目录观察程序事件网关实例,负责解析、加载和存储通过 SFTP 以 CSV 格式接收的数据。使用 entityNew
和 entityLoad
,此过程迭代地构建和刷新事务 ORM 会话,最终插入新的和更新反映接收到的数据的现有数据库记录。
此过程偶尔会失败并报告以下异常:
coldfusion.orm.ORMUtils$ORMNotConfiguredException: ORM is not configured for the
current application. at coldfusion.orm.ORMUtils.getPersistenceManager(ORMUtils.java:55)
at coldfusion.orm.ORMUtils._executeQuery(ORMUtils.java:332)
注意: 上述异常已被严格缩写,但希望包含足够的详细信息来实现其目的。
企业服务器监视器不会捕获和报告此异常,但会反映在异常日志中。因此,我无法利用企业服务器监视器来详细检查故障。我每天都会遇到 1 到 3 次故障,并且在一天中的时间、文件大小、应用程序/数据库服务器资源消耗或接收的数据传输源方面没有相关模式。
我已经通过不区分大小写的目录递归搜索验证了 ormEnabled
和 ormSettings.datasource
属性仅存在于根级 Application.cfc
中组件并且是硬编码的。我还使用相同类型的搜索验证了代码集中不存在任何恶意 ormReload
方法调用。
现在接受答案并欢迎理论! :)
我要对每一个合乎逻辑的贡献表示非常特别的感谢!
I have a directory watcher event gateway instance that is responsible for parsing, loading and storing data received in the CSV format via SFTP. Using entityNew
and entityLoad
, this process iteratively constructs and flushes a transactional ORM session, ultimately inserting new and updating existing database records reflecting the received data.
This process sporadically fails and reports the following exception:
coldfusion.orm.ORMUtils$ORMNotConfiguredException: ORM is not configured for the
current application. at coldfusion.orm.ORMUtils.getPersistenceManager(ORMUtils.java:55)
at coldfusion.orm.ORMUtils._executeQuery(ORMUtils.java:332)
Note: The above exception has been severely abbreviated, but hopefully includes enough detail to serve its purpose.
This exception is not caught and reported by the enterprise server monitor, however it is reflected in the exception log. Because of this I am unable to utilize the enterprise server monitor to review the failure in full detail. I experience between 1 and 3 failures on a daily basis with no correlating patterns in regards to the time of day, file size, application / database server resource consumption or received data transmission source.
I have verified with a case-insensitive directory recursive search that the ormEnabled
and ormSettings.datasource
properties only exist in the root-level Application.cfc
component and are hard-coded. I have also verified with the same type of search that I do not have any rogue ormReload
method invocations existing in the codeset.
Accepting answers and welcoming theories now! :)
I'd like to extend a very special thanks for every logical contribution!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于您使用的是事件网关,因此当点击页面时应用程序可能不会加载。如果没有加载应用程序,CF 无法确定 ORM 已启用。它也可能在很长一段时间内工作,因为应用程序已经在运行。理论上怎么样?
It's possible that, since you are using an event gateway, that the application is not loaded when the page is hit. Without the application being loaded, CF cannot determine that ORM is enabled. It's also possible that the it works a good deal of the time, because the application was already running. How's that for theory?