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

Source package fails to install (on Windows?) #182

Open
spoltier opened this issue Oct 31, 2022 · 3 comments
Open

Source package fails to install (on Windows?) #182

spoltier opened this issue Oct 31, 2022 · 3 comments

Comments

@spoltier
Copy link
Member

Description

At least on Windows, it looks like not all jar resources are downloaded successfully when using the source package (tested this with a clean install of R 4.2.1).
Only the poi-ooxml-full jar is downloaded; no other attempts seem to be executed (see outputs below)

⚠ To be investigated whether other OSs have the same issue.

Workaround

Install using install.packages("XLConnect", type="binary") to avoid using the source package.

Outputs

Install

install.packages("XLConnect")
--- Please select a CRAN mirror for use in this session ---
Warning: failed to download mirrors file (cannot open URL 'https://cran.r-project.org/CRAN_mirrors.csv'); using local file .../doc/CRAN_mirrors.csv'

  There is a binary version available but the source version is later:
          binary source needs_compilation
XLConnect  1.0.5  1.0.6             FALSE

installing the source package 'XLConnect'

trying URL 'https://stat.ethz.ch/CRAN/src/contrib/XLConnect_1.0.6.tar.gz'
Content type 'application/x-gzip' length 1467604 bytes (1.4 MB)
downloaded 1.4 MB

* installing *source* package 'XLConnect' ...
** package 'XLConnect' successfully unpacked and MD5 sums checked
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** demo
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
*** copying figures
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
trying URL '.../org/apache/poi/poi-ooxml-full/5.2.3/poi-ooxml-full-5.2.3.jar'
Content type 'application/java-archive' length 13244589 bytes (12.6 MB)
==================================================
downloaded 12.6 MB

** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (XLConnect)

Load and test

> library(XLConnect)
XLConnect 1.0.6 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
> wb <- loadWorkbook("some_wb.xls")
Error: NoClassDefFoundError (Java): org/apache/poi/openxml4j/exceptions/InvalidFormatException

Session Info

> sessionInfo()
R version 4.2.1 (2022-06-23 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19044)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.utf8
[2] LC_CTYPE=English_United States.utf8
[3] LC_MONETARY=English_United States.utf8
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.utf8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] XLConnect_1.0.6

loaded via a namespace (and not attached):
[1] compiler_4.2.1 rJava_1.0-6
@spoltier spoltier pinned this issue Oct 31, 2022
@spoltier
Copy link
Member Author

@vk111 I have opened this new issue as it is not clear that #123 was the same. Please follow the workaround as described above in this issue.

@vk111
Copy link

vk111 commented Nov 16, 2022

Hi @spoltier, thanks, installation is completed but so far I cannot use this package
I sit necessary to have some specific version of java?

My java version is 8.0.2710.9
Hi @spoltier, thanks, installation is completed but so far I cannot use this package
I sit necessary to have some specific version of java?

My java version is 8.0.2710.9

Thanks

R
version
_
platform x86_64-w64-mingw32
arch x86_64
os mingw32
system x86_64, mingw32
status
major 3
minor 4.0
year 2017
month 04
day 21
svn rev 72570
language R
version.string R version 3.4.0 (2017-04-21)

library(XLConnect) #install.packages("XLConnect", type="binary")
wb <- loadWorkbook(fname, create = F)
`Error in .jcall("java.lang.System", "S", "setProperty", "java.awt.headless", :
RcallMethod: cannot determine object class

Another version
_
platform x86_64-w64-mingw32
arch x86_64
os mingw32
crt ucrt
system x86_64, mingw32
status
major 4
minor 2.1
year 2022
month 06
day 23
svn rev 82513
language R
version.string R version 4.2.1 (2022-06-23 ucrt)

wb <- loadWorkbook(fname, create = F)
Error: NoSuchMethodError (Java): org.apache.xmlbeans.XmlCursor.close()V

@spoltier
Copy link
Member Author

Hi, indeed you will need R >= 3.6 for XLConnect to work. The other error you are seeing is bug #181, which we are currently working on.

@spoltier spoltier unpinned this issue Mar 31, 2023
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