Summary
I'm trying to use activerecord-jdbc-adapter with JRuby 10 (Java 21), but encountering a runtime error when loading the gem.
It appears to be related to changes in JRuby internals (WeakMap), which may not yet be supported by the adapter.
Environment
- JRuby: 10.x
- Java: OpenJDK 21
- Rails: 7.2
- activerecord-jdbc-adapter: ~> 70.0
- activerecord-oracle_enhanced-adapter: 7.2.0 (from GitHub)
Error
Steps to Reproduce
- Use JRuby 10 with JDK 21
- Add the following to Gemfile:
platforms :jruby do
gem 'activerecord-oracle_enhanced-adapter', '7.2.0', git: 'https://github.com/rsim/oracle-enhanced.git', tag: 'v7.2.0'
gem 'activerecord-jdbc-adapter', '~> 72.0'
end
Run:
bundle install
rails c
Expected Behavior
The adapter should load correctly and allow establishing a JDBC connection.
Actual Behavior
The application fails to boot due to a WeakMap-related error.
Additional Context
JRuby 10 requires Java 21, so support for this combination would be valuable going forward.
This may be related to internal changes in JRuby’s object space implementation.
Request
Is there any plan to support JRuby 10 / Java 21?
Thanks for maintaining this project 🙏
Summary
I'm trying to use
activerecord-jdbc-adapterwith JRuby 10 (Java 21), but encountering a runtime error when loading the gem.It appears to be related to changes in JRuby internals (WeakMap), which may not yet be supported by the adapter.
Environment
Error
Steps to Reproduce
Run:
bundle install
rails c
Expected Behavior
The adapter should load correctly and allow establishing a JDBC connection.
Actual Behavior
The application fails to boot due to a WeakMap-related error.
Additional Context
JRuby 10 requires Java 21, so support for this combination would be valuable going forward.
This may be related to internal changes in JRuby’s object space implementation.
Request
Is there any plan to support JRuby 10 / Java 21?
Thanks for maintaining this project 🙏