unexpected constant Error

Hi

I wonder if there is a workaround for this error " Error Occurred While Processing Request  
unexpected constant #127 -1 " The number 127 varies depending on how many lines of JavaScript function I insert.

I'm adding a dynamic menu function that contains 3720 lines. Every time I add the function to the coldfusion template, it generates this error. Even after I remove the function from the template I keep getting the error and the template becomes useless.. Weird uhh? but it's happening to me.

 
Does coldfusion has a limit of lines to be included in a template?
gaby22Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
danrosenthalConnect With a Mentor Commented:
Found this on Macromedia's website of known issues:

Large ColdFusion pages
===============
ColdFusion pages that are larger than 500 KB can cause the following compilation error:
java.lang.IllegalStateException: unexpected constant at coldfusion.compiler.ClassReader.readCpool(ClassReader.java:153)  

Link: http://www.macromedia.com/support/coldfusion/releasenotes/mx/knownissues_mx_j2ee_p2.html
0
 
Jerry_PangCommented:
this happened to me before.

I think i use cf_include statements to workaround this problem.  
This usually happens to me if the files gets too big.
I split the file into multiple small files and 1 file to cf_include them all.


give it a try

regards,
jerry
0
 
gaby22Author Commented:
I tried using includes without any luck. I also tried using <script language="javascript" src="file.js> to avoid having the page with long scripts but doesn't work either.
0
 
russmichaelsCommented:
Are you sure that there is not something else on the page conflicting with this javascript. Do you have any other scripts onthe page.
0
 
Jerry_PangCommented:
hmm.. i thinking there might be something on the page.
perhaps a comment that was not closed
<!--- with out --->
or <!--- <!--- --->

or something like that. probably a syntax error or an unclosed tag.
or a # somewhere without the pair.


0
All Courses

From novice to tech pro — start learning today.