From simon.urbanek at r-project.org  Fri Mar  1 02:04:45 2013
From: simon.urbanek at r-project.org (Simon Urbanek)
Date: Thu, 28 Feb 2013 20:04:45 -0500
Subject: [Rd] conflict between rJava and data.table
In-Reply-To: <65A7F5D5-655A-4DCA-8A0F-F4ADD18DF0E7@lautloscrew.com>
References: <65A7F5D5-655A-4DCA-8A0F-F4ADD18DF0E7@lautloscrew.com>
Message-ID: <B086D600-A17F-42F4-9F7F-A313277DB16A@r-project.org>

On Feb 28, 2013, at 5:09 PM, Bunny wrote:

> Dear devel-listers, 
> 
> I found a conflct between rJava and data.table. Actually me questions is where to report it? 
> Should I rather send it directly to the package maintainers or post it on some bug tracker. 
> The problem is that data.table has a function called "J" and rJava uses the same quite intensively. 
> I used the  xlsx R package which depends on rJava to write .xls files and ran into an error. 
> 
> write.xls from this package uses the functions and returns an error depending on the sequence the packages
> were loaded. 
> 
> 
> Error in .jnew("org/apache/poi/xssf/usermodel/XSSFWorkbook") : 
>  java.lang.AbstractMethodError: java.lang.ClassLoader.loadClass(Ljava/lang/String;)Ljava/lang/Class;
> 
> 
> data.table::J
> rJava::J
> 
> I can work around this by loading and unloading packages, but I feel this should be addressed because 
> loading these two packages that both deal with tables of data does not seem that unlikely to me. 
> 

Can you elaborate on the details as of where this will be a problem? Packages should not be affected since they should be importing the namespaces from the packages they use, so the only problem would be in a package that uses both data.table and rJava --  and this is easily resolved in the namespace of such package. So there is no technical reason why you can't have multiple definitions of J - that's what namespaces are for.

The error you report is entirely unrelated to J -- at lest in isolation. If you have a reproducible example, please share it.

Cheers,
Simon




> best
> 
> matt
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
> 
> 



[Rd] conflict between rJava and data.table
Simon Urbanek