dangdangdotcom / dubbox

Dubbox now means Dubbo eXtensions, and it adds features like RESTful remoting, Kyro/FST serialization, etc to the Dubbo service framework.
http://dangdangdotcom.github.io/dubbox
Apache License 2.0
4.89k stars 2.06k forks source link

maven 集成测试 对jdk的要求 #150

Open nbqyqx opened 8 years ago

nbqyqx commented 8 years ago

hi, 如果要编译并测试dubbox,需要什么版本的jdk? 目前运行结果如下: 都报错的测试: com.alibaba.dubbo.registry.redis.RedisRegistryTest

jdk6报错: com.alibaba.dubbo.container.jetty.JettyContainerTest com.alibaba.dubbo.rpc.protocol.hessian.HessianProtocolTest

jdk8报错: com.alibaba.dubbo.rpc.cluster.merger.ResultMergerTest com.alibaba.dubbo.rpc.cluster.support.MergeableClusterInvokerTest com.alibaba.dubbo.rpc.cluster.router.condition.ConditionRouterTest com.alibaba.dubbo.config.spring.ConfigTest com.alibaba.dubbo.common.serialize.serialization.DubboSerializationTest com.alibaba.dubbo.common.serialize.SerializationCompareTest com.alibaba.dubbo.common.serialize.dubbo.BuilderTest com.alibaba.dubbo.registry.dubbo.RegistryDirectoryTest

Neal Hu

nbqyqx commented 8 years ago

有什么跟进吗?

lvpingWoo commented 8 years ago

