[R] Re: Problem with package SJava

Vincent MUTEAUD muteau at ensam.inra.fr
Wed May 19 10:20:28 CEST 2004


I have instanciated the ROmegahatInterpreter and I have a new message that 
I have no R_HOME environment variable value ??
when I do :
  > .javaConfig
I obtain:
$classPath
[1] "C:/PROGRA~1/R/rw1081/library/SJava/org/omegahat/Jars/Environment.jar"
[2] "C:/PROGRA~1/R/rw1081/library/SJava/org/.."
[3] "C:/PROGRA~1/R/rw1081/library/SJava/org/omegahat/Jars/antlr.jar"
[4] "C:/PROGRA~1/R/rw1081/library/SJava/org/omegahat/Jars/jas.jar"
[5] "C:/PROGRA~1/R/rw1081/library/SJava/org/omegahat/Jars/jhall.jar"

$properties
                                                                  EmbeddedInR
                                                                       "true"
                                                        InterfaceManagerClass
              "org/omegahat/Interfaces/NativeInterface/OmegaInterfaceManager"
                                                    ForeignReferenceBaseClass
                                      "org/omegahat/R/Java/RForeignReference"
                                                                java.compiler
                                                                       "NONE"
                                                                   OMEGA_HOME
                            "C:/PROGRA~1/R/rw1081/library/SJava/org/omegahat"
                                                           OmegahatSearchPath
".,${OMEGA_HOME}/Environment/Scripts/Run,${OMEGA_HOME}/Jars/Environment.jar"
                                                            java.library.path
                                    "C:/PROGRA~1/R/rw1081/library/SJava/libs"

$libraryPath
[1] "C:/PROGRA~1/R/rw1081/library/SJava/libs"

Wat I should do?



