Skip to content

can not require openssl with JDK9 #4805

@mkristian

Description

@mkristian
$ java --version
java 9
Java(TM) SE Runtime Environment (build 9+181)
Java HotSpot(TM) 64-Bit Server VM (build 9+181, mixed mode)

reproduce:

$ java -Djruby.backtrace.style=full -jar jruby-complete-9.1.13.0.jar -ropenssl -e 1
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.jruby.util.io.FilenoUtil (file:/Users/christian/.m2/repository/org/jruby/jruby-complete/9.1.13.0/jruby-complete-9.1.13.0.jar) to method sun.nio.ch.SelChImpl.getFD()
WARNING: Please consider reporting this to the maintainers of org.jruby.util.io.FilenoUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
LoadError: load error: jopenssl/load -- java.lang.StringIndexOutOfBoundsException: begin 0, end 3, length 1
              getStackTrace at java/lang/Thread.java:1654
           getBacktraceData at org/jruby/runtime/backtrace/TraceType.java:246
               getBacktrace at org/jruby/runtime/backtrace/TraceType.java:47
           prepareBacktrace at org/jruby/RubyException.java:235
                   preRaise at org/jruby/exceptions/RaiseException.java:216
                   preRaise at org/jruby/exceptions/RaiseException.java:183
                     <init> at org/jruby/exceptions/RaiseException.java:111
          newRaiseException at org/jruby/Ruby.java:4138
               newLoadError at org/jruby/Ruby.java:3988
  newLoadErrorFromThrowable at org/jruby/runtime/load/LoadService.java:924
  tryLoadingLibraryOrScript at org/jruby/runtime/load/LoadService.java:915
          smartLoadInternal at org/jruby/runtime/load/LoadService.java:531
                    require at org/jruby/runtime/load/LoadService.java:402
              requireCommon at org/jruby/RubyKernel.java:962
                  require19 at org/jruby/RubyKernel.java:955
                       call at org/jruby/RubyKernel$INVOKER$s$1$0$require19.gen:-1
                       call at org/jruby/internal/runtime/methods/JavaMethod.java:384
                       call at org/jruby/internal/runtime/methods/AliasMethod.java:61
                       call at org/jruby/runtime/callsite/CachingCallSite.java:161
                processCall at org/jruby/ir/interpreter/InterpreterEngine.java:314
                  interpret at org/jruby/ir/interpreter/StartupInterpreterEngine.java:73
                  interpret at org/jruby/ir/interpreter/InterpreterEngine.java:83
           INTERPRET_METHOD at org/jruby/internal/runtime/methods/MixedModeIRMethod.java:179
                    require at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:59
                       call at org/jruby/internal/runtime/methods/MixedModeIRMethod.java:165
                       call at org/jruby/internal/runtime/methods/DynamicMethod.java:200
               cacheAndCall at org/jruby/runtime/callsite/CachingCallSite.java:338
                       call at org/jruby/runtime/callsite/CachingCallSite.java:163
                processCall at org/jruby/ir/interpreter/InterpreterEngine.java:314
                  interpret at org/jruby/ir/interpreter/StartupInterpreterEngine.java:73
             INTERPRET_ROOT at org/jruby/ir/interpreter/Interpreter.java:112
                     <main> at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/openssl.rb:1
                    execute at org/jruby/ir/interpreter/Interpreter.java:99
                    execute at org/jruby/ir/interpreter/Interpreter.java:35
                    execute at org/jruby/ir/IRTranslator.java:42
             runInterpreter at org/jruby/Ruby.java:840
                   loadFile at org/jruby/Ruby.java:2877
                       load at org/jruby/runtime/load/LibrarySearcher.java:243
                       load at org/jruby/runtime/load/LibrarySearcher.java:34
  tryLoadingLibraryOrScript at org/jruby/runtime/load/LoadService.java:891
          smartLoadInternal at org/jruby/runtime/load/LoadService.java:531
                    require at org/jruby/runtime/load/LoadService.java:402
              requireCommon at org/jruby/RubyKernel.java:962
                  require19 at org/jruby/RubyKernel.java:955
                       call at org/jruby/RubyKernel$INVOKER$s$1$0$require19.gen:-1
                       call at org/jruby/internal/runtime/methods/JavaMethod.java:384
                       call at org/jruby/internal/runtime/methods/AliasMethod.java:61
                       call at org/jruby/runtime/callsite/CachingCallSite.java:161
                processCall at org/jruby/ir/interpreter/InterpreterEngine.java:314
                  interpret at org/jruby/ir/interpreter/StartupInterpreterEngine.java:73
                  interpret at org/jruby/ir/interpreter/InterpreterEngine.java:83
           INTERPRET_METHOD at org/jruby/internal/runtime/methods/MixedModeIRMethod.java:179
                     (root) at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:1
                       call at org/jruby/internal/runtime/methods/MixedModeIRMethod.java:165
                       call at org/jruby/internal/runtime/methods/DynamicMethod.java:200
                    finvoke at org/jruby/RubyClass.java:908
                     invoke at org/jruby/runtime/Helpers.java:402
                 callMethod at org/jruby/RubyBasicObject.java:363
                       init at org/jruby/Ruby.java:1253
                newInstance at org/jruby/Ruby.java:339
                internalRun at org/jruby/Main.java:271
                        run at org/jruby/Main.java:232
                       main at org/jruby/Main.java:204

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions