You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2022/03/09 06:25:10 UTC

[GitHub] [accumulo] ctubbsii commented on issue #2555: Issue upgrading to surefire version M5

ctubbsii commented on issue #2555:
URL: https://github.com/apache/accumulo/issues/2555#issuecomment-1062594002


   I don't know about ShellServerIT, but I looked into RowHashIT, and ended up filing a bug upstream at [SUREFIRE-2035](https://issues.apache.org/jira/browse/SUREFIRE-2035) with an explanation of why I think this is happening.
   
   RowHashIT launches a new process using `RowHash.main()` and the current test's class path. Here's the stack trace in the launched process that shows it is unable to find the classes that are in the main jar artifact for this module... something that should definitely be available on the test class path:
   
   ```java
   [main] WARN  org.apache.accumulo.start.classloader.AccumuloClassLoader [] - 'general.classpaths' is deprecated but was set to '/home/christopher/git/apache/accumulo/accumulo/hadoop-mapreduce/target/mini-tests/org.apache.accumulo.hadoop.its.mapreduce.RowHashIT_test/lib/[^.].*[.]jar' 
   [org.apache.accumulo.hadoop.its.mapreduce.RowHashIT$RowHash] ERROR org.apache.accumulo.start.Main [] - Thread 'org.apache.accumulo.hadoop.its.mapreduce.RowHashIT$RowHash' died.
   java.lang.NoClassDefFoundError: org/apache/accumulo/hadoopImpl/mapreduce/lib/MapReduceClientOpts       
     at java.lang.ClassLoader.defineClass1(Native Method) ~[?:?]                                          
     at java.lang.ClassLoader.defineClass(ClassLoader.java:1017) ~[?:?]                                   
     at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174) ~[?:?]                    
     at jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:800) ~[?:?]            
     at jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:698) ~[?:?]
     at jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:621) ~[?:?]        
     at jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:579) ~[?:?]              
     at jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) ~[?:?]           
     at java.lang.ClassLoader.loadClass(ClassLoader.java:522) ~[?:?]                                      
     at org.apache.accumulo.hadoop.its.mapreduce.RowHashIT$RowHash.run(RowHashIT.java:145) ~[test-classes/:?]
     at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76) ~[hadoop-client-api-3.3.0.jar:?]        
     at org.apache.accumulo.hadoop.its.mapreduce.RowHashIT$RowHash.main(RowHashIT.java:172) ~[test-classes/:?]
     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]                       
     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]  
     at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
     at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]                                           
     at org.apache.accumulo.start.Main.lambda$execMainClass$1(Main.java:163) ~[accumulo-start-2.1.0-SNAPSHOT.jar:2.1.0-SNAPSHOT]
     at java.lang.Thread.run(Thread.java:829) ~[?:?]                                                      
   Caused by: java.lang.ClassNotFoundException: org.apache.accumulo.hadoopImpl.mapreduce.lib.MapReduceClientOpts
     at jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581) ~[?:?]              
     at jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) ~[?:?]           
     at java.lang.ClassLoader.loadClass(ClassLoader.java:522) ~[?:?]                                      
     ... 18 more   
   ```
   
   I set up a few strategic `System.err.println(System.getProperty("java.class.path"));` lines and was able to confirm that `accumulo-hadoop-mapreduce-2.1.0-SNAPSHOT.jar` is on the class path for 3.0.0-M4, but not for 3.0.0-M5. I have no idea why, or even how the tests still work without the main jar on the class path. I think maven-failsafe-plugin is doing something funny with its own class loader to filter out the main jar artifact for the module and provide those classes through its own class loader... or something crazy like that.


-- 
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: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org