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

Errors in running code in vignettes #177

Open
thierry-FreeBSD opened this issue Sep 19, 2022 · 4 comments
Open

Errors in running code in vignettes #177

thierry-FreeBSD opened this issue Sep 19, 2022 · 4 comments

Comments

@thierry-FreeBSD
Copy link

XLConnect is available as a FreeBSD port, and it used to run fine: see https://www.freshports.org/math/R-cran-XLConnect.

But since some days, the tests fail with the hereunder message:

* checking running R code from vignettes ... ERROR
Errors in running code in vignettes:
when running code in 'XLConnect.Rnw'
  ...

> if (file.exists("XLConnectExample1.xlsx")) file.remove("XLConnectExample1.xlsx")

> require(XLConnect)

> wb <- loadWorkbook("XLConnectExample1.xlsx", create = TRUE)

  When sourcing 'XLConnect.R':
Error: NoClassDefFoundError (Java): org/apache/poi/openxml4j/exceptions/InvalidFormatException
Execution halted

  'XLConnect.Rnw' using 'UTF-8'... failed
  'XLConnectImpatient.Rnw' using 'latin1'... OK
* checking re-building of vignette outputs ... NOTE
Error(s) in re-building vignettes:
  ...
--- re-building 'XLConnect.Rnw' using Sweave
Loading required package: XLConnect
XLConnect 1.0.5 by Mirai Solutions GmbH [aut],
  Martin Studer [cre],
  The Apache Software Foundation [ctb, cph] (Apache POI),
  Graph Builder [ctb, cph] (Curvesapi Java library),
  Brett Woolridge [ctb, cph] (SparseBitSet Java library)
https://mirai-solutions.ch
https://github.com/miraisolutions/xlconnect

Error: processing vignette 'XLConnect.Rnw' failed with diagnostics:
 chunk 4 (label = simpleEx1) 
Error : NoClassDefFoundError (Java): org/apache/poi/openxml4j/exceptions/InvalidFormatException

--- failed re-building 'XLConnect.Rnw'

--- re-building 'XLConnectImpatient.Rnw' using Sweave
--- finished re-building 'XLConnectImpatient.Rnw'

SUMMARY: processing the following file failed:
  'XLConnect.Rnw'

Error: Vignette re-building failed.
Execution halted

* checking PDF version of manual ... OK
* DONE
Status: 1 ERROR, 2 NOTEs

I guess that the problem is caused by the upgrade of some dependency, but I cannot see which one…
Any idea?

@spoltier
Copy link
Member

Hi @thierry-FreeBSD
I can't see from the page you provided what the previous version was.
XLConnect requires apache POI, we have upgraded to 4.1 since 1.0 in March 2020.
If you're using the version from the master branch, it is now requiring POI 5.2.2, which also upgrades most transitive dependencies.
The jars are downloaded at load time, there could be an issue with that.

From the error you provided, the POI dependency is causing the issue.

@thierry-FreeBSD
Copy link
Author

I'm using POI 4.1.2 with XLConnect 1.0.5, no recent change with them.

@spoltier
Copy link
Member

Not sure if this will help, but 1.0.6 is now available on CRAN. It uses a newer version of poi.
If the problem persists it must be an issue with downloading the JAR dependencies, which happens the first time the package is loaded.

@thierry-FreeBSD
Copy link
Author

Thanks for the notification!

I have updated POI to 5.2.3 and XLConnect to 1.0.6 and this is better.

But there remains a problem with vignettes:
Error: NoClassDefFoundError (Java): org/apache/poi/openxml4j/exceptions/InvalidFormatException

I shall investigate this problem.

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

No branches or pull requests

2 participants