[BioC] Failed installing SJava on MacOS

Martin Morgan mtmorgan at fhcrc.org
Tue Jan 19 18:57:56 CET 2010


Michael Dondrup wrote:
> 
> Am Jan 19, 2010 um 5:58 PM schrieb Martin Morgan:
> 
>> Michael Dondrup wrote:
>>> Am Jan 19, 2010 um 3:39 PM schrieb Martin Morgan:
>>>
>>>> Michael Dondrup wrote:
>>>>> Hi,
>>>>> I would like to use RWebServices and therefore SJava on Mac OS snow leopard. The documentation does not explicitly mention Mac os, so it's 
>>>>> maybe not supported, but i hope it can be made working anyway.
>>>>> Maybe somebody out there got this configuration running and could help? I am trying to install SJava 0.72. I try the following:
>>>>>
>>>>>> library(SJava)
>>>>> Load the Java VM with .JavaInit()
>>>>>> .JavaInit()
>>>>>> example(.Java)
>>>>> .Java>   v <- .JavaConstructor("java.util.Vector", as.integer(10))
>>>>>
>>>>> .Java>  .Java(v, "add", "A string element")
>>>>> Error in .Java(v, "add", "A string element") : 
>>>>> Can't find org.omegahat.R.Java.RForeignReference
>> this is in org.omegahat/Jars/RJava.jar, e.g.,
>>
>>  jar tf org.omegahat/Jars/RJava.jar
>>
>> more below...
> 
> Thank you for this information, this seems to be the crucial point, because my install is lacking this file!
> 
> I have only these:
> 
> Seneca:SJava mdondrup$ find . -name "*.jar"
> ./org/omegahat/Jars/antlr.jar
> ./org/omegahat/Jars/Environment.jar
> ./org/omegahat/Jars/jas.jar
> ./org/omegahat/Jars/jhall.jar
> ./org/omegahat/Jars/ROmegahatExamples.jar
> 
> I wonder what went wrong, as there was no error message during build. I have to further investigate the sources I think.
> Do you know at which point during install the jar's are being built? While the other jar's are already contained in the package,
> RJava.jar could be built from the files in inst/org/omegahat/R/Java ,correct?

as it turns out, RJava.jar seems to be something I created after
installation -- there is no RJava.jar in a clean installation. The
RForeignReference.class is in org/omegahat/R/Java, so I'm still
wondering about the expansion of OMEGA_HOME mentioned below.

Martin

