You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JRuby version (jruby -v) and command line (flags, JRUBY_OPTS, etc)
Operating system and platform (e.g. uname -a)
jruby 9.3.3.0 (2.6.8) 2022-02-08 b26de1f5c5 OpenJDK 64-Bit Server VM 25.322-b06 on 1.8.0_322-b06 +jit [linux-x86_64] Linux name 3.10.0-1160.31.1.el7.x86_64 #1 SMP Wed May 26 20:18:08 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
unmodified https://dlcdn.apache.org/tomcat/tomcat-8/v8.5.75/bin/apache-tomcat-8.5.75.zip
unmodified rails application created with rails new minimal --minimal
rails version 6.1.1
made war file using bundle exec warble. Moved minimal.war to unmodifed tomcat installation under /webapps. curled page http://localhost:8080/minimal.
Before bundle exec warble works. One workaround has to be made 😓. jruby/warbler#508
Making working war file for tomcat needs 2 modifications to META-INF/init.rb 😓 😓
modify line ENV['RAILS_ENV'] ||= ENV_JAVA[ 'RAILS_ENV' ] || 'No value for 'env' found' to ENV['RAILS_ENV'] ||= ENV_JAVA[ 'RAILS_ENV' ] || 'production'
add line Gem.paths = ENV before line require 'bundler/shared_helpers'
Expected Behavior
Rails root page should be visible
Actual Behavior
11-Feb-2022 15:03:27.332 SEVERE [http-nio-8080-exec-6] org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for servlet [default] in context with path [/minimal] threw exception [Filter execution threw an exception] with root cause
java.lang.LinkageError: loader constraint violation: when resolving method "org.jruby.runtime.Helpers.constructRubyStringArray(Lorg/jruby/RubyString;Lorg/jruby/RubyString;Lorg/jruby/RubyString;)[Lorg/jruby/RubyString;" the class loader (instance of <bootloader>) of the current class, java/lang/Object, and the class loader (instance of org/apache/catalina/loader/ParallelWebappClassLoader) for the method's defining class, org/jruby/runtime/Helpers, have different Class objects for the type org/jruby/RubyString used in the signature
The text was updated successfully, but these errors were encountered:
Caused by: java.lang.LinkageError: loader constraint violation: when resolving method 'org.jruby.RubyString[] org.jruby.runtime.Helpers.constructRubyStringArray(org.jruby.RubyString, org.jruby.RubyString, org.jruby.RubyString)' the class loader 'bootstrap' of the current class, java/lang/Object, and the class loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @3b354d05 for the method's defining class, org/jruby/runtime/Helpers, have different Class objects for the type org/jruby/RubyString used in the signature (java.lang.Object is in module java.base of loader 'bootstrap'; org.jruby.runtime.Helpers is in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @3b354d05, parent loader java.net.URLClassLoader @9a7504c)
at java.lang.invoke.MethodHandleNatives.resolve(Native Method) ~[?:?]
at java.lang.invoke.MemberName$Factory.resolve(MemberName.java:1070) ~[?:?]
at java.lang.invoke.MemberName$Factory.resolveOrFail(MemberName.java:1098) ~[?:?]
at java.lang.invoke.MethodHandles$Lookup.resolveOrFail(MethodHandles.java:2030) ~[?:?]
at java.lang.invoke.MethodHandles$Lookup.findStatic(MethodHandles.java:1102) ~[?:?]
jruby 9.3.3.0 embedded in an osgi bundle, Java 11. The issue doesn't happen when I started the whole application. It only happens when I updated the bundle to a newer version, triggering a bundle reload, which eventually leads to this error.
Environment Information
jruby -v
) and command line (flags, JRUBY_OPTS, etc)uname -a
)jruby 9.3.3.0 (2.6.8) 2022-02-08 b26de1f5c5 OpenJDK 64-Bit Server VM 25.322-b06 on 1.8.0_322-b06 +jit [linux-x86_64]
Linux name 3.10.0-1160.31.1.el7.x86_64 #1 SMP Wed May 26 20:18:08 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
unmodified https://dlcdn.apache.org/tomcat/tomcat-8/v8.5.75/bin/apache-tomcat-8.5.75.zip
unmodified rails application created with
rails new minimal --minimal
rails version 6.1.1
made war file using
bundle exec warble
. Moved minimal.war to unmodifed tomcat installation under/webapps
. curled pagehttp://localhost:8080/minimal
.Before
bundle exec warble
works. One workaround has to be made 😓. jruby/warbler#508Making working war file for tomcat needs 2 modifications to
META-INF/init.rb
😓 😓ENV['RAILS_ENV'] ||= ENV_JAVA[ 'RAILS_ENV' ] || 'No value for 'env' found'
toENV['RAILS_ENV'] ||= ENV_JAVA[ 'RAILS_ENV' ] || 'production'
Gem.paths = ENV
before linerequire 'bundler/shared_helpers'
Expected Behavior
Rails root page should be visible
Actual Behavior
The text was updated successfully, but these errors were encountered: