Skip to content
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

Issue in catalog upload in Kaui 3.0.10 #418

Open
reshmabidikar opened this issue Nov 15, 2024 · 1 comment
Open

Issue in catalog upload in Kaui 3.0.10 #418

reshmabidikar opened this issue Nov 15, 2024 · 1 comment
Assignees
Labels

Comments

@reshmabidikar
Copy link
Contributor

Catalog upload fails with Kaui 3.0.10.

Steps to reproduce:'

  1. Log in to Kaui
  2. Click on the x button in the Catalog Show tab to delete any existing catalog
  3. Click on the + sign in the Catalog Show tab
  4. Click on the Enable Advanced Configuration(Upload XML) link
  5. Click on Choose file and select a valid XML catalog
  6. Click on the Upload button.

Upload fails. The following error is displayed in the logs:

2024-11-15T04:27:11,745+0000 lvl='ERROR', log='rack', th='http-nio-9090-exec-3', xff='', rId='', tok='', aRId='', tRId='', error app failed to handle exception: java.lang.invoke.WrongMethodTypeException: expected (RubyString,ByteList,int)int but found (ByteList,int)int
org.jruby.exceptions.NoMethodError: (NoMethodError) undefined method `bytesize' for Rack::Utils:Module
	at RUBY.call(uri:classloader:/jruby/rack/error_app/show_status.rb:30)
	at org.jruby.rack.ext.Servlet.call(org/jruby/rack/ext/Servlet.java:86)
2024-11-15T04:27:11,745+0000 lvl='ERROR', log='rack', th='http-nio-9090-exec-3', xff='', rId='', tok='', aRId='', tRId='', error app failed to handle exception: java.lang.invoke.WrongMethodTypeException: expected (RubyString,ByteList,int)int but found (ByteList,int)int
org.jruby.exceptions.NoMethodError: (NoMethodError) undefined method `bytesize' for Rack::Utils:Module
	at RUBY.call(uri:classloader:/jruby/rack/error_app/show_status.rb:30)
	at org.jruby.rack.ext.Servlet.call(org/jruby/rack/ext/Servlet.java:86)
@tungleduyxyz tungleduyxyz self-assigned this Nov 17, 2024
@tungleduyxyz
Copy link
Contributor

This issue related to jruby-rack version.
◦ jruby-rack 1.2.2: It likely relies on the Rack::Utils.bytesize method, which was present in older Rack versions.
◦ rack 2.x: Starting with Rack 2.0, the bytesize method was deprecated.
-> So, the issue arises because jruby-rack expects bytesize to be available in Rack::Utils, but it’s no longer present in Rack 2.2.10.
I see they had a fix here but did not release yet: jruby/jruby-rack#252
-> Solution, I made a monkey-patch to bring back bytesize method, this is temporary solution until the release the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants