webankblockchain / webase-collect-bee Goto Github PK
View Code? Open in Web Editor NEW目前本项目处于维护模式,新特性和新功能请移步:https://github.com/WeBankBlockchain/Data-Export
License: Apache License 2.0
目前本项目处于维护模式,新特性和新功能请移步:https://github.com/WeBankBlockchain/Data-Export
License: Apache License 2.0
目前连接国密节点需要手动修改java代码,建议提取到配置文件中
contractMapsInfo构建methodIdMap 采用ABI中函数methodId作为key,value为对应的函数。
当多个合约存在同名函数时,同名函数的methodId是相同的,导致methodIdMap后构建出错。
WeBASE-Collect-Bee v1.3.2版本,存在异常情况:
合约函数如下:
function updateTable(string memory tableName, string memory key, string memory value) public {
TableFactory tf = TableFactory(0x1001);
Table table = tf.openTable(tableName);
( , string memory _value ) = selectTable(tableName, key);
Entry entry = table.newEntry();
require( keccak256(_value) != keccak256(value), "value is same");
entry.set("value", value);
Condition condition = table.newCondition();
int count = table.update(key, entry, condition);
emit UpdateTable(count);
}
触发 require( keccak256(_value) != keccak256(value), "value is same");的异常交易,将无法导出到数据库,会报异常,异常记录如下:
2020-09-04 14:31:27.936 ERROR 27674 --- [taskExecutor-4] .a.i.SimpleAsyncUncaughtExceptionHandler : Unexpected exception occurred invoking async method: public void com.webank.webasebee.core.service.BlockAsyncService.handleSingleBlock(org.fisco.bcos.web3j.protocol.core.methods.response.BcosBlock$Block,long)
java.lang.UnsupportedOperationException: Unable to create instance of org.fisco.bcos.web3j.abi.datatypes.generated.Int256
at org.fisco.bcos.web3j.abi.TypeDecoder.decodeNumeric(TypeDecoder.java:88) ~[web3sdk-2.4.2.jar!/:na]
at org.fisco.bcos.web3j.abi.TypeDecoder.decode(TypeDecoder.java:41) ~[web3sdk-2.4.2.jar!/:na]
at org.fisco.bcos.web3j.abi.FunctionReturnDecoder.build(FunctionReturnDecoder.java:109) ~[web3sdk-2.4.2.jar!/:na]
at org.fisco.bcos.web3j.abi.FunctionReturnDecoder.decode(FunctionReturnDecoder.java:36) ~[web3sdk-2.4.2.jar!/:na]
at com.webank.webasebee.parser.generated.crawler.method.UserControllerUpdateTableMethodCrawlerImpl.transactionHandler(UserControllerUpdateTableMethodCrawlerImpl.java:74) ~[WeBASE-Collect-Bee-WeBASE-Collect-Bee-parser1.3.1.jar!/:na]
at com.webank.webasebee.parser.handler.MethodCrawlerHandler.crawl(MethodCrawlerHandler.java:109) ~[WeBASE-Collect-Bee-WeBASE-Collect-Bee-parser1.3.1.jar!/:na]
at com.webank.webasebee.parser.facade.ParseFacade.parse(ParseFacade.java:60) ~[WeBASE-Collect-Bee-WeBASE-Collect-Bee-parser1.3.1.jar!/:na]
at com.webank.webasebee.core.service.BlockCrawlService.parse(BlockCrawlService.java:64) ~[classes!/:na]
at com.webank.webasebee.core.service.BlockDepotService.process(BlockDepotService.java:93) ~[classes!/:na]
at com.webank.webasebee.core.service.BlockAsyncService.handleSingleBlock(BlockAsyncService.java:40) ~[classes!/:na]
at com.webank.webasebee.core.service.BlockAsyncService$$FastClassBySpringCGLIB$$80ad7e0.invoke() ~[classes!/:na]
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) ~[spring-core-5.2.7.RELEASE.jar!/:5.2.7.RELEASE]
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:771) ~[spring-aop-5.2.7.RELEASE.jar!/:5.2.7.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-5.2.7.RELEASE.jar!/:5.2.7.RELEASE]
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749) ~[spring-aop-5.2.7.RELEASE.jar!/:5.2.7.RELEASE]
at org.springframework.aop.interceptor.AsyncExecutionInterceptor.lambda$invoke$0(AsyncExecutionInterceptor.java:115) ~[spring-aop-5.2.7.RELEASE.jar!/:5.2.7.RELEASE]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_265]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_265]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_265]
at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_265]
Caused by: java.lang.reflect.InvocationTargetException: null
at sun.reflect.GeneratedConstructorAccessor110.newInstance(Unknown Source) ~[na:na]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_265]
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_265]
at org.fisco.bcos.web3j.abi.TypeDecoder.decodeNumeric(TypeDecoder.java:79) ~[web3sdk-2.4.2.jar!/:na]
... 19 common frames omitted
Caused by: java.lang.UnsupportedOperationException: Bitsize must be 8 bit aligned, and in range 0 < bitSize <= 256, and in valid range.
at org.fisco.bcos.web3j.abi.datatypes.IntType.(IntType.java:11) ~[web3sdk-2.4.2.jar!/:na]
at org.fisco.bcos.web3j.abi.datatypes.Int.(Int.java:34) ~[web3sdk-2.4.2.jar!/:na]
at org.fisco.bcos.web3j.abi.datatypes.generated.Int256.(Int256.java:18) ~[web3sdk-2.4.2.jar!/:na]
... 23 common frames omitted
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.