0

I am using ColdFusion8, Windows7 64 bit OS, and I have downloaded Wirebox 1.6 from ColdBox. I have extracted the files and placed them in wwwroot and created a "index.cfm" page with the code below:

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

But it is throwing an error:

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'),

How do I install it correctly and test the installation?

Leigh
  • 28,765
  • 10
  • 55
  • 103
yugalkishorbais
  • 119
  • 1
  • 11

2 Answers2

1

What updater for CF8 are you using? I'm guessing it's a CF8 bug with struct literal parsing. You could test this by rewriting the struct literal to the old-school style:

instance = structnew();
instance.javaSystem = createObject(...);
Jesse
  • 8,605
  • 7
  • 47
  • 57
Brad Wood
  • 3,863
  • 16
  • 23
  • stil i am getting same error saying "Invalid CFML construct found". i have used- instance = structnew(); instance.javaSystem = createObject("component","wirebox.system.ioc.Injector").init(); – yugalkishorbais Mar 14 '13 at 06:16
  • I would guess there are still other struct literals in the code which are not compatible with your version of CF8. I would recommend installing the latest CF8 updater. – Brad Wood Mar 14 '13 at 17:49
1

As noted in the documentation, ColdBox requires one of the following engines:

  • ColdFusion 8.01 or above
  • Railo 2.0 or above
  • Open Blue Dragon (not all features are supported)

As this answer explains, CF 8 does not support the nested inline structs which ColdBox uses.

Community
  • 1
  • 1
Joe C
  • 3,506
  • 2
  • 21
  • 32