惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

The Cloudflare Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
T
The Blog of Author Tim Ferriss
G
Google Developers Blog
小众软件
小众软件
J
Java Code Geeks
V
Visual Studio Blog
The Register - Security
The Register - Security
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
罗磊的独立博客
美团技术团队
阮一峰的网络日志
阮一峰的网络日志
V
V2EX
博客园 - 叶小钗
N
Netflix TechBlog - Medium
月光博客
月光博客
aimingoo的专栏
aimingoo的专栏
大猫的无限游戏
大猫的无限游戏
T
The Exploit Database - CXSecurity.com
The Hacker News
The Hacker News
Cisco Talos Blog
Cisco Talos Blog
Hacker News: Ask HN
Hacker News: Ask HN
Hacker News - Newest:
Hacker News - Newest: "LLM"
AWS News Blog
AWS News Blog
Webroot Blog
Webroot Blog
The Last Watchdog
The Last Watchdog
T
Threatpost
I
Intezer
T
Tenable Blog
L
LINUX DO - 热门话题
T
Tailwind CSS Blog
Scott Helme
Scott Helme
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
C
Cybersecurity and Infrastructure Security Agency CISA
Engineering at Meta
Engineering at Meta
S
Schneier on Security
Recent Announcements
Recent Announcements
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
F
Fortinet All Blogs
腾讯CDC
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
T
Troy Hunt's Blog
量子位
H
Hacker News: Front Page
V2EX - 技术
V2EX - 技术
Google Online Security Blog
Google Online Security Blog
人人都是产品经理
人人都是产品经理
博客园 - 【当耐特】
博客园 - Franky
www.infosecurity-magazine.com
www.infosecurity-magazine.com

博客园 - James.H.Fu

PMS-授权中心 如何从现有版本1.4.8升级到element UI2.0.11 Maven私有仓库: 发布release版本报错:Return code is: 400, ReasonPhrase: Repository does not allow upd ating assets: maven-releases. java,javascript中的url编码 SpringBoot favicon.ico SpringBoot 异常处理 spring boot 跨域请求 在centos 7上安装BIMServer maven 单独构建多模块项目中的单个模块 MongoDB 安装及副本集简单操作 spring-boot dubbo项目使用docker方式部署 Spring Boot和Dubbo整合 springboot 定制错误页面 Maven私有仓库-使用docker部署Nexus - James.H.Fu - 博客园 centos7 sentry部署指南 静态文件服务器部署指南 开始使用ansible 2016项目开发经验总结及后续计划 - James.H.Fu - 博客园 2016工作总结
spring boot + dubbo开发遇到过的异常
James.H.Fu · 2017-10-24 · via 博客园 - James.H.Fu
  1. 异常信息
    NoClassDefFoundErrororg.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1162)
Session 0x35e929e94120196 for server 172.16.0.239/172.16.0.239:2182, unexpected error, closing socket connection and attempting reconnect

NoClassDefFoundError
org/apache/zookeeper/proto/SetWatches
org.apache.zookeeper.ClientCnxn$SendThread in primeConnection at line 926
org.apache.zookeeper.ClientCnxnSocketNIO in doTransport at line 363
org.apache.zookeeper.ClientCnxn$SendThread in run at line 1141

NoClassDefFoundErrororg.jboss.netty.logging.JdkLogger.warn(JdkLogger.java:86)

NoClassDefFoundError
org/jboss/netty/channel/DefaultExceptionEvent
org.jboss.netty.channel.Channels in fireExceptionCaught at line 432
org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink$Boss in connect at line 390
org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink$Boss in processSelectedKeys at line 354
org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink$Boss in run at line 276
java.util.concurrent.ThreadPoolExecutor in runWorker at line 1142
java.util.concurrent.ThreadPoolExecutor$Worker in run at line 617
java.lang.Thread in run at line 748
Caused by: java.lang.ClassNotFoundException: ch.qos.logback.classic.spi.ThrowableProxy
	at java.net 

.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:94)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

  1. 原因分析
    image

现在感觉这些异常的产生都跟dubbo相关线程没有得到很好的关闭导致的。

  1. 解决方案
启动时增加系统属性参数:-Ddubbo.shutdown.hook=true
比如这样:
java -Ddubbo.shutdown.hook=true -jar pms-wx-1.0.0-SNAPSHOT.jar --spring.profiles.active=qc --spring.dubbo.registry.group=dubbo-test

参考资料