jruby / activerecord-jdbc-adapter

JRuby's ActiveRecord adapter using JDBC.
BSD 2-Clause "Simplified" License
462 stars 385 forks source link

SSL errors because of old versions of MySQL Connector/J #1082

Closed mohamedhafez closed 3 years ago

mohamedhafez commented 3 years ago

The versions of MySQL Connector/J used in activerecord-jdbcmysql-adapter have this bug in them which is causing me to receive lots of ssl errors like the one posted below (also see https://github.com/mysql/mysql-connector-j/pull/32). This bug is fixed as of MySQL Connector/J versions 8.0.16 and 5.1.48, is there any chance we could get an upgrade to these?

The issue affects connecting to a MySQL database via SSL from Java 11. To reproduce this in jruby, just run rake db:migrate on a rails app. Below is what I get every time, as well as frequently throughout the day in the normal operation of my rails app. (I'm connecting to a MySQL 8.0 database, but it sounds like it affects all versions of MySQL)

Thu Dec 31 06:57:14 PST 2020 WARN: Caught while disconnecting...

EXCEPTION STACK TRACE:

** BEGIN NESTED EXCEPTION ** 

javax.net.ssl.SSLException
MESSAGE: closing inbound before receiving peer's close_notify

STACKTRACE:

javax.net.ssl.SSLException: closing inbound before receiving peer's close_notify
        at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:133)
        at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:117)
        at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:337)
        at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:293)
        at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:284)
        at java.base/sun.security.ssl.SSLSocketImpl.shutdownInput(SSLSocketImpl.java:742)
        at java.base/sun.security.ssl.SSLSocketImpl.shutdownInput(SSLSocketImpl.java:721)
        at com.mysql.jdbc.MysqlIO.quit(MysqlIO.java:2249)
        at com.mysql.jdbc.ConnectionImpl.realClose(ConnectionImpl.java:4232)
        at com.mysql.jdbc.ConnectionImpl.close(ConnectionImpl.java:1472)
        at arjdbc.jdbc.RubyJdbcConnection.close(RubyJdbcConnection.java:3700)
        at arjdbc.jdbc.RubyJdbcConnection.setConnection(RubyJdbcConnection.java:2890)
        at arjdbc.jdbc.RubyJdbcConnection.disconnect(RubyJdbcConnection.java:661)
        at arjdbc.jdbc.RubyJdbcConnection$INVOKER$i$0$0$disconnect.call(RubyJdbcConnection$INVOKER$i$0$0$disconnect.gen)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:354)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:143)
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:345)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
        at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:80)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:121)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:108)
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:192)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:354)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:143)
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:345)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
        at org.jruby.ir.interpreter.Interpreter.INTERPRET_BLOCK(Interpreter.java:116)
        at org.jruby.runtime.MixedModeIRBlockBody.commonYieldPath(MixedModeIRBlockBody.java:137)
        at org.jruby.runtime.IRBlockBody.doYield(IRBlockBody.java:166)
        at org.jruby.runtime.BlockBody.yield(BlockBody.java:108)
        at org.jruby.runtime.Block.yield(Block.java:184)
        at org.jruby.RubyArray.each(RubyArray.java:1809)
        at org.jruby.RubyArray$INVOKER$i$0$0$each.call(RubyArray$INVOKER$i$0$0$each.gen)
        at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodZeroBlock.call(JavaMethod.java:555)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:332)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:86)
        at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:93)
        at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:546)
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
        at org.jruby.ir.interpreter.Interpreter.INTERPRET_BLOCK(Interpreter.java:116)
        at org.jruby.runtime.MixedModeIRBlockBody.commonYieldPath(MixedModeIRBlockBody.java:137)
        at org.jruby.runtime.IRBlockBody.yieldSpecific(IRBlockBody.java:70)
        at org.jruby.runtime.Block.yieldSpecific(Block.java:153)
        at org.jruby.ir.targets.YieldSite.yieldSpecific(YieldSite.java:156)
        at home.web.$_dot_rvm.rubies.jruby_minus_9_dot_2_dot_14_dot_0.lib.ruby.stdlib.monitor.RUBY$method$mon_synchronize$0(/home/web/.rvm/rubies/jruby-9.2.14.0/lib/ruby/stdlib/monitor.rb:235)
        at home.web.$_dot_rvm.rubies.jruby_minus_9_dot_2_dot_14_dot_0.lib.ruby.stdlib.monitor.RUBY$method$mon_synchronize$0$__VARARGS__(/home/web/.rvm/rubies/jruby-9.2.14.0/lib/ruby/stdlib/monitor.rb)
        at org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:80)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:70)
        at org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:137)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:332)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:86)
        at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:93)
        at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:546)
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
        at org.jruby.ir.interpreter.Interpreter.INTERPRET_BLOCK(Interpreter.java:116)
        at org.jruby.runtime.MixedModeIRBlockBody.commonYieldPath(MixedModeIRBlockBody.java:137)
        at org.jruby.runtime.IRBlockBody.yieldSpecific(IRBlockBody.java:70)
        at org.jruby.runtime.Block.yieldSpecific(Block.java:153)
        at org.jruby.ir.runtime.IRRuntimeHelpers.yieldSpecific(IRRuntimeHelpers.java:503)
        at org.jruby.ir.instructions.YieldInstr.interpret(YieldInstr.java:76)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.processOtherOp(StartupInterpreterEngine.java:178)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:104)
        at org.jruby.ir.interpreter.Interpreter.INTERPRET_BLOCK(Interpreter.java:116)
        at org.jruby.runtime.MixedModeIRBlockBody.commonYieldPath(MixedModeIRBlockBody.java:137)
        at org.jruby.runtime.IRBlockBody.yieldSpecific(IRBlockBody.java:70)
        at org.jruby.runtime.Block.yieldSpecific(Block.java:153)
        at org.jruby.ir.runtime.IRRuntimeHelpers.yieldSpecific(IRRuntimeHelpers.java:503)
        at org.jruby.ir.instructions.YieldInstr.interpret(YieldInstr.java:76)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.processOtherOp(StartupInterpreterEngine.java:178)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:104)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:86)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:73)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:332)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:86)
        at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:93)
        at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:546)
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
        at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:86)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:156)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:143)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:386)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:184)
        at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:191)
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:337)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
        at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:86)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:156)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:143)
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:200)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:375)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:174)
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:316)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
        at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:80)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:121)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:108)
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:192)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:354)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:143)
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:345)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
        at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:86)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:156)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:143)
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:200)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:375)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:174)
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:316)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
        at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:86)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:156)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:143)
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:200)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:375)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:174)
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:316)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
        at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:86)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:156)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:143)
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:200)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:375)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:174)
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:316)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
        at org.jruby.ir.interpreter.Interpreter.INTERPRET_BLOCK(Interpreter.java:116)
        at org.jruby.runtime.MixedModeIRBlockBody.commonYieldPath(MixedModeIRBlockBody.java:137)
        at org.jruby.runtime.IRBlockBody.call(IRBlockBody.java:60)
        at org.jruby.runtime.Block.call(Block.java:143)
        at org.jruby.RubyProc.call(RubyProc.java:299)
        at org.jruby.RubyProc$INVOKER$i$call.call(RubyProc$INVOKER$i$call.gen)
        at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodZeroOrOneOrTwoOrNBlock.call(JavaMethod.java:371)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:203)
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:325)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
        at org.jruby.ir.interpreter.Interpreter.INTERPRET_BLOCK(Interpreter.java:116)
        at org.jruby.runtime.MixedModeIRBlockBody.commonYieldPath(MixedModeIRBlockBody.java:137)
        at org.jruby.runtime.IRBlockBody.doYield(IRBlockBody.java:166)
        at org.jruby.runtime.BlockBody.yield(BlockBody.java:108)
        at org.jruby.runtime.Block.yield(Block.java:184)
        at org.jruby.RubyArray.each(RubyArray.java:1809)
        at org.jruby.RubyArray$INVOKER$i$0$0$each.call(RubyArray$INVOKER$i$0$0$each.gen)
        at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodZeroBlock.call(JavaMethod.java:555)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:84)
        at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:93)
        at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:546)
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
        at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:86)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:156)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:143)
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:200)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:172)
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:316)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
        at org.jruby.ir.interpreter.Interpreter.INTERPRET_BLOCK(Interpreter.java:116)
        at org.jruby.runtime.MixedModeIRBlockBody.commonYieldPath(MixedModeIRBlockBody.java:137)
        at org.jruby.runtime.IRBlockBody.yieldSpecific(IRBlockBody.java:70)
        at org.jruby.runtime.Block.yieldSpecific(Block.java:153)
        at org.jruby.ir.runtime.IRRuntimeHelpers.yieldSpecific(IRRuntimeHelpers.java:503)
        at org.jruby.ir.instructions.YieldInstr.interpret(YieldInstr.java:76)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.processOtherOp(StartupInterpreterEngine.java:178)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:104)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:86)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:73)
        at org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:137)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:332)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:86)
        at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:93)
        at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:546)
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
        at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:92)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:191)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:178)
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:208)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:396)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:205)
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:325)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:86)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:73)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:332)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:86)
        at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:549)
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
        at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:86)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:156)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:143)
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:200)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:375)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:174)
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:316)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
        at org.jruby.ir.interpreter.Interpreter.INTERPRET_BLOCK(Interpreter.java:116)
        at org.jruby.runtime.MixedModeIRBlockBody.commonYieldPath(MixedModeIRBlockBody.java:137)
        at org.jruby.runtime.IRBlockBody.doYield(IRBlockBody.java:166)
        at org.jruby.runtime.BlockBody.yield(BlockBody.java:108)
        at org.jruby.runtime.Block.yield(Block.java:184)
        at org.jruby.RubyArray.each(RubyArray.java:1809)
        at org.jruby.RubyArray$INVOKER$i$0$0$each.call(RubyArray$INVOKER$i$0$0$each.gen)
        at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodZeroBlock.call(JavaMethod.java:555)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:332)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:86)
        at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:93)
        at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:546)
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
        at org.jruby.ir.interpreter.Interpreter.INTERPRET_BLOCK(Interpreter.java:116)
        at org.jruby.runtime.MixedModeIRBlockBody.commonYieldPath(MixedModeIRBlockBody.java:137)
        at org.jruby.runtime.IRBlockBody.yieldSpecific(IRBlockBody.java:70)
        at org.jruby.runtime.Block.yieldSpecific(Block.java:153)
        at org.jruby.ir.runtime.IRRuntimeHelpers.yieldSpecific(IRRuntimeHelpers.java:503)
        at org.jruby.ir.instructions.YieldInstr.interpret(YieldInstr.java:76)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.processOtherOp(StartupInterpreterEngine.java:178)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:104)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:86)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:73)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:332)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:86)
        at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:93)
        at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:546)
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
        at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:80)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:121)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:108)
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:192)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:354)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:143)
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:345)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
        at org.jruby.ir.interpreter.Interpreter.INTERPRET_BLOCK(Interpreter.java:116)
        at org.jruby.runtime.MixedModeIRBlockBody.commonYieldPath(MixedModeIRBlockBody.java:137)
        at org.jruby.runtime.IRBlockBody.yieldSpecific(IRBlockBody.java:70)
        at org.jruby.runtime.Block.yieldSpecific(Block.java:153)
        at org.jruby.ir.runtime.IRRuntimeHelpers.yieldSpecific(IRRuntimeHelpers.java:503)
        at org.jruby.ir.instructions.YieldInstr.interpret(YieldInstr.java:76)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.processOtherOp(StartupInterpreterEngine.java:178)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:104)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:86)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:73)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:332)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:86)
        at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:93)
        at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:546)
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
        at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:80)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:121)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:108)
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:192)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:354)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:143)
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:345)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
        at org.jruby.ir.interpreter.Interpreter.INTERPRET_ROOT(Interpreter.java:96)
        at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:81)
        at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:30)
        at org.jruby.ir.IRTranslator.execute(IRTranslator.java:42)
        at org.jruby.Ruby.runInterpreter(Ruby.java:1218)
        at org.jruby.Ruby.loadFile(Ruby.java:2785)
        at org.jruby.runtime.load.LibrarySearcher$ResourceLibrary.load(LibrarySearcher.java:234)
        at org.jruby.runtime.load.LibrarySearcher$FoundLibrary.load(LibrarySearcher.java:34)
        at org.jruby.runtime.load.LoadService.load(LoadService.java:343)
        at org.jruby.RubyKernel.loadCommon(RubyKernel.java:1039)
        at org.jruby.RubyKernel.load(RubyKernel.java:1009)
        at org.jruby.RubyKernel$INVOKER$s$load.call(RubyKernel$INVOKER$s$load.gen)
        at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:417)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:375)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:174)
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:316)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
        at org.jruby.ir.interpreter.Interpreter.INTERPRET_ROOT(Interpreter.java:96)
        at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:81)
        at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:30)
        at org.jruby.ir.IRTranslator.execute(IRTranslator.java:42)
        at org.jruby.Ruby.runInterpreter(Ruby.java:1218)
        at org.jruby.Ruby.loadFile(Ruby.java:2785)
        at org.jruby.runtime.load.LibrarySearcher$ResourceLibrary.load(LibrarySearcher.java:234)
        at org.jruby.runtime.load.LibrarySearcher$FoundLibrary.load(LibrarySearcher.java:34)
        at org.jruby.runtime.load.LoadService.load(LoadService.java:343)
        at org.jruby.RubyKernel.loadCommon(RubyKernel.java:1039)
        at org.jruby.RubyKernel.load(RubyKernel.java:1009)
        at org.jruby.RubyKernel$INVOKER$s$load.call(RubyKernel$INVOKER$s$load.gen)
        at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:417)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:375)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:174)
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:316)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:86)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:73)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:332)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:86)
        at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:549)
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
        at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:80)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:121)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:108)
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:192)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:354)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:143)
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:345)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:86)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:73)
        at org.jruby.RubyClass.finvokeWithRefinements(RubyClass.java:514)
        at org.jruby.RubyBasicObject.send(RubyBasicObject.java:1755)
        at org.jruby.RubyBasicObject$INVOKER$i$send.call(RubyBasicObject$INVOKER$i$send.gen)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:332)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:86)
        at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:549)
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:86)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:73)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:332)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:86)
        at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:549)
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
        at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:92)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:191)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:178)
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:208)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:396)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:205)
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:325)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:86)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:73)
        at org.jruby.ir.runtime.IRRuntimeHelpers.unresolvedSuper(IRRuntimeHelpers.java:1206)
        at org.jruby.ir.instructions.ClassSuperInstr.interpret(ClassSuperInstr.java:86)
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:86)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:73)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:332)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:86)
        at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:549)
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:86)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:73)
        at org.jruby.ir.runtime.IRRuntimeHelpers.unresolvedSuper(IRRuntimeHelpers.java:1206)
        at org.jruby.ir.instructions.ClassSuperInstr.interpret(ClassSuperInstr.java:86)
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
        at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:92)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:191)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:178)
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:208)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:396)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:205)
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:325)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
        at org.jruby.ir.interpreter.Interpreter.INTERPRET_BLOCK(Interpreter.java:116)
        at org.jruby.runtime.MixedModeIRBlockBody.commonYieldPath(MixedModeIRBlockBody.java:137)
        at org.jruby.runtime.IRBlockBody.yieldSpecific(IRBlockBody.java:70)
        at org.jruby.runtime.Block.yieldSpecific(Block.java:153)
        at org.jruby.ir.runtime.IRRuntimeHelpers.yieldSpecific(IRRuntimeHelpers.java:503)
        at org.jruby.ir.instructions.YieldInstr.interpret(YieldInstr.java:76)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.processOtherOp(StartupInterpreterEngine.java:178)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:104)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:86)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:73)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:332)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:86)
        at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:93)
        at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:546)
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
        at org.jruby.ir.interpreter.Interpreter.INTERPRET_ROOT(Interpreter.java:96)
        at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:81)
        at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:30)
        at org.jruby.ir.IRTranslator.execute(IRTranslator.java:42)
        at org.jruby.Ruby.runInterpreter(Ruby.java:1218)
        at org.jruby.Ruby.loadFile(Ruby.java:2785)
        at org.jruby.runtime.load.LibrarySearcher$ResourceLibrary.load(LibrarySearcher.java:234)
        at org.jruby.runtime.load.LibrarySearcher$FoundLibrary.load(LibrarySearcher.java:34)
        at org.jruby.runtime.load.LoadService.load(LoadService.java:343)
        at org.jruby.RubyKernel.loadCommon(RubyKernel.java:1039)
        at org.jruby.RubyKernel.load(RubyKernel.java:1009)
        at org.jruby.RubyKernel$INVOKER$s$load.call(RubyKernel$INVOKER$s$load.gen)
        at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:417)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:375)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:174)
        at home.web.$_dot_rvm.rubies.jruby_minus_9_dot_2_dot_14_dot_0.bin.bundle.invokeOther8:load(/home/web/.rvm/rubies/jruby-9.2.14.0/bin/bundle:23)
        at home.web.$_dot_rvm.rubies.jruby_minus_9_dot_2_dot_14_dot_0.bin.bundle.RUBY$script(/home/web/.rvm/rubies/jruby-9.2.14.0/bin/bundle:23)
        at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:710)
        at org.jruby.ir.Compiler$1.load(Compiler.java:89)
        at org.jruby.Ruby.runScript(Ruby.java:1205)
        at org.jruby.Ruby.runNormally(Ruby.java:1128)
        at org.jruby.Ruby.runNormally(Ruby.java:1146)
        at org.jruby.Ruby.runFromMain(Ruby.java:958)
        at org.jruby.Main.doRunFromMain(Main.java:400)
        at org.jruby.Main.internalRun(Main.java:292)
        at org.jruby.Main.run(Main.java:234)
        at org.jruby.Main.main(Main.java:206)

