-1 Error

Ok here is one that is throwing me through a loop. I wrote a page of code for a web app that generates 3 graphs. It worked perfectly without any sort of problem Then all of a sudden yesterday, it started giving me an error on the page which is as follows:



Error Occurred While Processing Request  
-1  
 
 
The error occurred in C:\Inetpub\wwwroot\mailpro\viewcampaign.cfm: line 226
Called from C:\Inetpub\wwwroot\mailpro\manager.cfm: line 302
Called from C:\Inetpub\wwwroot\mailpro\manager.cfm: line 187
Called from C:\Inetpub\wwwroot\mailpro\manager.cfm: line 121
Called from C:\Inetpub\wwwroot\mailpro\manager.cfm: line 111
Called from C:\Inetpub\wwwroot\mailpro\manager.cfm: line 1
 
224 :                  <cfchartdata item="Recipients" value="#totalsent#">
225 :                  <cfchartdata item="Opens" value="#getdata.opens#">
226 :                  </cfchartseries>
227 :            </cfchart>
228 :      </td>

 
 What exactly is -1? and what does this have to do with... If I disable this cfchart tag on the page the other two charts function perfectly. Also I have checked the values going into the chart tag and they are correct.

Cheers,
Rick
richardsimnettAsked:
Who is Participating?
 
pinaldaveConnect With a Mentor Commented:
Same error on my server. Seems like due to high value of ratio macromedia has some problem. I am sorry buddy but this is very strange and my co-worker are also concern and we have made this note in our company database so when we refer that we should knwo this is at the moment not solved.
sorry to hear this... may be you need to use some other chart... i clearly remember that you want to use pie chart as that is the requirement of your project.
Sorry my friend.
Regards,
---Pinal
0
 
richardsimnettAuthor Commented:
Just a note: the values going into the chart tag are as follows:

totalsent = 116080
opens= 317  

Cheers,
Rick
0
 
pinaldaveCommented:
Hi richardsimnett,
cna you post your chchart code forreferance...pls

Regards,
---Pinal
0
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

 
richardsimnettAuthor Commented:
Pinal,
Here is the cfchart code as it appears in my page.

<cfchart
   show3d=yes
   showlegend=no
   chartheight=100
   chartwidth=100
   showborder=no
   format='jpg'
   pieslicestyle=sliced>
  <cfchartseries type=pie paintstyle="light" colorlist="##9479F9,##F9F779">
      <cfchartdata item="Recipients" value="#totalsent#">
      <cfchartdata item="Opens" value="#getdata.opens#">
  </cfchartseries>
</cfchart>


The strange thing is that it only seems to report this error for 1 particular record in the database. Thats why I provided you with the values being inserted.

Cheers,
Rick
0
 
pinaldaveCommented:
Hi richardsimnett,
your code is correct.
the reason for error is this...
java.lang.ArrayIndexOutOfBoundsException
        -1
if you reduce the value of integer it will work... totalsent = 116080 is very large...
I now remember I had the same problem so what I did is displayed the information in K like totalsent is 116.060K
well this looks stupid but ya that works... and reason for arrayindexoutfoboundexception...
i do not know much but I can look into it....


Regards,
---Pinal
0
 
pinaldaveCommented:
Hi richardsimnett,
I aplogize for little misinformation above...
if you make that too 116.080 and other as .317...it will also show error again...
it seems to be that when they are devided or something pichard has some problem with JAVA.lang...

Regards,
---Pinal
0
 
richardsimnettAuthor Commented:
Pinal,
   So what do you think the solution to this is? Its a rather strange error to have happen.

Cheers,
Rick
0
 
pinaldaveCommented:
Hi richardsimnett,
 
public class ArrayIndexOutOfBoundsException
extends java.lang.IndexOutOfBoundsException

Students should understand this error/exception when it occurs in a program.

An object of this class is thrown when code accesses an array with an illegal index. This happens when an index is negative or greater than or equal to the length of the array being indexed. For example:

  int[] list = new int[5];
  list[5] = 33;            // illegal index, maximum index is 4

We had discovered a really nasty bug.
If a  form has a <cfchart> tag and there are more that 16 items to be
displayed with <cfchartseries> the following error is thrown:
java.lang.ArrayIndexOutOfBoundsException.
Now if the user refreshes the screen where the error occurred a few times a
blank page is
shown and after that CFMX doesn't respond to any requests. Task manager
shows 0 for cpu and no
memory increase. Each page being requested shows a slight spike in the cpu,
an indication that the CFMX is still alive. It seems that the page with the
cfchart  on it has been stuck in the queue and no other page can be
processed and no error is being thrown, either on the screen or in the logs.
The only way to fix the problem is to restart the CFMX service.


download the patch from this site... http://www.macromedia.com/support/coldfusion/ts/documents/cfmx61_sqlserver_cpu.htm



 

Regards,
---Pinal
0
 
pinaldaveCommented:
Hi richardsimnett,
I remember that i had used bar charts instead ... that will work for sure...

Regards,
---Pinal
0
 
richardsimnettAuthor Commented:
I will try installing this patch, although I dont think that this is the same error as what is mentioned above. Also I cannot switch the format to bar charts as the specification and page is designed for pie charts unfortunately.


Cheers,
Rick
0
 
richardsimnettAuthor Commented:
Pinal,
Installed the update from macromedia... no change... the -1 problem comes and goes intermittently... client is freaking out..... any new ideas?
0
 
richardsimnettAuthor Commented:
No problem... keep me posted of anything you find... can you recommend a good applet to generate pie charts and the like?

Cheers,
Rick
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.