Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

java.lang.NoSuchMethodError: <init>

698 views
Skip to first unread message

JakuB

unread,
Oct 6, 2013, 5:08:58 AM10/6/13
to
Hello,

(Related to Slackware 13.37 64bit, java 1.7.0 u40, and R 2.14.0)
I am having a problem (perhaps) of some java misconfiguration which
appears when working with R/rJava/RWeka (http://www.r-project.org/)

a succesful root's R-session is:
> library(RWeka)
> x <- read.arff(system.file("arff",
> "contact-lenses.arff", package = "RWeka"))
> Apriori(x)

Apriori
=======
Minimum support: 0.2 (5 instances)
Minimum metric <confidence>: 0.9
Number of cycles performed: 16

Generated sets of large
itemsets:
(...)

and failed R-session as an user
> library(RWeka)
> x <- read.arff(system.file("arff", "contact-lenses.arff", package =
> "RWeka"))
> Apriori(x)
Error in .jnew("weka/core/Attribute", attname[i], .jcast(levels,
"java/util/List")) :
java.lang.NoSuchMethodError: <init>

What is missing on user's account? What permissions or variables?
Can anyone help me with this?

Regards
Jakub

Chris Sorenson

unread,
Oct 7, 2013, 12:48:59 AM10/7/13
to
Not a java guy but it could be that the library file that has that
method is read-only to root. To change the permissions to executable,
of every shared object file in every directory beneath the one from
which you execute the command, you could do this:

find . -type f -name \*.so -exec chmod 755 '{}' \;

Obviously, you'd have to do that as root...

JakuB

unread,
Oct 7, 2013, 1:17:06 PM10/7/13
to
On 2013-10-07, Chris Sorenson <cso...@isd.net> wrote:
> JakuB wrote:
>> (Related to Slackware 13.37 64bit, java 1.7.0 u40, and R 2.14.0)
>> java.lang.NoSuchMethodError: <init>
>
> Not a java guy but it could be that the library file that has that
> method is read-only to root. To change the permissions to executable,
> of every shared object file in every directory beneath the one from
> which you execute the command, you could do this:
>
> find . -type f -name \*.so -exec chmod 755 '{}' \;
>
> Obviously, you'd have to do that as root...

I guess permissions are correct:
ls /usr/lib64/R/library/rJava -lad
drwxr-xr-x 9 root root 4096 Sep 25 19:44 /usr/lib64/R/library/rJava
and all other libraries have similar.

But anyway - thank you for your try

Henrik Carlqvist

unread,
Oct 8, 2013, 1:37:12 AM10/8/13
to
On Mon, 07 Oct 2013 17:17:06 +0000, JakuB wrote:

> On 2013-10-07, Chris Sorenson <cso...@isd.net> wrote:
>> Not a java guy but it could be that the library file that has that
>> method is read-only to root.

>> find . -type f -name \*.so -exec chmod 755 '{}' \;

> I guess permissions are correct:
> ls /usr/lib64/R/library/rJava -lad
> drwxr-xr-x 9 root root 4096 Sep 25 19:44 /usr/lib64/R/library/rJava
> and all other libraries have similar.

Maybe your dynamic library .so-files does have the right permissions, but
the above command does not show that is the case as you are only looking
at the permissions of the directory.

If you only want to look at the permissions without changing anything you
could try the following command:

find . -type f -name \*.so -exec ls -l '{}' \;

regards Henrik
--
The address in the header is only to prevent spam. My real address is:
hc351(at)poolhem.se Examples of addresses which go to spammers:
root@localhost postmaster@localhost
0 new messages