Search code examples
javarjavadeducer

java.lang.NullPointerException (No Data Viewer Loaded) JGR, Deducer


I'm running Deducer on OSX 10.9.2. I don't know why today I received this error with no Data Viewer:

Loading required package: DeducerExtras
> java.lang.NullPointerException
    at org.rosuda.deducer.JGRConnector.idleEval(JGRConnector.java:39)
    at org.rosuda.deducer.Deducer.idleEval(Deducer.java:611)
    at org.rosuda.deducer.data.DataViewerController.refreshData(DataViewerController.java:212)
    at org.rosuda.deducer.data.DataRefresher.run(DataViewerController.java:252)
    at java.lang.Thread.run(Thread.java:695)

Do you know how I can fix this issue?

Here the sessionInfo()

R version 3.0.3 (2014-03-06)
Platform: x86_64-apple-darwin10.8.0 (64-bit)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

other attached packages:
 [1] DeducerSpatial_0.7         scales_0.2.4               OpenStreetMap_0.3.1        rgdal_0.8-16               raster_2.2-31              maptools_0.8-29           
 [7] sp_1.0-15                  DeducerPlugInScaling_0.1-0 klaR_0.6-10                mvnormtest_0.1-9           GPArotation_2012.3-1       psych_1.4.4               
[13] DeducerExtras_1.7          irr_0.84                   lpSolve_5.6.8              Deducer_0.7-7              MASS_7.3-33                car_2.0-20                
[19] ggplot2_0.9.3.1            JGR_1.7-16                 iplots_1.1-7               JavaGD_0.6-1               rJava_0.9-6               

loaded via a namespace (and not attached):
 [1] class_7.3-10        cluster_1.15.2      colorspace_1.2-4    combinat_0.0-8      digest_0.6.4        e1071_1.6-3         effects_3.0-0       foreign_0.8-61     
 [9] Formula_1.1-1       grid_3.0.3          gtable_0.1.2        Hmisc_3.14-4        lattice_0.20-29     latticeExtra_0.6-26 multcomp_1.3-3      munsell_0.4.2      
[17] mvtnorm_0.9-99992   nnet_7.3-8          plyr_1.8.1          png_0.1-7           proto_0.3-10        RColorBrewer_1.0-5  Rcpp_0.11.1         reshape2_1.4       
[25] sandwich_2.3-0      splines_3.0.3       stringr_0.6.2       survival_2.37-7     TH.data_1.0-3       tools_3.0.3         zoo_1.7-11

Thanks in advance

David


Solution

  • The error clearly says JGRConnector is null actually. Check that why it happened to be today. Since it was working earlier, i totally believe that you have created an Object using new keyword and then invoking the method idleEval(String) on the newly created Object like below. Am i right?

    JGRConnector connector = new JGRConnector();
    connector.idleEval(StringInput);
    

    Hope it helps!