We're updating the issue view to help you get more done. 

Classloading for Custom Authorization Extension Prematurely Deletes Classpath in Standalone

Description

In CDAP [StandaloneMain|https://github.com/cdapio/cdap/blob/d69fc4b0eb0691156e515343e0fa87e72e409471/cdap-standalone/src/main/java/io/cdap/cdap/StandaloneMain.java], the AuthorizerInstantiator unpacks the custom authorization extension JAR file into a folder in `data/tmp`. However, the AuthorizerInstantiator is actually created in the constructor for StandaloneMain, and then cleanupTempDir() is called in startup(). This causes the unpacked JAR files to be deleted immediately after instantiation.

ClassLoaders generally perform lazy loading, which means that if an authorization extension attempts to load a class after this runtime classpath is deleted, it will throw a ClassNotFoundException.

Release Notes

Fixed bug in StandaloneMain which prematurely deletes the Authorizer classpath directories.

Activity

Show:
Igor Strupinskiy
August 26, 2020, 5:59 PM

This could very well be what I'm experiencing in 

Dennis Li
August 26, 2020, 7:25 PM
Dennis Li
August 27, 2020, 5:37 PM

Assignee

Trishka Fernandes

Reporter

Dennis Li

Labels

None

Docs Impact

None

UX Impact

None

Components

Fix versions

Affects versions

Priority

Minor
Configure