[
https://issues.apache.org/jira/browse/HBASE-28864?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17884021#comment-17884021
]
Nihal Jain edited comment on HBASE-28864 at 9/23/24 7:45 PM:
-------------------------------------------------------------
By any chance do we have a conflicting jruby coming into classpath or a irb
installation which is older? Also did you try below in hbase-shell?
{code:java}
hbase:001:0> JRUBY_VERSION
=> "9.4.8.0"
hbase:002:0> RUBY_VERSION
=> "3.1.4"
hbase:003:0> irb_info
=>
Ruby version: 3.1.4
IRB version: irb 1.4.2 (2022-10-03)
InputMethod: ReidlineInputMethod with Reline 0.4.2
.irbrc path: /usr/local/rvm/rubies/ruby-3.3.4/.irbrc
RUBY_PLATFORM: java
LANG env: C.UTF-8
East Asian Ambiguous Width: 1 {code}
BTW we have been using HBASE-28250 on branch-2.6 with hadoop 3.3.6 + JDK17 in
our internal fork. All works well there.
Also I just pulled the change for HBASE-28250 to branch-2.5 and built code with
command "mvn clean install -DskipTests -Dhadoop-three.version=3.3.6
-Dhadoop.profile=3.0 assembly:single" with JDK8. Could not reproduce.
For debugging: you may want to look at service load sequence for jruby. Just
add flag -Djruby.debug.loadService=true in java run args in last 2nd line of
bin/hbase and open shell. See patch
[https://github.com/NihalJain/hbase/commit/2913899b2c65a958fcd9c73d841a00cda53dc8b1]
for reference.
You would want to make sure irb is getting loaded and from the expected
location i.e. our jar.
{code:java}
2024-09-23T19:35:19.414Z [main] INFO LoadService : trying fileResource:
uri:classloader:/lib/irb.rb
2024-09-23T19:35:19.415Z [main] INFO LoadService : trying fileResource:
uri:classloader:/META-INF/jruby.home/lib/ruby/3.1/site_ruby/irb.rb
2024-09-23T19:35:19.416Z [main] INFO LoadService : trying fileResource:
uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/irb.rb
2024-09-23T19:35:19.426Z [main] INFO LoadService : found fileResource:
org.jruby.util.URLResource{uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/irb.rb}
{code}
was (Author: nihaljain.cs):
By any chance do we have a conflicting jruby coming into classpath or a irb
installation which is older? Also did you try below in hbase-shell?
{code:java}
hbase:001:0> JRUBY_VERSION
=> "9.4.8.0"
hbase:002:0> RUBY_VERSION
=> "3.1.4"
hbase:003:0> irb_info
=>
Ruby version: 3.1.4
IRB version: irb 1.4.2 (2022-10-03)
InputMethod: ReidlineInputMethod with Reline 0.4.2
.irbrc path: /usr/local/rvm/rubies/ruby-3.3.4/.irbrc
RUBY_PLATFORM: java
LANG env: C.UTF-8
East Asian Ambiguous Width: 1 {code}
BTW we have been using HBASE-28250 on branch-2.6 with hadoop 3.3.6 + JDK17 in
our internal fork. All works well there.
Also I jsut pulled the change for HBASE-28250 to branch-2.5 and built code with
command "mvn clean install -DskipTests -Dhadoop-three.version=3.3.6
-Dhadoop.profile=3.0 assembly:single" with JDK8. Could not reproduce.
For debugging: you may want to look at service load sequence for jruby. Just
add flag -Djruby.debug.loadService=true in java run args in last 2nd line of
bin/hbase and open shell. See patch
[https://github.com/NihalJain/hbase/commit/2913899b2c65a958fcd9c73d841a00cda53dc8b1]
for reference.
You would want to make sure irb is getting loaded and from the expected
location i.e. our jar.
{code:java}
2024-09-23T19:35:19.414Z [main] INFO LoadService : trying fileResource:
uri:classloader:/lib/irb.rb
2024-09-23T19:35:19.415Z [main] INFO LoadService : trying fileResource:
uri:classloader:/META-INF/jruby.home/lib/ruby/3.1/site_ruby/irb.rb
2024-09-23T19:35:19.416Z [main] INFO LoadService : trying fileResource:
uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/irb.rb
2024-09-23T19:35:19.426Z [main] INFO LoadService : found fileResource:
org.jruby.util.URLResource{uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/irb.rb}
{code}
> NoMethodError undefined method assignment_expression?
> -----------------------------------------------------
>
> Key: HBASE-28864
> URL: https://issues.apache.org/jira/browse/HBASE-28864
> Project: HBase
> Issue Type: Bug
> Components: shell
> Affects Versions: 3.0.0-beta-1, 4.0.0-alpha-1, 2.7.0
> Reporter: Andrew Kyle Purtell
> Assignee: Andrew Kyle Purtell
> Priority: Minor
> Labels: pull-request-available
> Fix For: 4.0.0-alpha-1, 2.7.0, 3.0.0-beta-2
>
>
> After HBASE-28250 Bump jruby to 9.4.8.0 to fix snakeyaml CVE after every
> command the message "NoMethodError undefined method assignment_expression?"
> is printed.
> This is called from code copied from
> https://github.com/ruby/irb/blob/v1.4.2/lib/irb.rb . The fix is to also copy
> over the definition of `assignment_expression`.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)