[R] Java related (?) problems with RWeka

Prof Brian Ripley ripley at stats.ox.ac.uk
Sat Mar 4 09:02:43 CET 2006


This is a Java error inside Weka, so R-help is hardly an appropriate list.

RWeka supplies a version of Weka, and you already have one on your 
classpath.  I suspect a mismatch, so try not having Weka in your 
classpath.  (I would have expected the RWeka version to take precedence, 
but as I cannot run RWeka on this machine (the AMD64 version of rJava does 
not work enough), I cannot check.)

On Fri, 3 Mar 2006, Derek White wrote:

> Hello all,
>
> I am attempting to run an R script that makes use of RWeka.  I am
> running SuSE Linux 9.3 with Java 1.5.0_06, R version 2.2.1, Weka
> 3-4-7, and Rweka 0.2-1.
>
> CLASSPATH="/usr/local/weka-3-4-7/weka.jar:/usr/local/JGR/JGR.jar"
>
> I receive the error:
>
> NewObject("weka/core/Instances","(Ljava/io/Reader;)V",...) failed
> Exception in thread "main" java.io.IOException: end of line expected,
> read Token[=], line 1
>        at weka.core.Instances.errms(Unknown Source)
>        at weka.core.Instances.getLastToken(Unknown Source)
>        at weka.core.Instances.readHeader(Unknown Source)
>        at weka.core.Instances.<init>(Unknown Source)
> Error in validObject(.Object) : invalid class "jobjRef" object:
> invalid object for slot "jobj" in class "jobjRef": got class "NULL",
> should be or extend class "externalptr"
> In addition: Warning message:
> Unable to create object of the class weka/core/Instances , returning
> null reference. in: .jnew("weka/core/Instances", .jcast(reader,
> "java/io/Reader"))
> Execution halted
>
>
> My R script seems to run fine on Windows XP.
>
> Thanks in advance,
> Derek
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-help mailing list