Title: Issue with arrow-c JNI and GraalVM 25 · Issue #866 · apache/arrow-java · GitHub
Open Graph Title: Issue with arrow-c JNI and GraalVM 25 · Issue #866 · apache/arrow-java
X Title: Issue with arrow-c JNI and GraalVM 25 · Issue #866 · apache/arrow-java
Description: Describe the enhancement requested I'm aware that graalvm is probably not supported, but I'm raising this as it might be simple fix. There is a issue with env->FindClass in arrow-c when used with graalvm 25 (native image creates a shared...
Open Graph Description: Describe the enhancement requested I'm aware that graalvm is probably not supported, but I'm raising this as it might be simple fix. There is a issue with env->FindClass in arrow-c when used with g...
X Description: Describe the enhancement requested I'm aware that graalvm is probably not supported, but I'm raising this as it might be simple fix. There is a issue with env->FindClass in arrow-c when ...
Opengraph URL: https://github.com/apache/arrow-java/issues/866
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Issue with arrow-c JNI and GraalVM 25","articleBody":"### Describe the enhancement requested\n\nI'm aware that graalvm is probably not supported, but I'm raising this as it might be simple fix.\n\nThere is a issue with `env-\u003eFindClass` in arrow-c when used with graalvm 25 (native image creates a shared library) Even all required classes are exposed for JNI in graalvm configuration `env-\u003eFindClass` wont be able to find a classes at\n\nhttps://github.com/apache/arrow-java/blob/34060eb491a870f5ede5d30e007060b8310dc64f/c/src/main/cpp/jni_wrapper.cc#L60\n\nThe issues are at:\n\nhttps://github.com/apache/arrow-java/blob/34060eb491a870f5ede5d30e007060b8310dc64f/c/src/main/cpp/jni_wrapper.cc#L334-L342\n\nwhere class names have `L` and `;` at the start and end of the class name, so changing class names from `Ljava/lang/Object;` to `java/lang/Object` (and all other classes) will make problem go away.\n\n```java\nkObjectClass = CreateGlobalClassReference(env, \"java/lang/Object\");\nkRuntimeExceptionClass =\n CreateGlobalClassReference(env, \"java/lang/RuntimeException\");\nkPrivateDataClass =\n CreateGlobalClassReference(env, \"org/apache/arrow/c/jni/PrivateData\");\nkCDataExceptionClass =\n CreateGlobalClassReference(env, \"org/apache/arrow/c/jni/CDataJniException\");\nkStreamPrivateDataClass = CreateGlobalClassReference(\n env, \"org/apache/arrow/c/ArrayStreamExporter$ExportedArrayStreamPrivateData\");\n```\n\nlooking at the spec, \n\n- https://docs.oracle.com/en/java/javase/11/docs/specs/jni/functions.html#findclass\n- https://docs.oracle.com/en/java/javase/21/docs/specs/jni/functions.html#findclass\n\nit says correct format is without `L` and ';' for non array classes.\n\nI did manage to fix this in `18.1` which could be built locally, unfortunately I can't make `18.3` run locally as instructions at https://arrow.apache.org/docs/developers/java/building.html are outdated with change to new repo \n\nalso, one small request, can \n\nhttps://github.com/apache/arrow-java/blob/34060eb491a870f5ede5d30e007060b8310dc64f/c/src/main/cpp/jni_wrapper.cc#L330-L331\n\nreturn error returned by `vm-\u003eGetEnv` rather than `JNI_ERR`","author":{"url":"https://github.com/milenkovicm","@type":"Person","name":"milenkovicm"},"datePublished":"2025-10-02T09:04:19.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/866/arrow-java/issues/866"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:079eb6ba-36df-c481-f7a4-160bd9dc5d48 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D658:1779BB:1767013:1FD5488:6A5090FF |
| html-safe-nonce | 7b8259fc58506af8cae1bf434cdce7ecee9a340f2b22ec99db6c9c0932ce560c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENjU4OjE3NzlCQjoxNzY3MDEzOjFGRDU0ODg6NkE1MDkwRkYiLCJ2aXNpdG9yX2lkIjoiMjMzMzc1Nzk3MDU0OTA4NDQxNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 1d84875412f4e34a0119da8be6b146fbf4614ee408b234edfaf2fa618fa4a003 |
| hovercard-subject-tag | issue:3476704735 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/apache/arrow-java/866/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a35bc6d7e25ad84d8d518de88aef309a54cbcd5efd27a9d39d71f775d7ef7790/apache/arrow-java/issues/866 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a35bc6d7e25ad84d8d518de88aef309a54cbcd5efd27a9d39d71f775d7ef7790/apache/arrow-java/issues/866 |
| og:image:alt | Describe the enhancement requested I'm aware that graalvm is probably not supported, but I'm raising this as it might be simple fix. There is a issue with env->FindClass in arrow-c when used with g... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | milenkovicm |
| hostname | github.com |
| expected-hostname | github.com |
| None | d6dc8294eb500fa36bbc57472d61fe87c522f9c3c1d64f70f4926f66a66a7efb |
| turbo-cache-control | no-preview |
| go-import | github.com/apache/arrow-java git https://github.com/apache/arrow-java.git |
| octolytics-dimension-user_id | 47359 |
| octolytics-dimension-user_login | apache |
| octolytics-dimension-repository_id | 893682219 |
| octolytics-dimension-repository_nwo | apache/arrow-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 893682219 |
| octolytics-dimension-repository_network_root_nwo | apache/arrow-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7ac0ad2f2c7e4b9056617355fd9e33e22b0c8df9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width