[ 
https://issues.apache.org/jira/browse/NIFI-7676?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pierre Villard resolved NIFI-7676.
----------------------------------
    Resolution: Feedback Received

Apache NiFi 1.x is no longer maintained and no new release is planned on the 
1.x release line. Marking as resolved as part of a cleanup operation. Please 
open a new one with an updated description if this is still relevant for NiFi 
2.x.

> Nifi Processor dynamicallyModifiesClasspath doesn't work
> --------------------------------------------------------
>
>                 Key: NIFI-7676
>                 URL: https://issues.apache.org/jira/browse/NIFI-7676
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Configuration
>    Affects Versions: 1.11.4
>            Reporter: Vijendra Kulhade
>            Priority: Major
>
> I am trying to pass custom jar to add in the class path for my Custom 
> Processor.
> I have used below PropertyDescriptor 
> {code:java}
> static final PropertyDescriptor ADDITIONAL_CLASSPATH_RESOURCES = new 
> PropertyDescriptor.Builder()
>         .name("Additional Classpath Resources")
>         .displayName("Additional Classpath")
>         .description("A comma-separated list of paths to files and/or 
> directories that will be added to the classpath and used for loading native 
> libraries. " +
>                 "When specifying a directory, all files with in the directory 
> will be added to the classpath, but further sub-directories will not be 
> included.")
>         .addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
>         .dynamicallyModifiesClasspath(true)
>         
> .expressionLanguageSupported(ExpressionLanguageScope.FLOWFILE_ATTRIBUTES)
>         .build();
> {code}
> Also in onTrigger trying to read get the Class like this.
> {code:java}
> Class<?> cls = 
> Thread.currentThread().getContextClassLoader().loadClass("CustomerProto");
> Method m = cls.getDeclaredMethod("getDefaultInstance");{code}
> I am getting ClassNotFoundException.
>  
> I tried referring the existing Nifi JoltTransformRecord Processor. 
> [https://github.com/apache/nifi/blob/main/nifi-nar-bundles/nifi-jolt-record-bundle/nifi-jolt-record-processors/src/main/java/org/apache/nifi/processors/jolt/record/JoltTransformRecord.java#L156]
> Tried checking the test cases for this processor
> I found that there was no positive test case for dynamicallyModifiesClasspath.
> All the test cases are ignoring the custom class. 
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to