没有你说的这个问题。 8的JDK,按7的级别编译。 结果全部成功: [INFO] Reactor Summary: [INFO] [INFO] dubbo-parent ...................................... SUCCESS [2.712s] [INFO] Hessian Lite(Alibaba embed version) ............... SUCCESS [2.127s] [INFO] dubbo-common ...................................... SUCCESS [0.468s] [INFO] dubbo-container ................................... SUCCESS [0.006s] [INFO] dubbo-container-api ............................... SUCCESS [0.108s] [INFO] dubbo-container-spring ............................ SUCCESS [0.109s] [INFO] dubbo-container-javaconfig ........................ SUCCESS [0.037s] [INFO] dubbo-container-jetty ............................. SUCCESS [0.056s] [INFO] dubbo-container-log4j ............................. SUCCESS [0.026s] [INFO] dubbo-container-logback ........................... SUCCESS [0.055s] [INFO] dubbo-remoting .................................... SUCCESS [0.004s] [INFO] dubbo-remoting-api ................................ SUCCESS [0.147s] [INFO] dubbo-remoting-netty .............................. SUCCESS [0.066s] [INFO] dubbo-remoting-mina ............................... SUCCESS [0.053s] [INFO] dubbo-remoting-grizzly ............................ SUCCESS [0.087s] [INFO] dubbo-remoting-p2p ................................ SUCCESS [0.050s] [INFO] dubbo-remoting-http ............................... SUCCESS [0.065s] [INFO] dubbo-remoting-zookeeper .......................... SUCCESS [0.130s] [INFO] dubbo-rpc ......................................... SUCCESS [0.004s] [INFO] dubbo-rpc-api ..................................... SUCCESS [0.111s] [INFO] dubbo-rpc-default ................................. SUCCESS [0.070s] [INFO] dubbo-rpc-injvm ................................... SUCCESS [0.026s] [INFO] dubbo-rpc-rmi ..................................... SUCCESS [0.037s] [INFO] dubbo-rpc-hessian ................................. SUCCESS [0.148s] [INFO] dubbo-rpc-http .................................... SUCCESS [0.043s] [INFO] dubbo-rpc-webservice .............................. SUCCESS [0.247s] [INFO] dubbo-cluster ..................................... SUCCESS [0.121s] [INFO] dubbo-registry .................................... SUCCESS [0.004s] [INFO] dubbo-registry-api ................................ SUCCESS [0.050s] [INFO] dubbo-monitor ..................................... SUCCESS [0.004s] [INFO] dubbo-monitor-api ................................. SUCCESS [0.049s] [INFO] dubbo-filter ...................................... SUCCESS [0.005s] [INFO] dubbo-filter-validation ........................... SUCCESS [0.052s] [INFO] dubbo-filter-cache ................................ SUCCESS [0.047s] [INFO] dubbo-registry-default ............................ SUCCESS [0.033s] [INFO] dubbo-monitor-default ............................. SUCCESS [0.029s] [INFO] dubbo-registry-multicast .......................... SUCCESS [0.026s] [INFO] dubbo-config ...................................... SUCCESS [0.003s] [INFO] dubbo-config-api .................................. SUCCESS [0.086s] [INFO] dubbo-config-spring ............................... SUCCESS [0.051s] [INFO] dubbo-rpc-thrift .................................. SUCCESS [0.086s] [INFO] dubbo-rpc-memcached ............................... SUCCESS [0.033s] [INFO] dubbo-rpc-redis ................................... SUCCESS [0.034s] [INFO] dubbo-rpc-rest .................................... SUCCESS [0.190s] [INFO] dubbo-registry-zookeeper .......................... SUCCESS [0.028s] [INFO] dubbo-registry-redis .............................. SUCCESS [0.024s] [INFO] dubbo ............................................. SUCCESS [1.979s] [INFO] dubbo-simple ...................................... SUCCESS [0.004s] [INFO] dubbo-registry-simple ............................. SUCCESS [3.447s] [INFO] dubbo-monitor-simple .............................. SUCCESS [4.136s] [INFO] dubbo-admin ....................................... SUCCESS [4.307s] [INFO] dubbo-demo ........................................ SUCCESS [0.002s] [INFO] dubbo-demo-api .................................... SUCCESS [0.087s] [INFO] dubbo-demo-provider ............................... SUCCESS [1.329s] [INFO] dubbo-demo-consumer ............................... SUCCESS [5.238s] [INFO] dubbo-test ........................................ SUCCESS [0.003s] [INFO] dubbo-test-benchmark .............................. SUCCESS [2.346s] [INFO] dubbo-test-compatibility .......................... SUCCESS [0.011s] [INFO] dubbo-test-integration ............................ SUCCESS [0.016s] [INFO] dubbo-test-examples ............................... SUCCESS [0.364s] [INFO] dubbo-test-benchmark-api .......................... SUCCESS [0.032s] [INFO] dubbo-test-benchmark-server ....................... SUCCESS [4.929s] [INFO] dubbo-test-benchmark-client ....................... SUCCESS [4.944s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 43.430s [INFO] Finished at: Thu Jun 23 13:01:40 CST 2016

nbqyqx commented 8 years ago

hi lvping,

只是编译是没有问题的。测试有错。 你是说 mvn install -Dmaven.compiler.source=1.7 -Dmaven.compiler.target=1.7 吗? 我测试到dubbo-common模块时报错。 java.lang.RuntimeException: java.io.IOException: invalid constant type: 18

我的java版本: java version "1.8.0_77" Java(TM) SE Runtime Environment (build 1.8.0_77-b03) Java HotSpot(TM) 64-Bit Server VM (build 25.77-b03, mixed mode) Maven版本: Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-11T00:41:47+08:00) Maven home: /usr/local/Cellar/maven/3.3.9/libexec Java version: 1.8.0_77, vendor: Oracle Corporation Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_77.jdk/Contents/Home/jre Default locale: zh_CN, platform encoding: UTF-8 OS name: "mac os x", version: "10.11.4", arch: "x86_64", family: "mac"

Thanks~

cxfly commented 8 years ago

我本地也是过了,在jdk6/jdk7/jdk8上编译都没有问题. 主要是单元测试不通过,有很多失败的用例. jdk8上javassist报错,看样子当前的javassist版本跟jdk版本兼容导致的,这个问题很严重,需要升下javassist版本. testBuilder_MyMap(com.alibaba.dubbo.common.serialize.dubbo.BuilderTest) Time elapsed: 0 sec <<< ERROR! java.lang.RuntimeException: java.io.IOException: invalid constant type: 18 at javassist.bytecode.ConstPool.readOne(ConstPool.java:1113) at javassist.bytecode.ConstPool.read(ConstPool.java:1056) at javassist.bytecode.ConstPool.(ConstPool.java:150) at javassist.bytecode.ClassFile.read(ClassFile.java:765) at javassist.bytecode.ClassFile.(ClassFile.java:109) at javassist.CtClassType.getClassFile2(CtClassType.java:191) at javassist.compiler.MemberResolver.lookupMethod(MemberResolver.java:111) at javassist.compiler.MemberResolver.lookupMethod(MemberResolver.java:97) at javassist.compiler.TypeChecker.atMethodCallCore(TypeChecker.java:711) at javassist.compiler.TypeChecker.atCallExpr(TypeChecker.java:688) at javassist.compiler.JvstTypeChecker.atCallExpr(JvstTypeChecker.java:157)