我正在使用Glassfish 3.1.2和Eclipselink 2.4.1(至少我是这么认为!)和derby(来自Glassfish作为JTA资源)。
当通过“XXXX:8080 / myapp / persistence /访问我的应用程序中的实体时,我收到以下错误。请注意:”Eclipselink持久服务“报告的版本为2.3.2,这对我来说很奇怪,我希望看到我配置的版本2.4.1(见下文)。
有什么想法吗?
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.)
答案 0 :(得分:1)
主要原因是此处使用的Glassfish版本(V3.1.2):该项目是使用eclipselink 2.4.1构建的,但Glassfish附带旧版本(请参阅日志)。这不是那么容易解决,但还有另一个最终有效的stackoverflow解决方案: