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
因为没有指定要加载的配置文件
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
我也遇到了
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即可。
兄弟,具体咋说
登录 后才可以发表评论