Redirecting output of terminal application causes null errors
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 22/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 领域
- build-system
调研方向
The failure is a LoadError for META-INF/main raised from kernel_require.rb inside the jruby-stdlib jar, so start with how Warbler builds and launches the jar's main entry. Reproduce on Windows cmd or PowerShell with java -jar myapp.jar --args > out, comparing against the same run without redirection. Done means the redirected run starts cleanly on Windows, or the limitation is documented with a clear cause.
由索引模型根据 Issue 内容生成。
描述
I have a ruby app i've written that runs on the commandline. It works perfectly when running via jruby -S
jruby -S bin/myapp --args > outputfile
However when run via java via warbler
java -jar myapp.jar --args -vv > out
It dies with
LoadError: load error: META-INF/main -- java.lang.NullPointerException: null
require at org/jruby/RubyKernel.java:1083
require at jar:file:/C:/Users/BEAU~1.TRE/AppData/Local/Temp/jruby912549673603083274extract/jruby-stdlib- complete-1.7.9
.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55
(root) at <script>:3
error: org.jruby.embed.EvalFailedException: (LoadError) load error: META-INF/main -- java.lang.NullPointerException: null
Whats unique is that this only happens when trying to redirect stdout or stderr.
java -jar myapp.jar --args -vv
Works perfectly.
Also dropping the -vv flags (which sets rubys built-in logger to DEBUG level) also works fine eg.
java -jar myapp.jar --args > output.csv
Even more specific is that this is windows cmd/powershell only. When run from a cgywin environment it works perfectly.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
- 主要语言
- Ruby
- 星标
- 901
- 派生
- 206
- 平均合并
- 1 天 10 小时
- 30 天内合并 PR
- 3
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
jruby/warbler 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 35/100
-
难度 4/5 一周以上 新手友好度 25/100
-
难度 4/5 3-5 天 新手友好度 22/100
-
难度 5/5 一周以上 新手友好度 12/100
-
难度 5/5 一周以上 新手友好度 12/100
相似的 Issue
-
[Bug] Chatwoot v4.19.0 – Super Admin returns 500 due to missing superadmin.scss Vite manifest entry未关闭Bug
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 2 天内回复
-
难度 1/5 1 小时以内 新手友好度 84/100
-
难度 2/5 1-3 小时 新手友好度 65/100
-
internal
难度 2/5 1-3 小时 新手友好度 70/100
Kong/developer.konghq.com#7716 ·
维护者通常 1 天内回复
-
maintenance
难度 2/5 1-3 小时 新手友好度 74/100
geeksforsocialchange/PlaceCal#3676 ·
维护者通常 1 天内回复