Support Questions

Find answers, ask questions, and share your expertise

Custom processor: IOUtils cannot be resolved

avatar
Contributor

Hello,

Please kindly help to resolve this error.

I am trying to learn how to create a Nifi custom processor following this tutorial:

https://help.syncfusion.com/data-integration/how-to/create-a-custom-processor#_Project_Creation%22%2...

 

But i don't know the class to import to solve the below error:

IMG-20220726-WA0013.jpg

Below are all the imports i have on the file

import org.apache.nifi.components.PropertyDescriptor;
import org.apache.nifi.flowfile.FlowFile;
import org.apache.nifi.annotation.behavior.ReadsAttribute;
import org.apache.nifi.annotation.behavior.ReadsAttributes;
import org.apache.nifi.annotation.behavior.WritesAttribute;
import org.apache.nifi.annotation.behavior.WritesAttributes;
import org.apache.nifi.annotation.lifecycle.OnScheduled;
import org.apache.nifi.annotation.documentation.CapabilityDescription;
import org.apache.nifi.annotation.documentation.SeeAlso;
import org.apache.nifi.annotation.documentation.Tags;
import org.apache.nifi.processor.AbstractProcessor;
import org.apache.nifi.processor.ProcessContext;
import org.apache.nifi.processor.ProcessSession;
import org.apache.nifi.processor.ProcessorInitializationContext;
import org.apache.nifi.processor.Relationship;
import org.apache.nifi.processor.util.StandardValidators;

 

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import org.apache.nifi.processor.io.StreamCallback;
import org.apache.nifi.processor.exception.ProcessException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

 

 

Thanks for your kind help

1 ACCEPTED SOLUTION

avatar
Contributor

Thanks everyone.

I have solved the problem by including dependency on the pom.xml files of nifi-custom-processors & nifi-custom-nar. The dependency is like this.

<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.11.0</version>
</dependency>

View solution in original post

1 REPLY 1

avatar
Contributor

Thanks everyone.

I have solved the problem by including dependency on the pom.xml files of nifi-custom-processors & nifi-custom-nar. The dependency is like this.

<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.11.0</version>
</dependency>