appengine-plugins
appengine-plugins copied to clipboard
ClassNotFoundException when JVM tearing down
Probably for the same reason as https://github.com/GoogleContainerTools/jib/issues/2016. I think this clean-up hook never really worked.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 47.699 s
[INFO] Finished at: 2020-01-03T21:23:12+05:30
[INFO] Final Memory: 12M/153M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.google.cloud.tools:appengine-maven-plugin:2.2.0:run (default-cli) on project helloworld: Execution default-cli of goal com.google.cloud.tools:appengine-maven-plugin:2.2.0:run failed: com.google.cloud.tools.managedcloudsdk.command.CommandExitException: Process failed with exit code: 1 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
Exception in thread "Thread-1" java.lang.NoClassDefFoundError: com/google/common/io/RecursiveDeleteOption
at com.google.cloud.tools.managedcloudsdk.components.WindowsBundledPythonCopier.deleteCopiedPython(WindowsBundledPythonCopier.java:82)
at com.google.cloud.tools.managedcloudsdk.components.WindowsBundledPythonCopier.lambda$copyPython$0(WindowsBundledPythonCopier.java:58)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: com.google.common.io.RecursiveDeleteOption
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
... 3 more
I noticed that there is a similar problem at https://github.com/GoogleContainerTools/jib. Perhaps we can refer to this issue to find more context about the bug. Or maybe this can help us find the faulty lines and we can also refer to the fix for the bug?
Yes, I'm pretty sure it's the same issue. The shutdown hook doesn't work as I originally expected.
https://github.com/GoogleCloudPlatform/appengine-plugins-core/blob/a2aaa0bea3df8a0720e6fad9886337c90f49b090/src/main/java/com/google/cloud/tools/managedcloudsdk/components/WindowsBundledPythonCopier.java#L57-L59
https://github.com/GoogleCloudPlatform/appengine-plugins-core/blob/a2aaa0bea3df8a0720e6fad9886337c90f49b090/src/main/java/com/google/cloud/tools/managedcloudsdk/components/WindowsBundledPythonCopier.java#L75-L87
close as not planned
This stack trace has been spotted in the wild again, on a windows build in GoogleCloudPlatform/app-maven-plugin#480?. I wonder if referencing RecursiveDeleteOption.ALLOW_INSECURE
in WindowsBundledPythonCopier
in a class field, or anywhere else that runs before JVM shutdown, might be an easy workaround.
If not, then a similar solution as in Jib applies.
hmm, @elefeint I think you meant app-maven-plugin#480?
Updated, thanks!
@craigmit the error is about deleting temporary local files on your laptop. It has nothing to do with any online files or apps.
@craigmit the error is about deleting temporary local files on your laptop. It has nothing to do with any online files or apps.
Ah, thanks. I misunderstood. Post deleted. Cheers.