milleruntime opened a new issue #1976:
URL: https://github.com/apache/accumulo/issues/1976


   **Describe the bug**
   Context classloader fails to load class from the shell.
   
   **Versions (OS, Maven, Java, and others, as appropriate):**
    - Affected version(s) of this project: 2.1
   
   **To Reproduce**
   Follow the instructions for the classpath example: 
https://github.com/apache/accumulo-examples/blob/main/docs/classpath.md
   
   **Expected behavior**
   The filter should be loaded by the shell for the iterator specified.
   
   **Additional context**
   The shell reports:
   `2021-03-25T15:55:23,854 [shell.Shell] ERROR: 
org.apache.accumulo.shell.ShellCommandException: Command could not be 
initialized (Unable to load org.apache.accumulo.test.FooFilter; class not 
found.)`
   
   The tserver log is aware of the context and the jar in HDFS but doesn't 
report any errors:
   <pre>
   2021-03-26T08:17:23,999 [vfs.ContextManager] DEBUG: ClassLoader not created 
for context cx1, creating new one. uris: 
hdfs://localhost:8020/user1/lib/FooFilter.jar, preDelegation: true
   2021-03-26T08:17:24,002 [vfs.AccumuloVFSClassLoader] DEBUG: Resolving path 
element: hdfs://localhost:8020/user1/lib/FooFilter.jar
   2021-03-26T08:17:24,063 [vfs.AccumuloReloadingVFSClassLoader] DEBUG: 
monitoring hdfs://localhost:8020/user1/lib/FooFilter.jar
   2021-03-26T08:17:24,064 [vfs.ContextManager] DEBUG: Returning classloader  
for context cx1
   2021-03-26T08:18:05,043 [vfs.ContextManager] DEBUG: Managed Contexts: 
{cx1=org.apache.accumulo.start.classloader.vfs.ContextManager$Context@55348174}
   2021-03-26T08:18:05,043 [vfs.ContextManager] DEBUG: Configured Contexts: 
[cx1]
   </pre>
   The original bug in the examples repo is here: 
https://github.com/apache/accumulo-examples/issues/66
   
   I believe the changes to deprecate the VFS classloader may have broke the 
expected behavior. This was done in: 
https://github.com/apache/accumulo/pull/1715
   


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

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


Reply via email to