Skip to content

Some File::Stat operations don't work for Oracle JDK #2913

@jsvd

Description

@jsvd

Installed Oracle JDK using:

sudo add-apt-repository -y ppa:webupd8team/java
sudo apt-get update
sudo apt-get -y install oracle-java8-installer
$ lsb_release -d
Description:    Ubuntu 14.04.2 LTS

Then tried using blockdev? and dev_minor:

ubuntu@ip-172-30-0-98:~/jruby-9.0.0.0.pre2$ bin/jruby -v
jruby 9.0.0.0.pre2 (2.2.2) 2015-04-28 2755ae0 Java HotSpot(TM) 64-Bit Server VM 25.45-b02 on 1.8.0_45-b14 +jit [linux-amd64]
ubuntu@ip-172-30-0-98:~/jruby-9.0.0.0.pre2$ bin/jruby -S irb
irb(main):001:0> File::Stat.new("/").blockdev?
NotImplementedError: block device detection unsupported or native support failed to load
    from org/jruby/RubyFileStat.java:172:in `blockdev?'
    from (irb):1:in `<eval>'
    from org/jruby/RubyKernel.java:1005:in `eval'
    from org/jruby/RubyKernel.java:1315:in `loop'
    from org/jruby/RubyKernel.java:1125:in `catch'
    from org/jruby/RubyKernel.java:1125:in `catch'
    from /home/ubuntu/jruby-9.0.0.0.pre2/bin/jirb:13:in `<top>'
irb(main):002:0> File::Stat.new("/").dev_minor
NotImplementedError: stat.st_dev unsupported or native support failed to load
    from org/jruby/RubyFileStat.java:233:in `dev_minor'
    from (irb):2:in `<eval>'
    from org/jruby/RubyKernel.java:1005:in `eval'
    from org/jruby/RubyKernel.java:1315:in `loop'
    from org/jruby/RubyKernel.java:1125:in `catch'
    from org/jruby/RubyKernel.java:1125:in `catch'
    from /home/ubuntu/jruby-9.0.0.0.pre2/bin/jirb:13:in `<top>'
irb(main):003:0> 

Seeing this in elastic/logstash#3127

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions