jarredhj0214 opened a new issue, #12014:
URL: https://github.com/apache/gravitino/issues/12014

   ### Version
   
   main branch
   
   ### Describe what's wrong
   
   When generated Java code is compiled or resolved inside Gravitino's isolated 
catalog classloader, simple names from `java.lang`, such as `Override`, may be 
requested directly from the classloader.
   
   `IsolatedClassLoader` currently treats names without a package as normal 
class names and fails to resolve them as `java.lang` classes. This can break 
codegen-based libraries that rely on the context classloader, such as Janino 
usage triggered by generated-code paths.
   
   ### Error message and/or stacktrace
   
   The generated-code path may fail with `ClassNotFoundException` for simple 
`java.lang` names, for example:
   
   ```text
   ClassNotFoundException: Class not found Override
   ```
   
   ### How to reproduce
   
   Use a catalog/library path that performs Java code generation under 
Gravitino's isolated classloader and asks the context classloader to resolve 
simple `java.lang` annotation names.
   
   A minimal reproduction is loading `Override` through `IsolatedClassLoader`:
   
   ```java
   classLoader.withClassLoader(cl -> cl.loadClass("Override"));
   ```
   
   Before the fix this fails; after the fix it resolves to `java.lang.Override`.
   
   ### Additional context
   
   This is a compatibility issue in `IsolatedClassLoader` class resolution. The 
fix should not declare support for a new Paimon version; it only makes the 
isolated classloader correctly handle simple `java.lang` names used by 
generated-code / Janino paths.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to