I developed an app with shiny and put in production with ShinyProxy.
The app display some data and the user can filter and download in xlsx format the resulting table.
Download is working when launching the app locally, but I got an error when using the app in production.
From container-log
:
This warning is displayed once per session. Warning: Error in .jnew: Java Exception no description because toString() failed>.jnew("org/apache/poi/xssf/usermodel/XSSFWorkbook")new("jobjRef", jobj = , jclass = "java/lang/Throwable")
[No stack trace available]
This is my DownloadHandler function:
output$downLoadFilter <- downloadHandler(
filename = function() {
paste('Filtered data', Sys.Date(), '.xlsx', sep = '')
},
content = function(file){
custlistdata <- FilterReactive()
custlistdata<-as.data.frame(custlistdata)
custlistdata<-custlistdata%>%
dplyr::select(CUSTOMERID,CUSTOMERDSC,CHANNELID,USERID,CONTACTID, CATEGORYDSC,
BRANDDSC)%>%distinct()
write.xlsx(custlistdata[input[["custlist_rows_all"]], ],file)
}
)