テストエラーCaused by:IllegalStateException:Shutdown in progress


テストエラーを実行するCaused by:java.lang.IllegalStateException: Shutdown in progress
テストケース作成
/**
 * Bestpay.com.cn Inc.
 * Copyright (c) 2011-2018 All Rights Reserved.
 */
package com.bestpay.{moudle}.service;

import ...;

/**
 *           
 * @author handsome-boy
 * @version Id: BenefitRateConfigManageServiceTest.java , 2018-07-12 16:43  handsome-boy Exp $
 */
public class BenefitRateConfigManageServiceTest extends BaseServiceTransactionTest {
    /**
     *           
     */
    @Resource
    private BenefitRateConfigManageService benefitRateConfigManageService;
    /**
     *           
     */
    @Resource
    private BenefitRateConfigQueryService benefitRateConfigQueryService;

    /**
     * test saveOrUpdate
     */
    @Test
    @Rollback(false)
    public void testSaveOrUpdate() {
        BenefitRateConfigRequest benefitRateConfigRequest = new BenefitRateConfigRequest();
        benefitRateConfigRequest.setInitiationID(String.valueOf(System.currentTimeMillis()));
        benefitRateConfigRequest.setProxyCode("test001");
        benefitRateConfigRequest.setProxyName("testProxyName");
        benefitRateConfigRequest.setUnionpayBenefitRate(new BigDecimal("0.55").setScale(2, BigDecimal.ROUND_HALF_DOWN));
        benefitRateConfigRequest.setProxyBenefitRate(new BigDecimal("0.55").setScale(2, BigDecimal.ROUND_HALF_DOWN));
        benefitRateConfigRequest.setCreatedBy("OTHERS");
        benefitRateConfigRequest.setUpdatedBy("Other people");
        CumResponse response = benefitRateConfigManageService.saveOrUpdate(benefitRateConfigRequest);
        Assert.assertEquals(ErrorCode.CUM_SERVICE_SUCCESS.getErrorCode(), response.getErrorCode());
    }

