0

我正在使用 ColdFusion8、Windows7 64 位操作系统,并且我已经从ColdBox下载了 Wirebox 1.6 。我已提取文件并将它们放入wwwroot并使用以下代码创建了一个“index.cfm”页面:

<cfscript>
  wirebox = createObject("component","wirebox.system.ioc.Injector").init();
</cfscript>
<cfdump var="#wirebox#">

但它抛出一个错误:

Invalid CFML construct found on line 43 at column 36.
ColdFusion was looking at the following text:
{
The CFML compiler was processing:
A script statement beginning with instance on line 43, column 25.
A cfscript tag beginning on line 33, column 18.
A cfscript tag beginning on line 33, column 18.

The error occurred in C:\ColdFusion8\wwwroot\wirebox\system\ioc\Injector.cfc: line 43
41 : 
42 :          // Prepare Injector instance
43 :          instance = {
44 :              // Java System
45 :              javaSystem = createObject('java','java.lang.System'),

如何正确安装并测试安装?

4

2 回答 2

1

您使用的是什么 CF8 更新程序?我猜这是一个带有struct文字解析的 CF8 错误。您可以通过将文字重写struct为老式风格来测试这一点:

instance = structnew();
instance.javaSystem = createObject(...);
于 2013-03-13T19:04:16.107 回答
1

文档中所述,ColdBox 需要以下引擎之一:

  • ColdFusion 8.01 或更高版本
  • Railo 2.0 或以上
  • Open Blue Dragon(并非所有功能都支持)

正如这个答案所解释的,CF 8 不支持 ColdBox 使用的嵌套内联结构。

于 2013-03-14T13:12:55.010 回答