NoSuchMethodError on startup in Java Jersey app

前端 未结 4 1101
伪装坚强ぢ
伪装坚强ぢ 2020-11-27 17:50

I\'ve been getting a very strange error when trying to start a Jersey app on Tomcat. The same code works on other computers. I tried reinstalling tomcat, all my maven depend

4条回答
  •  刺人心
    刺人心 (楼主)
    2020-11-27 17:54

    We are using jersey-json 1.9 which has a dependency on jersey-core which also happen to have a javax.ws.rs.core.Application class.

    So our fix is to exclude the jersey-core from jersey-json:

        
            com.sun.jersey
            jersey-json
            1.9
            
                
                    com.sun.jersey
                    jersey-core
                
            
        
    

提交回复
热议问题