-
-
Notifications
You must be signed in to change notification settings - Fork 925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rails no longer runs on Tomcat #4716
Comments
Not convinced #4717 is the same issue, as that seems to be specific to 9.1.12. I have gone back through jruby-jars versions, and I get the same issue with 9.1.9, 9.1,10, 9.1.11. It does work with 9.1.8 (and presumably earlier versions). |
Sorry, I miss read it, and thought it was an issue with 9.1.12. |
Could it be related to #4734 ? |
@HarlemSquirrel I don't think so; this appears to be an character-encoding problem. |
Ok, so basic cause here is that we've got an internal encoding (the default encoding used for symbols and strings in memory) that can't be associated with a Java Charset needed to convert back and forth to Java strings. But instead of reporting the name of the encoding, it's passing a null charset to String.getBytes, which also does no null check and then blows up. I tried to simulate this with an encoding Java doesn't support, ISO-8859-14, but we get a different error. # encoding: ISO-8859-14
puts :ø.encoding
This is the same path as in the reported exception, but before it passes the null it gets an error from Java indicating the encoding is not supported. So the path causing the reported issue must be from an encoding that we don't even try to associate with a Charset. I'm looking into it. |
Ok, that got me closer. We do not associate at least the Windows-125* encodings with any Java charset, so they just return null. I'm discussing possible fixes and improvements to this logic with @enebo now. |
The fix is looking ok but had some failures. I'm looking into it. |
Ok I think the fix is fine but updating jcodings is not a good idea for a 9.1.x release. jcodings has had numerous changes to support Ruby 2.4 features, some of which are slightly incompatible with JRuby 9.1.x's logic. I will instead do the same fix as a workaround in 9.1.13. |
This is equivalent to fixes made for #4716 in jcodings 1.0.25, but other changes in that version made it too risky to upgrade in JRuby 9.1.x. The code here wraps jcodings with the appropriate logic rather than updating.
im getting the same issue here
Caused by: java.lang.NullPointerException |
somebody can help me ? i have an emergency looking for a quick solution. |
Facing same issue with jruby-complete-9.1.12.0 Reverted back to jruby-complete-9.1.8.0 and it working fine. |
what did you do? can you help me ? im working with jruby 9.1.8.0 and i have the same issue |
I am having problems getting JRuby 9.1.12 to run my Rails project. I was previously on 9.1.2, and that works fine. All I have done is updated JRuby, and now it fails, so my suspicion is a bug in JRuby.
To investigate, I created a test project, first using JRuby 9.1.2:
Location is a table in an existing database, so quicker for testing. I deleted the migration, copied across database.yml from my project, and edited secret.yml so it uses the same key as the tests. Then:
Then I put the .war into Tomcat and it works fine. So then JRuby 9.1.12:
I stop Tomcat, delete the old files, and put this new war in. Now I see this when going to a page in testy:
I have Googled the error, but found nothing. I am using Java 1.8.0.131 (32 bit), Tomcat 8.0.45 (32 bit), Warbler 2.0.4 on Windows 7 Pro.
Here are the gems from gemfile.lock in case something there is awry:
The text was updated successfully, but these errors were encountered: