从3.3更新到Corda 4.1之后,当我使用deployNodes运行节点时,出现以下错误:
public class regexTest {
public static void main(String[] args) {
String IP = "255.001.001.255";
System.out.println(IP.matches(new MyRegex().pattern));
}
}
/*
* /d - stands for any number between 0 to 9
* /d{1,2} - preceding number that 0 to 9 here , can be of 1 digit to 2 digit . so minimum 0 and maximum 99
* | this stands for or operator
*
* () this is applied on a group to get the single value of outcome
* (0|1)\d{2} = first digit is either 0 or 1 and other two digits can be any number between ( 0 to 9)
* 2[0-4]\d - first digit is 2 , second digit can be between 0 to 4 and last digit can be 0 to 9
* 25[0-5] - first two digit will be 25 and last digit will be between 0 to 5
*
* */
class MyRegex {
String zeroTo255 = "(\\d{1,2}|(0|1)\\d{2}|2[0-4]\\d|25[0-5])";
public String pattern = zeroTo255 + "\\." + zeroTo255 + "\\." + zeroTo255 + "\\." + zeroTo255;;
}
我错误输入URL时没有任何信息。
我的流程看起来像这样(我简化了代码并删除了自定义逻辑,只是存在这种情况下的重要内容
[main] internal.NodeStartupLogging.invoke - Exception during node startup: Unable to determine which flow to use when responding to: com.example.CreateDealFlow.Sender. [com.example.CreateDealFlow.Receiver, com.example.CreateDealFlow.Receiver] are all registered with equal weight. [errorCode=mnl04m, moreInformationAt=https://errors.corda.net/OS/4.1/mnl04m]
答案 0 :(得分:2)
由Andranik本人解决?
此问题是由于有3个CorDapps(workflows
,contracts
,workflows-2
)引起的。
workflows-2
取决于workflows
。为此,它使用了compile
依赖项。运行delpoyNodes
时,这是在workflows
代码中构建到workflows-2
中(又称胖子)。然后这在运行时失败,因为现在有两个CorDapps包含在workflows
中找到的流。
为解决此问题,使用了cordaCompile
。其中包括workflows
模块作为编译时依赖项,但未将其构建到jar中。运行节点后,流将从workflows
CorDapp加载并加载到类路径中,workflows-2
现在也可以访问它。