> 
> Thanks again  
> 
> 
> 
> 
>>>> Hi Michael --
>>>>
>>>> .JavaInit has an argument default=javaConfig() which sets the class path
>>>> and other variables. My guess is that javaConfig() needs to be augmented
>>>> to return the correct class path. On my system it is
>>>>
>>>>> javaConfig()@classPath
>>>> [1] "<...>/library/SJava/org/omegahat/Jars/Environment.jar"
>>>> [2] "<...>/library/SJava/org/.."
>>>> [3] "<...>/library/SJava/org/omegahat/Jars/antlr.jar"
>>>> [4] "<...>/library/SJava/org/omegahat/Jars/jas.jar"
>>>> [5] "<...>/library/SJava/org/omegahat/Jars/jhall.jar"
>>>>
>>>> where <...> is the path to my R installation.
>>>>
>>>> Martin
>>> Hi Martin,
>>> thank you very much for your reply. My configuration looks pretty much like yours. All jars exist and readable.
>>> I tried messing around 
>>> with the paths in addition, adding "/Library/Frameworks/R.framework/Resources/library/SJava/org/" (without the ..), to no avail.
>>> Are you using a Mac? It would be good to compare the full output of javaConfig() for a functioning version, 
>>> maybe you could send that to me?
>>> And might be good to know in which jar the class org.omegahat.R.Java.RForeignReference is contained.
>>>
>>>
>>> If that is relevant:
>>>
>>> java version "1.6.0_17"
>>> Java(TM) SE Runtime Environment (build 1.6.0_17-b04-248-10M3025)
>>> Java HotSpot(TM) 64-Bit Server VM (build 14.3-b01-101, mixed mode)
>>>
>>>
>>> Here is the output of javaConfig().
>>>
>>>> javaConfig()          
>>> An object of class "JavaConfiguration"
>>> Slot "classPath":
>>> [1] "/Library/Frameworks/R.framework/Resources/library/SJava/org/omegahat/Jars/Environment.jar"
>>> [2] "/Library/Frameworks/R.framework/Resources/library/SJava/org/.."                           
>>> [3] "/Library/Frameworks/R.framework/Resources/library/SJava/org/omegahat/Jars/antlr.jar"      
>>> [4] "/Library/Frameworks/R.framework/Resources/library/SJava/org/omegahat/Jars/jas.jar"        
>>> [5] "/Library/Frameworks/R.framework/Resources/library/SJava/org/omegahat/Jars/jhall.jar"      
>>>
>>> Slot "libraryPath":
>>> [1] "/Library/Frameworks/R.framework/Resources/library/SJava/libs"
>>>
>>> Slot "properties":
>>>                                                                 EmbeddedInR 
>>>                                                                      "true" 
>>>                                                       InterfaceManagerClass 
>>>             "org/omegahat/Interfaces/NativeInterface/OmegaInterfaceManager" 
>>>                                                   ForeignReferenceBaseClass 
>>>                                         "org/omegahat/R/Java/RJavaInstance" 
>>>                                                               java.compiler 
>>>                                                                      "NONE" 
>>>                                                                  OMEGA_HOME 
>>>      "/Library/Frameworks/R.framework/Resources/library/SJava/org/omegahat" 
>>>                                                          OmegahatSearchPath 
>>> ".,${OMEGA_HOME}/Environment/Scripts/Run,${OMEGA_HOME}/Jars/Environment.jar" 
>> My javaConfig() (not on Mac) has ${OMEGA_HOME} expanded
>>
>> Slot "properties":
>>
>>
>>                 EmbeddedInR
>>
>>
>>                      "true"
>>
>>
>>       InterfaceManagerClass
>>
>>
>> "org/omegahat/Interfaces/NativeInterface/OmegaInterfaceManager"
>>
>>
>>   ForeignReferenceBaseClass
>>
>>
>> "org/omegahat/R/Java/RJavaInstance"
>>
>>
>>               java.compiler
>>
>>
>>                      "NONE"
>>
>>
>>                  OMEGA_HOME
>>
>>
>> "/home/mtmorgan/arch/x86_64/R-devel/library/SJava/org/omegahat"
>>
>>
>>          OmegahatSearchPath
>> ".,/home/mtmorgan/arch/x86_64/R-devel/library/SJava/org/omegahat/Environment/Scripts/Run,/home/mtmorgan/arch/x86_64/R-devel/library/SJava/org/omegahat/Jars/Environment.jar"
>>
>>
>>           java.library.path
>>
>>
>> "/home/mtmorgan/arch/x86_64/R-devel/library/SJava/libs"
>>
>>
>>>                                                           java.library.path 
>>>              "/Library/Frameworks/R.framework/Resources/library/SJava/libs" 
>>>
>>> Slot "options":
>>> character(0)
>>>
>>> Slot "args":
>>> character(0)
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>>> During installation I got the following error message, which I suspect to be relevant:
>>>>>
>>>>> ...
>>>>> ** R
>>>>> ** inst
>>>>> cp: cannot overwrite directory /Library/Frameworks/R.framework/Resources/library/SJava/libs with non-directory inst/libs
>>>>> sh: /usr/bin/tarxf: No such file or directory
>>>>> ....
>>>>>
>>>>> I also manually copied src/SJava.so to /Library/Frameworks/R.framework/Resources/library/SJava/libs but that didn't change anything.
>>>>> I put the full output of javareconf,  R CMD INSTALL, and sessionInfo() here. Any help would be appreciated. 
>>>>>
>>>>> Michael
>>>>>
> 
>>>>> [snip]
> 
>>>>>
>>>>>
>>>>>> sessionInfo()
>>>>> R version 2.10.1 (2009-12-14) 
>>>>> x86_64-apple-darwin9.8.0 
>>>>>
>>>>> locale:
>>>>> [1] C
>>>>>
>>>>> attached base packages:
>>>>> [1] stats     graphics  grDevices utils     datasets  methods   base     
>>>>>
>>>>> other attached packages:
>>>>> [1] SJava_0.72.0
>>>>>
>>>>> loaded via a namespace (and not attached):
>>>>> [1] tools_2.10.1
>>>>>
>>>>> _______________________________________________
>>>>> Bioconductor mailing list
>>>>> Bioconductor at stat.math.ethz.ch
>>>>> https://stat.ethz.ch/mailman/listinfo/bioconductor
>>>>> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
>>>> -- 
>>>> Martin Morgan
>>>> Computational Biology / Fred Hutchinson Cancer Research Center
>>>> 1100 Fairview Ave. N.
>>>> PO Box 19024 Seattle, WA 98109
>>>>
>>>> Location: Arnold Building M1 B861
>>>> Phone: (206) 667-2793
>>
>> -- 
>> Martin Morgan
>> Computational Biology / Fred Hutchinson Cancer Research Center
>> 1100 Fairview Ave. N.
>> PO Box 19024 Seattle, WA 98109
>>
>> Location: Arnold Building M1 B861
>> Phone: (206) 667-2793
> 


-- 
Martin Morgan
Computational Biology / Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N.
PO Box 19024 Seattle, WA 98109

Location: Arnold Building M1 B861
Phone: (206) 667-2793



More information about the Bioconductor mailing list