1

I copied an export cfc that creates an Excel file from a query object from another application to this application but for some reason it fails. I have used the exact same cfc in several other applications on the same server. It still works in the other application but it throws the following error in this application "Server Error: The server encountered an internal error and was unable to complete your request. Application server is busy. Either there are too many concurrent requests or the server still is starting up." is shown to the user and the following error is recorded in the exception.log file. The error occures on line 78 but if I cause the program to skip that condition then it fails on line 86.

exception.log

"Error","jrpp-5132","05/22/13","08:50:15","192194B933ECEF2F12871BE3F495FBA0","coldfusion.excel.Excel.formatCell(Lcoldfusion/excel/ExcelInfo;Lcoldfusion/runtime/Struct;IIZ)V The specific sequence of files included or processed is: /..pathtoapp../index.cfm, line: 79 " java.lang.NoSuchMethodError: coldfusion.excel.Excel.formatCell(Lcoldfusion/excel/ExcelInfo;Lcoldfusion/runtime/Struct;IIZ)V at coldfusion.runtime.CFPage.SpreadSheetFormatCell(CFPage.java:7318) at coldfusion.runtime.CFPage.SpreadSheetFormatCell(CFPage.java:7312) at cfpExport2ecfc955548417$funcQUERYTOEXCEL.runFunction(/..pathtoapp../plugins/pExport.cfc:79) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472)

Snippet from cfc file

<cfscript>
    //Create a new Excel spreadsheet object. 
theSheet = SpreadsheetNew( Arguments.FileName ); 

if( Arguments.Title neq "" ){
    /*LINE79*/ SpreadSheetFormatCell(theSheet, { bold="true", alignment="center" } ,1,1);
    SpreadsheetMergeCells(theSheet,1,1,1, ListLen(Arguments.Columns, '|' ) );
    SpreadsheetSetCellValue(theSheet,Arguments.Title,1,1);
}
</cfscript> 
<cfif Arguments.HeaderTitles neq "">
    <cfset counter = 1 >
    <cfloop index="Header" list="#Arguments.HeaderTitles#" delimiters="|">
        <cfset SpreadSheetFormatCell(theSheet, { bold="true", alignment="center" } ,2,counter) >
        <cfset SpreadsheetSetCellValue(theSheet, Header, 2, counter) >
        <cfset counter = counter + 1>
    </cfloop>
<cfelse>
    <cfset counter = 1 >
    <cfloop index="Header" list="#Arguments.Columns#" delimiters="|">
        <cfset SpreadSheetFormatCell(theSheet, { bold="true", alignment="center" } ,2,counter) ><!---LINE 86--->
        <cfset SpreadsheetSetCellValue(theSheet,Header,2,counter) >
        <cfset counter = counter + 1>
    </cfloop>
</cfif>

System: Coldfusion 9, Coldbox 3.5 framework, Linux Server

Would appreciate any suggestions about what is going on. Thanks.

Aaron
  • 1,042
  • 2
  • 12
  • 30
  • 2
    What is the simplest code that recreates the error? Do you get that same error if you remove the cfc from the equation, and use the method(s) directly? (If both the working and non-working app are on the same CF server, [this bug](https://bugbase.adobe.com/index.cfm?event=bug&id=3540876) probably does not apply, but ..) – Leigh May 22 '13 at 18:23
  • Stictly a guess, but what would happen if you added some data to the cell before you format it. – Dan Bracuk May 22 '13 at 19:08
  • @Leigh SpreadSheetFormatCell is the line that causes the error. If I remove the line it works without the formatting. The bug link was helpful. – Aaron May 22 '13 at 20:12
  • @Dan Bracuk swapping the order did not fix the problem. – Aaron May 22 '13 at 20:13
  • @Aaron - Understood, but as I do not know what else the cfc includes, I was trying to eliminate it as a potential cause. Honestly I have never heard of that error occurring in *only one app* out of two, when they are both are on the same server. Usually it succeeds or fails across the board, since they share the same jvm and jars. So if you run the offending lines in both apps, what is the result? – Leigh May 22 '13 at 20:19
  • Spreadsheet objects in cfscript have alot of troublesome quirks in my experience, take a look at this on why i stopped using them http://stackoverflow.com/questions/15928332/spreadsheetaddrows-failing-on-moderate-size-query – Jay Rizzi May 24 '13 at 01:36
  • @JayRizzi - You should put together a repro case and file a [bug report](https://bugbase.adobe.com/) so it can be fixed if possible. (The spreadsheet functions do have some performance issues. Generating large ones efficiently, can be a little tricky. However, it sounds like this is a different issue. – Leigh May 25 '13 at 18:09

0 Answers0