将pulsarRPA的源码clone到本地(windows11,jdk11,maven3.6.3)和虚拟机(centos7,jdk19,maven3.9.2)中。
按照readme中将其作为REST服务启动:
从源代码构建
git clone https://github.com/platonai/pulsar.git
cd pulsar && bin/build-run.sh
,但是报以下错误:
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'pulsarSystemController': Unsatisfied dependency expressed through field 'privacyManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'privacyManager' defined in URL [jar:file:/opt/apache-maven-3.9.2/maven-repo/ai/platon/pulsar/pulsar-beans/1.10.23-SNAPSHOT/pulsar-beans-1.10.23-SNAPSHOT.jar!/pulsar-beans/plugins/protocol-context.xml]: Cannot resolve reference to bean 'proxyPoolManager' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'proxyPoolManager' defined in URL [jar:file:/opt/apache-maven-3.9.2/maven-repo/ai/platon/pulsar/pulsar-beans/1.10.23-SNAPSHOT/pulsar-beans-1.10.23-SNAPSHOT.jar!/pulsar-beans/proxy-context.xml]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [ai.platon.pulsar.common.proxy.ProxyPoolManager]: Factory method 'get' threw exception; nested exception is java.util.NoSuchElementException: Array contains no element matching the predicate.
然后在windows上的虚拟机中也运行REST服务,爆出一样的错误,debug到clazz.constructors.first{it.parameters.size==2},再执行一步,控制台出现上述问题。
private fun computeIfAbsent(conf: ImmutableConfig): ProxyPoolManager {
synchronized(ProxyPoolManagerFactory::class) {
val clazz = getClass(conf)
return proxyPoolManagers.computeIfAbsent(clazz.name) {
clazz.constructors.first { it.parameters.size == 2 }.newInstance(proxyPool, conf) as ProxyPoolManager
}
}
}
请问是为什么?是需要什么配置吗?