    /**
     * test query
     */
    @Test
    public void testQuery() {
        BenefitRateConfigQueryRequest benefitRateConfigQueryRequest = new BenefitRateConfigQueryRequest();
        benefitRateConfigQueryRequest.setInitiationID(String.valueOf(System.currentTimeMillis()));
        benefitRateConfigQueryRequest.setProxyCode("test001");
        CumResponse response = benefitRateConfigQueryService.query(benefitRateConfigQueryRequest);
        Assert.assertEquals(ErrorCode.CUM_SERVICE_SUCCESS.getErrorCode(), response.getErrorCode());
    }

}
  • 右クリックでこのテスト例を実行すると、
  • とエラーが表示されます.
    F:\soft\Java\jdk1.8.0_144\bin\java.exe -ea -XX:-UseSplitVerifier -javaagent:F:\soft\JetBrains\IntelliJIDEA20180104\lib\coverage-agent.jar=C:\Users\Administrator\AppData\Local\Temp\coverageargs -Didea.test.cyclic.buffer.size=1048576 -javaagent:F:\soft\JetBrains\IntelliJIDEA20180104\lib\idea_rt.jar=61926:F:\soft\JetBrains\IntelliJIDEA20180104\bin -Dfile.encoding=UTF-8 -classpath F:\soft\JetBrains\IntelliJIDEA20180104\lib\idea_rt.jar;F:\soft\JetBrains\IntelliJIDEA20180104\plugins\junit\lib\junit-rt.jar;F:\soft\JetBrains\IntelliJIDEA20180104\plugins\junit\lib\junit5-rt.jar;F:\soft\Java\jdk1.8.0_144\jre\lib\charsets.jar;F:\soft\Java\jdk1.8.0_144\jre\lib\deploy.jar;F:\soft\Java\jdk1.8.0_144\jre\lib\ext\access-bridge-64.jar;F:\soft\Java\jdk1.8.0_144\jre\lib\ext\cldrdata.jar;F:\soft\Java\jdk1.8.0_144\jre\lib\ext\dnsns.jar;F:\soft\Java\jdk1.8.0_144\jre\lib\ext\jaccess.jar;F:\soft\Java\jdk1.8.0_144\jre\lib\ext\jfxrt.jar;F:\soft\Java\jdk1.8.0_144\jre\lib\ext\localedata.jar;F:\soft\Java\jdk1.8.0_144\jre\lib\ext
    ashorn.jar;F:\soft\Java\jdk1.8.0_144\jre\lib\ext\sunec.jar;F:\soft\Java\jdk1.8.0_144\jre\lib\ext\sunjce_provider.jar;F:\soft\Java\jdk1.8.0_144\jre\lib\ext\sunmscapi.jar;F:\soft\Java\jdk1.8.0_144\jre\lib\ext\sunpkcs11.jar;F:\soft\Java\jdk1.8.0_144\jre\lib\ext\zipfs.jar;F:\soft\Java\jdk1.8.0_144\jre\lib\javaws.jar;F:\soft\Java\jdk1.8.0_144\jre\lib\jce.jar;F:\soft\Java\jdk1.8.0_144\jre\lib\jfr.jar;F:\soft\Java\jdk1.8.0_144\jre\lib\jfxswt.jar;F:\soft\Java\jdk1.8.0_144\jre\lib\jsse.jar;F:\soft\Java\jdk1.8.0_144\jre\lib\management-agent.jar;F:\soft\Java\jdk1.8.0_144\jre\lib\plugin.jar;F:\soft\Java\jdk1.8.0_144\jre\lib\resources.jar;F:\soft\Java\jdk1.8.0_144\jre\lib\rt.jar;F:\bestpay\project\workspace\bpep-cum-service\bpep-cum-service-web\target\test-classes;F:\bestpay\project\workspace\bpep-cum-service\bpep-cum-service-web\target\classes;F:\bestpay\project\workspace\bpep-cum-service\bpep-cum-service-common\target\classes;F:\soft\yzfRepository\com\bestpay\bpep\bpep-bestpay-foundation\2.34.0\bpep-bestpay-foundation-2.34.0.jar;F:\soft\yzfRepository\joda-time\joda-time\2.3\joda-time-2.3.jar;F:\soft\yzfRepository\org\apache\commons\commons-lang3\3.0\commons-lang3-3.0.jar;F:\soft\yzfRepository\org\jasypt\jasypt\1.9.2\jasypt-1.9.2.jar;F:\bestpay\project\workspace\bpep-cum-service\bpep-cum-service-persistence\target\classes;F:\soft\yzfRepository\cn\com\bestpay\commons\1.0\commons-1.0.jar;F:\soft\yzfRepository\org\springframework\spring-jdbc\3.2.5.RELEASE\spring-jdbc-3.2.5.RELEASE.jar;F:\soft\yzfRepository\com\google\guava\guava\15.0\guava-15.0.jar;F:\soft\yzfRepository\org\mybatis\mybatis\3.1.1\mybatis-3.1.1.jar;F:\bestpay\project\workspace\bpep-cum-service\bpep-cum-service-api\target\classes;F:\soft\yzfRepository\com\bestpay\bpep\bpep-validator\2.4.0\bpep-validator-2.4.0.jar;F:\soft\yzfRepository\com\bestpay\bpep\bpep-pay-foundation-service-api\2.31.0\bpep-pay-foundation-service-api-2.31.0.jar;F:\soft\yzfRepository\javax\validation\validation-api\1.1.0.Final\validation-api-1.1.0.Final.jar;F:\soft\yzfRepository\com\bestpay\bpep\bpep-redis\2.0.0\bpep-redis-2.0.0.jar;F:\soft\yzfRepository\redis\clients\jedis\2.6.0\jedis-2.6.0.jar;F:\soft\yzfRepository\commons-lang\commons-lang\2.5\commons-lang-2.5.jar;F:\soft\yzfRepository\com\fasterxml\jackson\core\jackson-databind\2.2.3\jackson-databind-2.2.3.jar;F:\soft\yzfRepository\com\fasterxml\jackson\core\jackson-annotations\2.2.3\jackson-annotations-2.2.3.jar;F:\soft\yzfRepository\com\fasterxml\jackson\core\jackson-core\2.2.3\jackson-core-2.2.3.jar;F:\soft\yzfRepository\com\bestpay\bppc\bppc-pay-common\1.1.0\bppc-pay-common-1.1.0.jar;F:\soft\yzfRepository\com\bestpay\cif\product-service-api\3.29.0\product-service-api-3.29.0.jar;F:\soft\yzfRepository\com\bestpay\cif\core-service-api\3.29.0\core-service-api-3.29.0.jar;F:\soft\yzfRepository\com\alibaba\dubbo\2.4.10\dubbo-2.4.10.jar;F:\soft\yzfRepository\org\javassist\javassist\3.15.0-GA\javassist-3.15.0-GA.jar;F:\soft\yzfRepository\org\jboss
    etty
    etty\3.2.5.Final
    etty-3.2.5.Final.jar;F:\soft\yzfRepository\com\github\sgroschupf\zkclient\0.1\zkclient-0.1.jar;F:\soft\yzfRepository\org\apache\zookeeper\zookeeper\3.4.5\zookeeper-3.4.5.jar;F:\soft\yzfRepository\jline\jline\0.9.94\jline-0.9.94.jar;F:\soft\yzfRepository\org\springframework\spring-core\3.2.5.RELEASE\spring-core-3.2.5.RELEASE.jar;F:\soft\yzfRepository\commons-logging\commons-logging\1.1.1\commons-logging-1.1.1.jar;F:\soft\yzfRepository\org\springframework\spring-context\3.2.5.RELEASE\spring-context-3.2.5.RELEASE.jar;F:\soft\yzfRepository\org\springframework\spring-aop\3.2.5.RELEASE\spring-aop-3.2.5.RELEASE.jar;F:\soft\yzfRepository\aopalliance\aopalliance\1.0\aopalliance-1.0.jar;F:\soft\yzfRepository\org\springframework\spring-expression\3.2.5.RELEASE\spring-expression-3.2.5.RELEASE.jar;F:\soft\yzfRepository\org\springframework\spring-beans\3.2.5.RELEASE\spring-beans-3.2.5.RELEASE.jar;F:\soft\yzfRepository\org\springframework\spring-aspects\3.2.5.RELEASE\spring-aspects-3.2.5.RELEASE.jar;F:\soft\yzfRepository\org\aspectj\aspectjweaver\1.7.0\aspectjweaver-1.7.0.jar;F:\soft\yzfRepository\org\springframework\spring-context-support\3.2.5.RELEASE\spring-context-support-3.2.5.RELEASE.jar;F:\soft\yzfRepository\org\springframework\amqp\spring-rabbit\1.5.7.RELEASE\spring-rabbit-1.5.7.RELEASE.jar;F:\soft\yzfRepository\org\springframework\spring-web\4.2.9.RELEASE\spring-web-4.2.9.RELEASE.jar;F:\soft\yzfRepository\org\springframework\spring-messaging\4.2.9.RELEASE\spring-messaging-4.2.9.RELEASE.jar;F:\soft\yzfRepository\org\springframework\retry\spring-retry\1.1.2.RELEASE\spring-retry-1.1.2.RELEASE.jar;F:\soft\yzfRepository\org\springframework\spring-tx\3.2.5.RELEASE\spring-tx-3.2.5.RELEASE.jar;F:\soft\yzfRepository\com\rabbitmq\http-client\1.0.0.RELEASE\http-client-1.0.0.RELEASE.jar;F:\soft\yzfRepository\org\apache\httpcomponents\httpclient\4.3.6\httpclient-4.3.6.jar;F:\soft\yzfRepository\org\apache\httpcomponents\httpcore\4.3.3\httpcore-4.3.3.jar;F:\soft\yzfRepository\commons-codec\commons-codec\1.6\commons-codec-1.6.jar;F:\soft\yzfRepository\org\springframework\amqp\spring-amqp\1.5.7.RELEASE\spring-amqp-1.5.7.RELEASE.jar;F:\soft\yzfRepository\com\rabbitmq\amqp-client\3.5.7\amqp-client-3.5.7.jar;F:\soft\yzfRepository\org\springframework\spring-test\3.2.5.RELEASE\spring-test-3.2.5.RELEASE.jar;F:\soft\yzfRepository\org\projectlombok\lombok\1.16.4\lombok-1.16.4.jar;F:\soft\yzfRepository
    et\sf\json-lib\json-lib\2.4\json-lib-2.4-jdk15.jar;F:\soft\yzfRepository\commons-beanutils\commons-beanutils\1.8.0\commons-beanutils-1.8.0.jar;F:\soft\yzfRepository\commons-collections\commons-collections\3.2.1\commons-collections-3.2.1.jar;F:\soft\yzfRepository
    et\sf\ezmorph\ezmorph\1.0.6\ezmorph-1.0.6.jar;F:\soft\yzfRepository\org\hibernate\hibernate-validator\5.0.1.Final\hibernate-validator-5.0.1.Final.jar;F:\soft\yzfRepository\org\jboss\logging\jboss-logging\3.1.1.GA\jboss-logging-3.1.1.GA.jar;F:\soft\yzfRepository\com\fasterxml\classmate\0.8.0\classmate-0.8.0.jar;F:\soft\yzfRepository\org\slf4j\slf4j-api\1.7.5\slf4j-api-1.7.5.jar;F:\soft\yzfRepository\org\slf4j\log4j-over-slf4j\1.7.6\log4j-over-slf4j-1.7.6.jar;F:\soft\yzfRepository\ch\qos\logback\logback-classic\1.0.13\logback-classic-1.0.13.jar;F:\soft\yzfRepository\ch\qos\logback\logback-core\1.0.13\logback-core-1.0.13.jar;F:\soft\yzfRepository\com\oracle\ojdbc6\11.2.0.4\ojdbc6-11.2.0.4.jar;F:\soft\yzfRepository\org\mybatis\mybatis-spring\1.1.1\mybatis-spring-1.1.1.jar;F:\soft\yzfRepository\org\apache\commons\commons-dbcp2\2.1.1\commons-dbcp2-2.1.1.jar;F:\soft\yzfRepository\org\apache\commons\commons-pool2\2.4.2\commons-pool2-2.4.2.jar;F:\soft\yzfRepository\junit\junit\4.11\junit-4.11.jar;F:\soft\yzfRepository\org\hamcrest\hamcrest-core\1.3\hamcrest-core-1.3.jar;F:\soft\yzfRepository\com\github\springtestdbunit\spring-test-dbunit\1.0.1\spring-test-dbunit-1.0.1.jar;F:\soft\yzfRepository\org\mockito\mockito-all\1.8.5\mockito-all-1.8.5.jar;F:\soft\yzfRepository\javax\servlet\javax.servlet-api\3.1.0\javax.servlet-api-3.1.0.jar;F:\soft\yzfRepository\com\bestpay\dst\dst-client\1.0.2\dst-client-1.0.2.jar;F:\soft\yzfRepository\com\bestpay\dst\dst-api\1.0.0\dst-api-1.0.0.jar;F:\soft\yzfRepository\com\bestpay\kafka\kafka-service\0.3.2\kafka-service-0.3.2.jar;F:\soft\yzfRepository\com\bestpay\bestpay-logback\1.2.4\bestpay-logback-1.2.4.jar;F:\soft\yzfRepository\org\apache\kafka\kafka_2.10\0.8.2.2\kafka_2.10-0.8.2.2.jar;F:\soft\yzfRepository\org\apache\kafka\kafka-clients\0.8.2.2\kafka-clients-0.8.2.2.jar;F:\soft\yzfRepository\org\xerial\snappy\snappy-java\1.1.1.7\snappy-java-1.1.1.7.jar;F:\soft\yzfRepository
    et\jpountz\lz4\lz4\1.2.0\lz4-1.2.0.jar;F:\soft\yzfRepository\com\yammer\metrics\metrics-core\2.2.0\metrics-core-2.2.0.jar;F:\soft\yzfRepository\org\scala-lang\scala-library\2.10.4\scala-library-2.10.4.jar;F:\soft\yzfRepository
    et\sf\jopt-simple\jopt-simple\3.2\jopt-simple-3.2.jar;F:\soft\yzfRepository\com\101tec\zkclient\0.3\zkclient-0.3.jar;F:\soft\yzfRepository\log4j\log4j\1.2.14\log4j-1.2.14.jar;F:\soft\yzfRepository\com\alibaba\fastjson\1.2.8.sec01\fastjson-1.2.8.sec01.jar;F:\soft\yzfRepository\com\bestpay\bpep\bpep-code-convert\2.0.0\bpep-code-convert-2.0.0.jar;F:\soft\yzfRepository\com\bestpay\cif\bas-service-api\1.19.0\bas-service-api-1.19.0.jar com.intellij.rt.execution.junit.JUnitStarter -ideVersion5 -junit4 com.bestpay.cum.service.BenefitRateConfigManageServiceTest,testSaveOrUpdate ---- IntelliJ IDEA coverage runner ---- sampling ... include patterns: com\.bestpay\.cum\.service\..* exclude patterns:2018-07-13 11:19:36,897 INFO o.h.validator.internal.util.Version - HV000001: Hibernate Validator 5.0.1.Final 2018-07-13 11:19:37,059 INFO o.h.v.i.xml.ValidationXmlParser - HV000007: META-INF/validation.xml found. Parsing XML based configuration. 2018-07-13 11:19:37,191 INFO o.h.v.i.x.ValidationBootstrapParameters - HV000006: Using javax.validation.spi.ValidationProvider as validation provider. 2018-07-13 11:19:37,193 INFO o.h.v.i.x.ValidationBootstrapParameters - HV000004: Using org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator as message interpolator. 2018-07-13 11:19:37,195 INFO o.h.v.i.x.ValidationBootstrapParameters - HV000005: Using org.hibernate.validator.internal.engine.resolver.DefaultTraversableResolver as traversable resolver. 2018-07-13 11:19:37,196 INFO o.h.v.i.x.ValidationBootstrapParameters - HV000003: Using org.hibernate.validator.internal.engine.constraintvalidation.ConstraintValidatorFactoryImpl as constraint factory. 2018-07-13 11:19:37,992 INFO c.bestpay.dst.client.dubbo.MDCFilter - [DUBBO] add class org.slf4j.MDClog mdc list, dubbo version: 2.4.10, current host: 127.0.0.1 2018-07-13 11:19:37,994 INFO c.bestpay.dst.client.dubbo.MDCFilter - [DUBBO] add class org.apache.log4j.MDClog mdc list, dubbo version: 2.4.10, current host: 127.0.0.1 2018-07-13 11:19:49,873 INFO c.bestpay.dst.client.dubbo.DstFilter - [DUBBO] Dst filter init, dubbo version: 2.4.10, current host: 192.168.4.6 2018-07-13 11:19:49,874 INFO com.bestpay.dst.client.Tracer - [DUBBO] tracer init, dubbo version: 2.4.10, current host: 192.168.4.6 2018-07-13 11:19:49,875 INFO com.bestpay.dst.client.Tracer - [DUBBO] tracer init finished, dubbo version: 2.4.10, current host: 192.168.4.6 2018-07-13 11:19:49,876 INFO c.bestpay.dst.client.dubbo.DstFilter - [DUBBO] Dst filter init finish, dubbo version: 2.4.10, current host: 192.168.4.6 2018-07-13 11:19:49,885 INFO c.b.d.c.support.DefaultSyncTransfer - [DUBBO] collector service init, dubbo version: 2.4.10, current host: 192.168.4.6 2018-07-13 11:20:03,160 INFO c.b.d.c.support.DefaultSyncTransfer - [DUBBO] collector service init finished, dubbo version: 2.4.10, current host: 192.168.4.6 13, 2018 11:20:11 redis.clients.jedis.JedisSentinelPool initSentinels : Trying to find master from available Sentinels... 13, 2018 11:20:12 redis.clients.jedis.JedisSentinelPool initSentinels : Redis master running at 172.17.46.11:26380, starting Sentinel listeners... 13, 2018 11:20:12 redis.clients.jedis.JedisSentinelPool initPool : Created JedisPool to master at 172.17.46.11:26380 2018-07-13 11:20:46,033 INFO c.b.c.k.b.AbstractConsumerDefaultTemplate - [09192168004006180713112046033001]Begin to start kafka consumer:CustAuthNotifyConsumer. 2018-07-13 11:20:46,037 INFO c.b.k.s.consumer.ConsumerServiceImpl - consumer message topic info:TopicInfo(syncFlag=SYNC, topicName=BPEP_PAY_FOUNDATION_SERVICE_AUTH_CALLBACK, ack=NO_ACK, retries=true, groupName=bpep_cum_service_group, zkAddress=172.17.45.17:2181, brokerList=null),beanName:class com.bestpay.cum.kafka.consumer.CustAuthNotifyConsumer,traceLogId:09192168004006180713112046033001 2018-07-13 11:20:46,084 INFO c.b.k.s.consumer.ConsumerServiceImpl - process done. 2018-07-13 11:20:46,084 INFO c.b.c.k.b.AbstractConsumerDefaultTemplate - [09192168004006180713112046033001]Start kafka consumer:CustAuthNotifyConsumer success.topicInfo:TopicInfo(syncFlag=SYNC, topicName=BPEP_PAY_FOUNDATION_SERVICE_AUTH_CALLBACK, ack=NO_ACK, retries=true, groupName=bpep_cum_service_group, zkAddress=172.17.45.17:2181, brokerList=null) 2018-07-13 11:20:46,085 INFO c.b.cum.kafka.init.KafkaServiceInit - Kafka consumer and producer finish init 2018-07-13 11:20:46,626 INFO com.bestpay.cum.aop.LogAspectManage - call[com.bestpay.cum.service.BenefitRateConfigManageServiceImpl][saveOrUpdate]PARAMETER:[BenefitRateConfigRequest(super=CumRequest(super=CommonRequest(initiationID=1531452046348)), proxyCode=test001, proxyName=testProxyName, unionpayBenefitRate=0.55, proxyBenefitRate=0.55, createdBy=OTHERS, updatedBy=Other people)] 2018-07-13 11:20:46,871 INFO c.b.k.s.n.m.ConsumeMessageManager - group name:bpep_cum_service_group 2018-07-13 11:20:46,871 INFO c.b.k.s.n.m.ConsumeMessageManager - topic name:BPEP_PAY_FOUNDATION_SERVICE_AUTH_CALLBACK 2018-07-13 11:20:47,003 INFO kafka.utils.VerifiableProperties - Verifying properties 2018-07-13 11:20:47,196 INFO com.bestpay.cum.aop.LogAspectManage - call[com.bestpay.cum.service.BenefitRateConfigManageServiceImpl][saveOrUpdate][566ms][Success][CUM09000000]RESPONSE:Result[CumResponse(super=CumResponse{result=2, errorCode=CUM09000000, errorMsg= }, success=true)] 2018-07-13 11:20:47,293 INFO kafka.utils.VerifiableProperties - Property auto.commit.interval.ms is overridden to 10000 2018-07-13 11:20:47,294 INFO kafka.utils.VerifiableProperties - Property client.id is overridden to 192.168.4.6_BPEP_PAY_FOUNDATION_SERVICE_AUTH_CALLBACK_384809e5-eff3-43ed-bd97-127504fe20b9 2018-07-13 11:20:47,294 INFO kafka.utils.VerifiableProperties - Property consumer.id is overridden to 192.168.4.6_BPEP_PAY_FOUNDATION_SERVICE_AUTH_CALLBACK_384809e5-eff3-43ed-bd97-127504fe20b9 2018-07-13 11:20:47,296 INFO kafka.utils.VerifiableProperties - Property group.id is overridden to bpep_cum_service_group 2018-07-13 11:20:47,296 INFO kafka.utils.VerifiableProperties - Property rebalance.backoff.ms is overridden to 5000 2018-07-13 11:20:47,297 INFO kafka.utils.VerifiableProperties - Property rebalance.max.retries is overridden to 8 2018-07-13 11:20:47,297 INFO kafka.utils.VerifiableProperties - Property zookeeper.connect is overridden to 172.17.45.17:2181 2018-07-13 11:20:47,297 INFO kafka.utils.VerifiableProperties - Property zookeeper.connection.timeout.ms is overridden to 60000 2018-07-13 11:20:47,483 ERROR c.b.k.s.n.m.ConsumeMessageManager - an exception occurs when consume message : java.lang.ExceptionInInitializerError: null at kafka.metrics.KafkaMetricsGroup$class.newMeter(KafkaMetricsGroup.scala:79) ~[kafka_2.10-0.8.2.2.jar:na] at kafka.consumer.ZookeeperConsumerConnector.newMeter(ZookeeperConsumerConnector.scala:83) ~[kafka_2.10-0.8.2.2.jar:na] at kafka.consumer.ZookeeperConsumerConnector.(ZookeeperConsumerConnector.scala:107) ~[kafka_2.10-0.8.2.2.jar:na] at kafka.javaapi.consumer.ZookeeperConsumerConnector.(ZookeeperConsumerConnector.scala:66) ~[kafka_2.10-0.8.2.2.jar:na] at kafka.javaapi.consumer.ZookeeperConsumerConnector.(ZookeeperConsumerConnector.scala:69) ~[kafka_2.10-0.8.2.2.jar:na] at kafka.consumer.Consumer$.createJavaConsumerConnector(ConsumerConnector.scala:105) ~[kafka_2.10-0.8.2.2.jar:na] at kafka.consumer.Consumer.createJavaConsumerConnector(ConsumerConnector.scala) ~[kafka_2.10-0.8.2.2.jar:na] at com.bestpay.kafka.service.Factory.ConsumerFactory.initConsumer(ConsumerFactory.java:40) ~[kafka-service-0.3.2.jar:na] at com.bestpay.kafka.service.Factory.ConsumerFactory.getConnector(ConsumerFactory.java:53) ~[kafka-service-0.3.2.jar:na] at com.bestpay.kafka.service.nospring.manager.ConsumeMessageManager.getMessagesAndProcess(ConsumeMessageManager.java:78) ~[kafka-service-0.3.2.jar:na] at com.bestpay.kafka.service.nospring.manager.ConsumeMessageManager$1.run(ConsumeMessageManager.java:58) ~[kafka-service-0.3.2.jar:na] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_144] Caused by: java.lang.IllegalStateException: Shutdown in progress at java.lang.ApplicationShutdownHooks.add(ApplicationShutdownHooks.java:66) ~[na:1.8.0_144] at java.lang.Runtime.addShutdownHook(Runtime.java:211) ~[na:1.8.0_144] at com.yammer.metrics.Metrics.(Metrics.java:21) ~[metrics-core-2.2.0.jar:na] ... 12 common frames omitted 2018-07-13 11:20:47,498 INFO c.b.d.c.support.DefaultSyncTransfer - [DUBBO] push span list to collector failed, Dst-span-transfer-task-thread sleep 10 s, dubbo version: 2.4.10, current host: 192.168.4.6 2018-07-13 11:20:47,578 ERROR c.b.k.s.consumer.ConsumerServiceImpl - exception occured whiling closing connection Java HotSpot(TM) 64-Bit Server VM warning: ignoring option UseSplitVerifier; support was removed in 8.0 Process finished with exit code 0
  • 理由:プロジェクトで上記のような問題が発生し、複数のスレッドがデータベースを操作するために連続的に呼び出された場合に発生します.複数のsqlliteopenhelperが表示され、複数のconnectionオブジェクトが生成されます.これは禁止され、グローバルに1つのエントリのみがデータベースを操作できるように、単一のモードを使用することができます.
  • 解決方法:@Testラベル、テスト方法を保留すればいい、残りの注釈、run test