user5479362
user5479362

Reputation:

OSGi bundle with javax.json.JsonException for MoXy

What OSGi bundle should I install for javax.json package for RS services?

I've got an error:

Caused by: java.lang.NoClassDefFoundError: javax/json/JsonException
    at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.getNewXMLReader(SAXUnmarshaller.java:209)
    at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.getXMLReader(SAXUnmarshaller.java:197)
    at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:452)
    at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:400)
    at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:741)
    at org.eclipse.persistence.internal.oxm.XMLUnmarshaller.unmarshal(XMLUnmarshaller.java:649)
    at org.eclipse.persistence.jaxb.JAXBUnmarshaller.unmarshal(JAXBUnmarshaller.java:349)
    at org.eclipse.persistence.jaxb.rs.MOXyJsonProvider.readFrom(MOXyJsonProvider.java:668)

The JSON bundle I've installed:

JSR 353 (JSON Processing) Default Providerorg.glassfish.javax.json
Symbolic Name   org.glassfish.javax.json
Version 1.0.4
Bundle Location initial@reference:file:plugins/org.glassfish.javax.json_1.0.4.jar

The MOXy bundle:

EclipseLink MOXyorg.eclipse.persistence.moxy
Symbolic Name   org.eclipse.persistence.moxy
Version 2.6.4.v20160829-44060b6
Bundle Location initial@reference:file:plugins/org.eclipse.persistence.moxy_2.6.4.v20160829-44060b6.jar

with import:

javax.json; resolution:=optional

It looks like everything should work fine, but it isn't. MoXy don't get the javax.json dependencies. What's wrong? Wrong version of bundle? Wrong loading order? What do I need to do to bring them to work?

Upvotes: 2

Views: 477

Answers (0)

Related Questions