1. 程式人生 > >cxf 整合 spring 時 java.lang.VerifyError異常

cxf 整合 spring 時 java.lang.VerifyError異常

故障現象:有一個cxf專案在部署的時候經常出現,應用啟動失敗。
異常資訊主要有兩個,Falling off the end of the code 和 illegal instruction found at offset 1:

java.lang.VerifyError: (class: xxx/webservice/jaxws_asm/DoService, method: getRequest signature: ()Lxxx/service/webservice/Request;) Falling off the end of the code
java.lang.verifyerror: (class:xxxxxx ;)v) illegal instruction found at offset 1

經反覆查詢資料發現最終是asm jar包衝突導致的。直接通過maven進行依賴分析:
在這裡插入圖片描述
在控制檯會輸出一堆依賴資訊,ctrl + f 查詢 asm

在這裡插入圖片描述

主要是因為集成了外部jar , 外部jar中有asm包 和 cxf 中的asm包衝突了。排除掉外部jar中的asm包即可。假如是因為整合其他框架導致的,同理排除掉框架中的asm包即可。

文章引用:https://www.cnblogs.com/suiyueqiannian/p/7066357.html