ColdFusion .Net 集成错误:未安装 DotNetExtension
Posted
技术标签:
【中文标题】ColdFusion .Net 集成错误:未安装 DotNetExtension【英文标题】:ColdFusion .Net Integration Error: DotNetExtension not installed 【发布时间】:2016-03-24 05:36:36 【问题描述】:我一直在尝试让 .NET 集成服务在我的 ColdFusion 10 环境中正常工作,但尽管卸载/重新安装/重新启动/服务重新启动,但它拒绝在 ColdFusion 中生成代理类。我刚刚将 .NET Framework 升级到 4.6,根据 Adobe 的文档,安装新的 .NET Framework 需要卸载/重新安装 CF .NET 服务。 [1]
服务器有几个 ColdFusion 实例正在运行,所以我将 CF .NET 服务安装为独立的,服务本身作为本地系统运行。
我已确保每个实例的 lib
文件夹中的 neo-dotnet.xml
文件包含我安装 .NET 服务的目录,并且我用于测试的 .NET dll 非常简单:
namespace DLLTest
public class MyClass
public int Add(int x, int y)
return x + y;
我调用.NET程序集的方式如下:
<cfobject type=".NET" name="testDLL" class="DLLTest.MyClass" assembly="[Absolute_PATH]\DLLTest.dll')">
当 .cfm 页面运行时,它会创建以下堆栈跟踪:
coldfusion.runtime.dotnet.Assembly$DotNetExtensionNotInstalledException:
DotNetExtension not installed. at
coldfusion.runtime.dotnet.Assembly.loadClass(Assembly.java:258) at
coldfusion.runtime.dotnet.Assembly.loadClass(Assembly.java:226) at
coldfusion.runtime.dotnet.DotNetProxyFactory.getProxy(DotNetProxyFactory.java:78)
at coldfusion.runtime.ProxyFactory.getProxy(ProxyFactory.java:65) at
coldfusion.runtime.CFPage.createObjectProxy(CFPage.java:5785) at
coldfusion.tagext.lang.ObjectTag.doStartTag(ObjectTag.java:441) at
coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2795) at
cfDLLTest2ecfm188311117.runPage([PATH_TO_FILE]\DLLTest.cfm:7) at
coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:244) at
coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:446) at
coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65) at
coldfusion.filter.IpFilter.invoke(IpFilter.java:64) at
coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:451) at
coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48) at
coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40) at
coldfusion.filter.PathFilter.invoke(PathFilter.java:112) at
coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:94) at
coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28) at
coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38) at
coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:58) at
coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38) at
coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22) at
coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62) at
coldfusion.CfmServlet.service(CfmServlet.java:219) at
coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at
coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42) at
coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501) at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950) at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at
org.apache.catalina.ha.session.JvmRouteBinderValve.invoke(JvmRouteBinderValve.java:218) at
org.apache.catalina.ha.tcp.ReplicationValve.invoke(ReplicationValve.java:333) at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:422) at
org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:199) at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607) at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314) at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at
java.lang.Thread.run(Thread.java:722)
【问题讨论】:
除了 CF 2016 外,我也遇到了同样的问题。我尝试卸载并重新安装 .NET 服务无济于事... 【参考方案1】:在测试服务器上安装 ColdFusion 2021 企业版后,我收到了同样的错误。之前在 ColdFusion 2016 上运行的代码抛出了这个错误。调试了半天,问题是我2021服务器上的ColdFusion实例没有jnbridge文件夹。它仅位于默认的“cfusion”实例的文件夹中。为了解决这个问题,我做了以下事情:
-
将“jnbridge”文件夹从 cfusion 复制到我的实例文件夹中
重新启动“ColdFusion 2021 .NET Service”Windows 服务
重新启动“ColdFusion 2021 Application Server INSTANCE_NAME”Windows 服务
【讨论】:
以上是关于ColdFusion .Net 集成错误:未安装 DotNetExtension的主要内容,如果未能解决你的问题,请参考以下文章
如何在 ColdFusion 中使用 C#.NET 程序集?
当Coldfusion从'jar'文件中调用方法时,未编译的Java程序可以正常工作,但会产生错误?