1 Star 30 Fork 25

DevX / hyperledger-fabric-app-java-demo

 / 详情

服务跑起来报错

待办的
创建于  
2022-03-27 04:37

ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'catContractController' defined in file [G:\hyperledger-fabric-app-java-demo\target\classes\org\hepeng\hyperledgerfabric\app\javademo\CatContractController.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'gateway' defined in class path resource [org/hepeng/hyperledgerfabric/app/javademo/HyperLedgerFabricGatewayConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.hyperledger.fabric.client.Gateway]: Factory method 'gateway' threw exception; nested exception is java.lang.NullPointerException

评论 (23)

Ekko 创建了任务
Ekko 修改了描述
展开全部操作日志

因为没有指定要加载的配置文件

什么意思啊,是上下文指定配置还是属性配置文件?

老哥能说的再详细一点嘛,需要修改哪部分呢

老哥你解决了嘛

我知道咋解决了,将fabric.tlsCertPath,fabric.privateKeyPathfabric.certificatePath的路径的sr/resource换成BOOT-INF/classes(jar包解压后的路径,每个人的可能不同)

遇到了相同的问题 还尚未解决

兄弟,报错解决了吗

现在解决了吗,兄弟们。我也遇到这个问题了

兄弟,解决了吗?同问题 :sob:

解决了吗兄弟

我也遇到了

aused by: java.lang.IllegalStateException: Could not find TLS ALPN provider; no working netty-tcnative, Conscrypt, or Jetty NPN/ALPN available
	at io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts.defaultSslProvider(GrpcSslContexts.java:233) ~[grpc-netty-shaded-1.30.2.jar!/:1.30.2]
	at io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts.configure(GrpcSslContexts.java:144) ~[grpc-netty-shaded-1.30.2.jar!/:1.30.2]
	at io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts.forClient(GrpcSslContexts.java:93) ~[grpc-netty-shaded-1.30.2.jar!/:1.30.2]

有人能解决不?

这个我弄好了,加个威信讨论下?

你微信多少呀,同错误

遇到这个错误怎么解决老哥
Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'catContractController' defined in URL [jar:file:/usr/local/FuChuang.jar!/BOOT-INF/classes!/com/fc/controller/CatContractController.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'gateway' defined in class path resource [com/fc/config/HyperLedgerFabricGatewayJavaConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.hyperledger.fabric.client.Gateway]: Factory method 'gateway' threw exception; nested exception is java.nio.file.NoSuchFileException: src/main/resources/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/signcerts/User1@org1.example.com-cert.pem

上面的错误问题,把配置文件改为application.properties即可。

把application-prod-network-org1.properties的名字改成那个就可以启动了

登录 后才可以发表评论

状态
负责人
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
参与者(12)
1119197 hanzhi code 1714103311 8512110 ekko98yydt 1648336221
1
https://gitee.com/kernelHP/hyperledger-fabric-app-java-demo.git
git@gitee.com:kernelHP/hyperledger-fabric-app-java-demo.git
kernelHP
hyperledger-fabric-app-java-demo
hyperledger-fabric-app-java-demo

搜索帮助