** END NESTED EXCEPTION **
dr-itz commented 3 years ago

Hmm...we already ship v8.0.17 of jdbc-mysql. My guess is that this hasn't been updated for you because activerecord-jdbc-adapter allows a wide range of versions as dependency.

Can you check which version bundle actually uses? It might be necessary to be more specific in your Gemfile like this:

gem 'jdbc-mysql', '~> 8.0.17', platforms: [:jruby]
mohamedhafez commented 3 years ago

When I tried adding that to my Gemfile, I got this error:

Bundler could not find compatible versions for gem "jdbc-mysql":
  In Gemfile:
    jdbc-mysql (~> 8.0.17) java

activerecord-jdbcmysql-adapter (= 60.3) java was resolved to 60.3, which
depends on
      jdbc-mysql (~> 5.1.36, < 9) universal-java-11

Note the ~> 5.1.36 requirement limits jdbc-mysql to the 5.1.* series. Perhaps > was intended instead of ~>?

EDIT: the above was for activerecord-jdbcmysql-adapter version 60.3, but version 61.0 also has the same jdbc-mysql (~> 5.1.36, < 9) requirement

dr-itz commented 3 years ago

Ouch...yes that's wrong and needs fixing (MR in #1083)

Meanwhile, you can change you Gemfile a bit as you don't really need activerecord-jdbcmysql-adapter. For most part it's just:

require 'arjdbc'
require 'arjdbc/mysql'

So basically, as long as you have adapter: mysql and not adapter: jdbcmysql, the following should work due to auto-loading tricks. (At least it does for me with the postgresql adapter)

gem 'activerecord-jdbc-adapter', '~> 60.3', platforms: [:jruby]
gem 'jdbc-mysql', '~> 8.0.17', platforms: [:jruby]

it will lazy-load the arjdbc/mysql, but that should be fine. Otherwise just add the require 'arjdbc/mysql' at the end of boot.rb.

enebo commented 3 years ago

This has been fixed for 52.x, 60.x, and 61.x from #1083 and we have new releases.