A 08:41 18/05/2004 -0700, Nathan Whitehouse a écrit :
>Hi,
>
>   This main method on class Essai will fail at least
>for one reason becaue you need to instantiate a
>ROmegahatInterpreter.
>
>   Referencing this causes the R DLLs & the SJava DLLs
>to load.
>    However, it appears that they are already loaded,
>judging from your output below based on the signal
>11/Page fault error.
>
>   Try adding it and seeing if it works.  Can you get
>it to work under linux?
>
>   About the java compilation issue:
>
>   you need to have the following jars in your
>CLASSPATH
>
>     $SJAVA_HOME/org/omegahat/Jars/jas.jar
>     $SJAVA_HOME/org/omegahat/Jars/antlr.jar
>     $SJAVA_HOME/org/omegahat/Jars/Environment.jar
>
>   This might cause the compilation issue.
>
>   Hope that is a little help.  If you still have
>problems, hopefully we can figure them out.
>
>   Nathan
>
>Hello all,
>I'm trying to run SJava package (0.65 modified
>downloaded from :
>http://stats.math.uni-augsburg.de/iPlots/alpha/) on
>windows NT 2000 and
>R
>1.8.01. I have also downloaded the PDF Calling R from
>Java and when I
>want
>to execute the following code:
>import org.omegahat.R.Java.*;
>import java.io.*;
>public class Essai{
>         public static void main (String [] args) {
>                 REvaluator e = new REvaluator();
>                 Object val = e.eval("objects()");
>                 if (val!= null)  {
>                         String[] objects = (String[]) val;
>                         for (int i = 0; i< objects.length; i++) {
>                                 System.out.println("("+i+") " + objects[i]);
>                         }
>                 }
>         }
>}
>I have in return:
>
>
>An unexpected exception has been detected in native
>code outside the
>VM.
>Unexpected Signal : EXCEPTION_ACCESS_VIOLATION
>(0xc0000005) occurred at
>PC=0x6B4B85E3
>Function=R_SetMaxNSize+0xC3
>Library=c:\Program Files\R\rw1081\bin\R.dll
>
>Current Java thread:
>         at org.omegahat.R.Java.REvaluator.eval(Native Method)
>         at
>org.omegahat.R.Java.REvaluator.eval(REvaluator.java:86)
>         at
>org.omegahat.R.Java.REvaluator.eval(REvaluator.java:36)
>         at Toto.main(Toto.java:22)
>
>Dynamic libraries:
>0x00400000 - 0x00406000         C:\j2sdk1.4.2_03\bin\java.exe
>0x78460000 - 0x784E3000         C:\WINNT\system32\ntdll.dll
>0x78ED0000 - 0x78F32000
>C:\WINNT\system32\ADVAPI32.dll
>0x77E70000 - 0x77F33000
>C:\WINNT\system32\KERNEL32.DLL
>0x770C0000 - 0x77131000         C:\WINNT\system32\RPCRT4.DLL
>0x78000000 - 0x78045000         C:\WINNT\system32\MSVCRT.dll
>0x08000000 - 0x08138000
>C:\j2sdk1.4.2_03\jre\bin\client\jvm.dll
>0x77E00000 - 0x77E65000         C:\WINNT\system32\USER32.dll
>0x77F40000 - 0x77F7E000         C:\WINNT\system32\GDI32.DLL
>0x77540000 - 0x77571000         C:\WINNT\system32\WINMM.dll
>0x10000000 - 0x10007000
>C:\j2sdk1.4.2_03\jre\bin\hpi.dll
>0x007C0000 - 0x007CE000
>C:\j2sdk1.4.2_03\jre\bin\verify.dll
>0x007D0000 - 0x007E9000
>C:\j2sdk1.4.2_03\jre\bin\java.dll
>0x007F0000 - 0x007FD000
>C:\j2sdk1.4.2_03\jre\bin\zip.dll
>0x18270000 - 0x18287000         C:\Program
>Files\R\rw1081\library\SJava\libs\SJava.dll
>0x6B400000 - 0x6B61B000         c:\Program
>Files\R\rw1081\bin\R.dll
>0x68180000 - 0x6819F000         c:\Program
>Files\R\rw1081\bin\Rblas.dll
>0x77B40000 - 0x77BC9000
>C:\WINNT\system32\COMCTL32.DLL
>0x76B00000 - 0x76B3E000
>C:\WINNT\system32\COMDLG32.DLL
>0x63180000 - 0x631C8000         C:\WINNT\system32\SHLWAPI.DLL
>0x77580000 - 0x777CF000         C:\WINNT\system32\SHELL32.DLL
>0x77810000 - 0x77817000         C:\WINNT\system32\VERSION.dll
>0x75950000 - 0x75956000         C:\WINNT\system32\LZ32.DLL
>0x77910000 - 0x77933000
>C:\WINNT\system32\imagehlp.dll
>0x72970000 - 0x7299D000         C:\WINNT\system32\DBGHELP.dll
>0x68EA0000 - 0x68EAB000         C:\WINNT\system32\PSAPI.DLL
>
>Heap at VM Abort:
>Heap
>   def new generation   total 576K, used 227K
>[0x10010000, 0x100b0000,
>0x104f0000)
>    eden space 512K,  44% used [0x10010000, 0x10048f68,
>0x10090000)
>    from space 64K,   0% used [0x10090000, 0x10090000,
>0x100a0000)
>    to   space 64K,   0% used [0x100a0000, 0x100a0000,
>0x100b0000)
>   tenured generation   total 1408K, used 0K
>[0x104f0000, 0x10650000,
>0x14010000)
>     the space 1408K,   0% used [0x104f0000,
>0x104f0000, 0x104f0200,
>0x10650000)
>   compacting perm gen  total 4096K, used 1039K
>[0x14010000, 0x14410000,
>0x18010000)
>     the space 4096K,  25% used [0x14010000,
>0x14113de0, 0x14113e00,
>0x14410000)
>
>Local Time = Mon May 17 09:22:41 2004
>Elapsed Time = 17
>#
># The exception above was detected in native code
>outside the VM
>#
># Java VM: Java HotSpot(TM) Client VM (1.4.2_03-b02
>mixed mode)
>#
>
>I try to recompile the native interfaces and I think
>that some files or
>directories are missing like:
>antlr\commonAST.class
>jas.classEnv
>
>I don't know what I should do so I hope that anybody
>could help me.
>thanks,
>Regards
>
>Vincent
>
>=====
>Nathan Whitehouse
>Statistics/Programming
>Baylor College of Medicine
>Houston, TX, USA
>nlwhitehouse at yahoo.com
>work: 1-713-798-9029
>cell:    1-512-293-5840
>
>http://rho-project.org: rho- open source web services for R.
>http://franklin.imgen.bcm.tmc.edu: Shaw laboratory, bcm.




More information about the R-help mailing list