On uploading: `Exception in thread "Thread-5" java.lang.NullPointerException: Cannot invoke "String.length()" because "s" is null`
还没有人认领这个 Issue。
评估
调研方向
从 MediaFileUtils.uploadFile 第 349 行开始,跟踪请求进入 ApiConnection.getQueryString 第 588 行;stack trace 显示 null 值到达了 URL 编码过程。使用报告中的 OpenRefine 3.9.3 和 CommonsExtension 0.1.3 配置复现 Commons 上传,然后确定缺少哪个上传输入,并验证该失败会被处理或阻止。
由索引模型根据 Issue 内容生成。
描述
Exception in thread "Thread-5" java.lang.NullPointerException: Cannot invoke "String.length()" because "s" is null
at java.base/java.net.URLEncoder.encode(URLEncoder.java:223)
at java.base/java.net.URLEncoder.encode(URLEncoder.java:194)
at org.wikidata.wdtk.wikibaseapi.ApiConnection.getQueryString(ApiConnection.java:588)
at org.wikidata.wdtk.wikibaseapi.ApiConnection.sendRequest(ApiConnection.java:434)
at org.wikidata.wdtk.wikibaseapi.ApiConnection.sendJsonRequest(ApiConnection.java:399)
at org.openrefine.wikibase.editing.MediaFileUtils.uploadFile(MediaFileUtils.java:349)
at org.openrefine.wikibase.editing.MediaFileUtils.uploadRemoteFile(MediaFileUtils.java:254)
at org.openrefine.wikibase.updates.MediaInfoEdit.uploadFile(MediaInfoEdit.java:288)
at org.openrefine.wikibase.editing.EditBatchProcessor.performEdit(EditBatchProcessor.java:232)
at org.openrefine.wikibase.operations.PerformWikibaseEditsOperation$PerformEditsProcess.run(PerformWikibaseEditsOperation.java:334)
at java.base/java.lang.Thread.run(Thread.java:1583)
OpenRefine 3.9.3
CommonsExtension 0.1.3
java --version
openjdk 21.0.6 2025-01-21 LTS
OpenJDK Runtime Environment Temurin-21.0.6+7 (build 21.0.6+7-LTS)
OpenJDK 64-Bit Server VM Temurin-21.0.6+7 (build 21.0.6+7-LTS, mixed mode, sharing)
Maybe this is because my schema is invalid? Is it a correct way to upload changes back to Commons?
- 主要语言
- Java
- 星标
- 30
- 派生
- 12
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
OpenRefine/CommonsExtension 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 30/100
OpenRefine/CommonsExtension#175 ·
-
难度 4/5 3-5 天 新手友好度 35/100
OpenRefine/CommonsExtension#159 ·
-
难度 4/5 3-5 天 新手友好度 38/100
OpenRefine/CommonsExtension#141 · 1 条评论 ·
-
难度 5/5 一周以上 新手友好度 35/100
OpenRefine/CommonsExtension#138 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 38/100
OpenRefine/CommonsExtension#132 ·
查看 OpenRefine/CommonsExtension 的全部 Issue
相似的 Issue
-
[Bug] DefaultSerializationExceptionWrapper does not implement Cleanable, so cleanup() is never invoked by codecs可能已有人在做 @binbin0325 今天认领。 未关闭component/need-triage type/need-triage
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
2026 Error Report
难度 2/5 1-3 小时 新手友好度 68/100
triplea-game/triplea#15096 ·
维护者通常 1 天内回复
-
[Bug][API] Switching workflow versions leaves schedules online可能已有人在做 @zhuangchong 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
apache/dolphinscheduler#18731 ·
维护者通常 1 天内回复
-
Implement JDBC Domain Enums (`SqlCategory`, `SqlExecutionStatus`, `SqlExecutionType`) in Core Module未关闭core-module enhancement good first issue
难度 1/5 1-3 小时 新手友好度 87/100
sdlc-pro/spring-lens#531 ·
维护者通常 1 天内回复