Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WeIdentity java sdk3.1.0-rc.1集成到Spring应用报错 #385

Open
hongfish opened this issue Oct 9, 2023 · 0 comments
Open

WeIdentity java sdk3.1.0-rc.1集成到Spring应用报错 #385

hongfish opened this issue Oct 9, 2023 · 0 comments

Comments

@hongfish
Copy link

hongfish commented Oct 9, 2023

创建一份错误报告需要您填写以下内容:

概述

在spring boot项目中集成weIdentity java sdk,启动项目报错
<dependency> <groupId>com.webank</groupId> <artifactId>weid-java-sdk</artifactId> <version>3.1.0-rc.1</version> <exclusions> <exclusion> <groupId>org.fisco-bcos.java-sdk</groupId> <artifactId>fisco-bcos-java-sdk</artifactId> </exclusion> </exclusions> </dependency>

image

报错:
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.webank.weid.service.rpc.AuthorityIssuerService]: Factory method 'authorityIssuerService' threw exception; nested exception is java.lang.NoClassDefFoundError: org/fisco/bcos/sdk/transaction/codec/decode/TransactionDecoderService
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.3.1.jar:5.3.1]
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:651) ~[spring-beans-5.3.1.jar:5.3.1]
... 46 common frames omitted
Caused by: java.lang.NoClassDefFoundError: org/fisco/bcos/sdk/transaction/codec/decode/TransactionDecoderService
at com.webank.weid.blockchain.service.fisco.engine.fiscov2.DataBucketServiceFiscoEngineV2.(DataBucketServiceFiscoEngineV2.java:41) ~[weid-blockchain-3.1.0-rc.1.jar:na]
at com.webank.weid.blockchain.service.fisco.engine.EngineFactoryFisco.createDataBucketServiceEngine(EngineFactoryFisco.java:106) ~[weid-blockchain-3.1.0-rc.1.jar:na]
at com.webank.weid.blockchain.service.fisco.BaseServiceFisco.getBucket(BaseServiceFisco.java:69) ~[weid-blockchain-3.1.0-rc.1.jar:na]
at com.webank.weid.blockchain.service.fisco.BaseServiceFisco.getAddress(BaseServiceFisco.java:210) ~[weid-blockchain-3.1.0-rc.1.jar:na]
at com.webank.weid.blockchain.service.fisco.BaseServiceFisco.reloadAddress(BaseServiceFisco.java:191) ~[weid-blockchain-3.1.0-rc.1.jar:na]
at com.webank.weid.blockchain.service.impl.AbstractService.(AbstractService.java:19) ~[weid-blockchain-3.1.0-rc.1.jar:na]
at com.webank.weid.service.impl.WeIdServiceImpl.getWeIdService(WeIdServiceImpl.java:65) ~[weid-java-sdk-3.1.0-rc.1.jar:na]
at com.webank.weid.service.impl.WeIdServiceImpl.(WeIdServiceImpl.java:56) ~[weid-java-sdk-3.1.0-rc.1.jar:na]
at com.webank.weid.service.impl.AuthorityIssuerServiceImpl.(AuthorityIssuerServiceImpl.java:43) ~[weid-java-sdk-3.1.0-rc.1.jar:na]
at com.hucais.config.WeIdConfig.authorityIssuerService(WeIdConfig.java:28) ~[classes/:na]
at com.hucais.config.WeIdConfig$$EnhancerBySpringCGLIB$$ac1b40f3.CGLIB$authorityIssuerService$1() ~[classes/:na]
at com.hucais.config.WeIdConfig$$EnhancerBySpringCGLIB$$ac1b40f3$$FastClassBySpringCGLIB$$364b73ea.invoke() ~[classes/:na]
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244) ~[spring-core-5.3.1.jar:5.3.1]
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331) ~[spring-context-5.3.1.jar:5.3.1]
at com.hucais.config.WeIdConfig$$EnhancerBySpringCGLIB$$ac1b40f3.authorityIssuerService() ~[classes/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_181]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_181]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_181]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_181]
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.3.1.jar:5.3.1]
... 47 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.fisco.bcos.sdk.transaction.codec.decode.TransactionDecoderService
at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_181]
at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_181]
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) ~[na:1.8.0_181]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_181]
... 67 common frames omitted

复现

将weid-java-sdk导包到spring boot项目中,new AuthorityIssuerServiceImpl()。

期望结果与实际结果

解决java.lang.ClassNotFoundException: org.fisco.bcos.sdk.transaction.codec.decode.TransactionDecoderService这个错误

环境

  • 区块链类型(FISCO-BCOS,Fabric,Ethereum):
  • 区块链版本及网络: 2.9.0
  • WeIdentity-Build-Tools版本:v3.1.1-rc.1
  • WeIdentity版本:

其他内容

配置文件

  • WeIdentity: 请上传所有位于 /src/main/resources/ 目录下的文件。

image

日志文件

  • FISCO-BCOS: 请上传区块链节点 /log/ 目录下的文件。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant