GlassFish 4.1 REST API生成Json报错

- 1 min

GlassFish4.1或GlassFish4.1.1使用REST API请求返回Json数据时报错

java.lang.NoClassDefFoundError: Could not initialize class org.eclipse.persistence.jaxb.BeanValidationHelper

解决方法

  1. 下载org.eclipse.persistence.moxy-2.6.1.jar

    下载org.eclipse.persistence.moxy-2.6.1.jar

  2. 替换路径 /glassfish / modules / org.eclipse.persistence.moxy.jar

  3. 最后不要忘记关闭并重新打开NetBeans8.2 IDE并重启GlassFish

参考

Dawson Lee

A man who loves to watch Korean dramas

rss facebook twitter github gitlab youtube mail spotify lastfm instagram linkedin google google-plus pinterest medium vimeo stackoverflow reddit quora quora