LiangliangSui commented on issue #1763:
URL: https://github.com/apache/fury/issues/1763#issuecomment-2264434641

   Hi @davidnadeau , from the backtrce, should be that `classLoaderLocal.get()` 
got the null `ClassLoader`
   
   ```java
   // org.apache.fury.pool.FuryPooledObjectFactory
   public ClassLoaderFuryPooled getPooledCache() {
     try {
       ClassLoader classLoader = classLoaderLocal.get();
       ClassLoaderFuryPooled classLoaderFuryPooled =
           classLoaderFuryPooledCache.getIfPresent(classLoader);
       if (classLoaderFuryPooled == null) {
         // double check cache
         return getOrAddCache(classLoader);
       }
       return classLoaderFuryPooled;
     } catch (Exception e) {
       LOG.error(e.getMessage(), e);
       throw new RuntimeException(e);
     }
   }
   ```
   
   The `ClassLoader` obtained from the `classLoaderLocal` initialization 
function is null
   ```java
   // org.apache.fury.pool.FuryPooledObjectFactory
   private final ThreadLocal<ClassLoader> classLoaderLocal =
         ThreadLocal.withInitial(() -> 
Thread.currentThread().getContextClassLoader());
   ```
   
   `Thread#getContextClassLoader` seems to be a focus of analysis.


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to