XLConnect output not working in shinyproxy but does work locally

I’ve got a webapp that uses a locally stored xlsx template with XLConnect to produce formatted excel reports. When run locally via rstudio or VSCode this works. XLConnect loads the template workbook, writes data, outputs a downloadable file.

In Shinyproxy for some reason this isn’t working. I’ve verified the xlsx file is in the proper directory and i’ve tried every potential absolute and relative filepath for loadWorkbook() without success.

Is it possible I’m running into a permissions issue or something that could prevent XLConnect from working with the file? There shouldn’t be any missing dependencies, it’s a cross platform package and I’ve got java.

FROM r-base

# system and R libraries 
RUN apt-get update && apt-get install -y gdal-bin git-core libcairo2-dev libcurl4-openssl-dev libgdal-dev libgeos-dev libgeos++-dev libgit2-dev libssh2-1-dev libssl-dev libudunits2-dev libxml2-dev make pandoc pandoc-citeproc unixodbc-dev zlib1g-dev default-jdk r-cran-rjava && rm -rf /var/lib/apt/lists/*

# R packages
RUN R -e "install.packages(c('shiny','tidyverse','rJava','ggplot2','tidyr','purrr','stringr','readr','forcats','tibble','glue','httr','jsonlite','dplyr','glue','data.table','lubridate','magrittr','treemapify','ggfittext','shinydashboard','shinydashboardPlus','DT','shinyWidgets','XLConnect','formattable','RSQLite','DBI','odbc','pool','dbplyr','here','readwritesqlite','sf'), repos='https://cloud.r-project.org/', dependencies=TRUE)"

# copy the app to the image
RUN mkdir /root/my_app
RUN mkdir /root/my_app/data
COPY my_app /root/my_app
COPY my_app/mytemplate.xlsx /root/my_app

COPY Rprofile.site /usr/lib/R/etc/


CMD ["R", "-e", "shiny::runApp('/root/my_app',host='', port=3838)"]

Hi @D3SL,

Do you see anything in the docker logs when you try to run your container (outside of ShinyProxy) and use the XLConnect functionality?

See https://shinyproxy.io/troubleshooting/


Hi @tverbeke,

Thanks for that trick, on trying to use the XLConnect functionality I get this message which I don’t recall seeing in my shinyproxy logfiles:

Warning: Error in .jcall: RcallMethod: cannot determine object class
  [No stack trace available]

I’m unfamiliar with the error, but it looks like this may be XLConnects issue on linux (specifically rocker’s ubuntu base) rather than shinyproxy, even though I should have all my dependencies installed and even tried the trick of running javareconf in the dockerfile.