问题描述
当我安装 jar 时,eclipse 应用程序(尤其是 knime)有哪些“无法创建”类的方法。该类似乎没有任何问题,因为它在 eclipse 中使用 run as tool 运行。当我导出为插件或创建更新站点时,最终的插件失败了。类文件位于此错误代码段下方。
*** 欢迎使用 KNIME 分析平台 v4.3.2.v202103051236 *** *** 瑞士苏黎世 KNIME AG 版权所有 ***
无法创建来自插件“org.knime.examples.numberformatter”的错误 RepositoryManager 节点“org.knime.examples.numberformatter.NumberFormatterNodeFactory”。无法激活对应的插件包!
package org.knime.examples.numberformatter;
import org.knime.core.node.NodeDialogPane;
import org.knime.core.node.NodeFactory;
import org.knime.core.node.NodeView;
/**
* This is an example implementation of the node factory of the
* "NumberFormatterNode".
*
* The node factory creates all classes the make up a node. Furthermore,it specifies if the
* node has views or a dialog (both are optional).
*
* @author KNIME GmbH,Konstanz,Germany
*/
public class NumberFormatterNodeFactory extends NodeFactory<NumberFormatterNodeModel> {
/**
* {@inheritDoc}
*/
@Override
public NumberFormatterNodeModel createNodeModel() {
// Create and return a new node model.
return new NumberFormatterNodeModel();
}
/**
* {@inheritDoc}
*/
@Override
public int getNrNodeViews() {
// The number of views the node should have,in this cases there is none.
return 0;
}
/**
* {@inheritDoc}
*/
@Override
public NodeView<NumberFormatterNodeModel> createNodeView(final int viewIndex,final NumberFormatterNodeModel nodeModel) {
// We return null as this example node does not provide a view. Also see "getNrNodeViews()".
return null;
}
/**
* {@inheritDoc}
*/
@Override
public boolean hasDialog() {
// Indication whether the node has a dialog or not.
return true;
}
/**
* {@inheritDoc}
*/
@Override
public NodeDialogPane createNodeDialogPane() {
// This example node has a dialog,hence we create and return it here. Also see "hasDialog()".
return new NumberFormatterNodeDialog();
}
}
解决方法
解决了。目标项目jre需要匹配knime jre版本。