Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lucee Null Support #277

Closed
decisionpartners opened this issue Dec 16, 2021 · 5 comments
Closed

Lucee Null Support #277

decisionpartners opened this issue Dec 16, 2021 · 5 comments
Assignees
Labels

Comments

@decisionpartners
Copy link

Thanks for making such a great library - so much faster than other options!

Just updated to the latest version and am running into an issue when null support is set to "complete" in Lucee:

Can't cast Null value to value of type [collection] value is null. The error occurred on line 30 in file C:[path]\date.cfc.

The code I'm using to generate the error is the "susi frumpo" example you provide.

Using complete null support is really helpful with some APIs we need, so I was wondering if there was a workaround you could suggest?

Thanks!

@cfsimplicity
Copy link
Owner

Hi. Which code example do you mean?

Was it working on the version you were previously using? If so which version was that?

Thanks.

@decisionpartners
Copy link
Author

decisionpartners commented Dec 16, 2021

The code example is:

<cfscript>
spreadsheet = New spreadsheetLibrary.Spreadsheet();
data = QueryNew( "First,Last", "VarChar, VarChar", [ [ "Susi", "Sorglos" ], [ "Frumpo", "McNugget" ] ] );
workbook = spreadsheet.new();
spreadsheet.addRows( workbook, data );
spreadsheet.write( workbook, "c:/temp/data.xls" );
</cfscript>

The version we were using was 2.12.1. By the way, the server we're using for testing is running Lucee 5.3.8.206 / AdoptOpenJDK 11.0.11.

It looks like we may have found a workaround for our specific case since spreadsheet access is required for only one directory. Apparently Lucee (as of 5.3) allows null support to be enabled/disabled as a runtime setting. So when this.nullSupport is set to false in the application.cfc of the directory in which spreadsheets are required, the code works as expected… while full support is enabled everywhere else.

Thanks again for your help.

@cfsimplicity
Copy link
Owner

Thanks, I see the problem. The fix is straightforward and probably a better way of doing things, so available on the develop branch in a few moments...

@cfsimplicity
Copy link
Owner

The latest 3.2.2 version should run fine with full null support enabled.

@decisionpartners
Copy link
Author

Thank you! Much appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants