首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Glassfish 4 moxy eclipselink 2.5.2 oxm对象图故障

Glassfish 4 moxy eclipselink 2.5.2 oxm对象图故障
EN

Stack Overflow用户
提问于 2014-10-13 23:59:36
回答 1查看 365关注 0票数 0

我在使用oxm元数据定义对象图进行封送处理时遇到了这个问题

代码语言:javascript
复制
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBElement not found by   org.eclipse.persistence.core [142]   at 
org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl
.java:1532)     at 
org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75)    at 
org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.jav
a:1955)

Caused by: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBElement
    at org.eclipse.persistence.internal.oxm.ChoiceUnmarshalContext.getValue(ChoiceUnmarshalContext.java:70)

不使用外部定义的oxm对象图,它可以工作。

我使用类加载器从meta加载xml文件。

代码语言:javascript
复制
URL resource1 = this.getClass().getClassLoader().getResource("META-INF/contactsimpleoxm.xml");
URL resource2 = this.getClass().getClassLoader().getResource("META-INF/graph2oxm.xml");

我下载了eclipselink-plugins-2.5.2.v20140319-9ad6abd.zip.并复制了文件:

代码语言:javascript
复制
cp org.eclipse.persistence.antlr_3.2.0.v201302191141.jar /opt/glassfish4/glassfish/modules/org.eclipse.persistence.antlr.jar 
cp org.eclipse.persistence.asm_3.3.1.v201302191223.jar /opt/glassfish4/glassfish/modules/org.eclipse.persistence.asm.jar 
cp org.eclipse.persistence.core_2.5.2.v20140319-9ad6abd.jar /opt/glassfish4/glassfish/modules/org.eclipse.persistence.core.jar 
cp org.eclipse.persistence.dbws_2.5.2.v20140319-9ad6abd.jar /opt/glassfish4/glassfish/modules/org.eclipse.persistence.dbws.jar 
cp org.eclipse.persistence.jpa.jpql_2.5.2.v20140319-9ad6abd.jar /opt/glassfish4/glassfish/modules/org.eclipse.persistence.jpa.jpql.jar 
cp org.eclipse.persistence.jpa_2.5.2.v20140319-9ad6abd.jar /opt/glassfish4/glassfish/modules/org.eclipse.persistence.jpa.jar 
cp org.eclipse.persistence.moxy_2.5.2.v20140319-9ad6abd.jar /opt/glassfish4/glassfish/modules/org.eclipse.persistence.moxy.jar 
cp org.eclipse.persistence.oracle_2.5.1.v20130618-75cdba2.jar /opt/glassfish4/glassfish/modules/org.eclipse.persistence.oracle.jar 
cp javax.persistence_2.1.0.v201304241213.jar /opt/glassfish4/glassfish/modules/javax.persistence.jar 

我清理了osgi缓存并重新声明了glssfgish。eclipse版本正确地报告为2.5.2

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-01-22 11:49:24

我在EclipseLink 2.5.3中修复了这个问题。谢谢你报道这个问题。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/26350705

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档