Eclipselink JPARS exception “ECLIPSELINK_OXM_XML_KEY not found”

孤人 提交于 2019-12-24 07:04:01

问题


I am using Glassfish 3.1.2 and Eclipselink 2.4.1 (at least I thought so!) and derby (from Glassfish as JTA resource).

When accessing the Entities in my app via "XXXX:8080/myapp/persistence/, I get the following error. Please note: the "Eclipselink Persistence Service" is reported with version 2.3.2, which looks strange to me, too. I would expect to see my configured version 2.4.1 (see below).

Any ideas?

INFO: JTS5014: Recoverable JTS instance, serverId = [100]
INFO: [EL Info]: 2013-04-05 17:11:09.876--ServerSession(478107)--file:Server/glassfish3/glassfish/domains/domain1/eclipseApps/stats/WEB-INF/classes/_onLocal login successful


FINE: An Exception was thrown while creating a JAXBContext for persistence unit [onLocal]: [javax.xml.bind.JAXBException
 - with linked exception:
[Exception [EclipseLink-50055] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.JAXBException
Exception Description: Error creating DynamicJAXBContext: ECLIPSELINK_OXM_XML_KEY not found in properties map, or map was null.]]
INFO: [EL Info]: 2013-04-05 17:11:10.191--ServerSession(478107)--file:Server/glassfish3/glassfish/domains/domain1/eclipseApps/tracktron_stats/WEB-INF/classes/_tracktronLocal logout successful

FINE: You are requesting types [[*/*]] from JPA RS.
FINE: exception_marshalling_persitence_unit (There is no English translation for this message.)

回答1:


The main reason is the Glassfish version used here (V3.1.2): The project was built with eclipselink 2.4.1, but Glassfish comes with older versions (see log). This was not so easy to fix, but there is another stackoverflow solution that finally worked:

Glassfish 3 Classloader Sequence



来源:https://stackoverflow.com/questions/15838089/eclipselink-jpars-exception-eclipselink-oxm-xml-key-not-found

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!