我在创建 Nifi 处理器类的实例时收到 ExceptionInIntializer 错误(代码如下)。在线查看后,该错误是由于静态初始化程序中存在错误而导致的,而我的类中没有该错误。我的代码中是否还有其他内容可能导致此错误?
import ApplicationProperties;
import IndexAttributesUtil;
import ConvertRecordUtil;
import EntityTypeUpdates;
import ViewTypeUtil;
import QueryHelper;
import MServiceLocator;
public class RepProcessor extends AbstractProcessor {
protected final Logger logger = LoggerFactory.getLogger(RepProcessor.class);
private static final ApplicationProperties applicationProperties = new ApplicationProperties();
protected static final PropertyDescriptor HOST = new PropertyDescriptor.Builder().name("Hostname")
.description("").required(true)
.defaultValue(applicationProperties.getHost()).addValidator(StandardValidators.NON_EMPTY_VALIDATOR).build();
protected static final PropertyDescriptor PORT = new PropertyDescriptor.Builder().name("Port")
.description("").required(true).defaultValue(applicationProperties.getPort())
.addValidator(StandardValidators.NON_EMPTY_VALIDATOR).build();
protected static final PropertyDescriptor TIMEOUT = new PropertyDescriptor.Builder().name("Timeout")
.description("").required(true)
.defaultValue(Integer.toString(applicationProperties.getTimeout()))
.addValidator(StandardValidators.NON_EMPTY_VALIDATOR).build();
protected static final PropertyDescriptor MAIN_VIEW = new PropertyDescriptor.Builder().name("Main View")
.description("").required(true).addValidator(StandardValidators.NON_EMPTY_VALIDATOR).build();
protected static final PropertyDescriptor SUB_VIEW = new PropertyDescriptor.Builder().name("Sub-View")
.description("").required(false)
.addValidator(StandardValidators.NON_EMPTY_VALIDATOR).build();
我正在我的测试类中创建该处理器的实例:
噜噜哒
相关分类