Questions tagged [moxy]

MOXy is the object-to-XML and object-to-JSON component of EclipseLink. It is a JAXB (JSR-222) implementation with extensions for supporting: XPath based mapping, JPA entities, and infoset preservation.

MOXy is the object-to-XML and object-to-JSON component of EclipseLink. It is a JAXB (JSR-222) implementation with extensions for supporting: XPath based mapping, JPA entities, and infoset preservation.

868 questions
7
votes
3 answers

JAXB Compiling Issue - [ERROR] Property "Any" is already defined

I am trying to create JAXB binding for xccdf-1.1.4.xsd which is a standard schema that can be obtain from XCCDF Schema Location I am currently using EclipseLink MOXy as my JAXB implementation since I like the fact that it can also generate JSON…
beyonddc
  • 1,246
  • 3
  • 13
  • 26
6
votes
1 answer

eclipselink/Moxy : inheritance and attribute name oveloading based on type

I'm facing a marshalling/unmarshalling problem involving inheritance and polymorphism using MOXy's JAXB implementation and external metadata bindings file. I have no control on the XML files or the model classes. There are multiple classes inside…
Drewman
  • 947
  • 11
  • 23
6
votes
1 answer

Jaxb project in eclipse indigo

When I create a jaxb project in eclipse indigo, it tells me "The currently selected JAXB library provider is invalid" which is eclipselink2.3.0-Indigo I tried the javanet download jars with no success. i can though try the examples in the demo…
Kamal
  • 61
  • 1
  • 1
  • 2
6
votes
1 answer

(moxy) jaxb marshaling and hibernate proxy objects

In the last couple of days I have tried to make support for XML marshalling/unmarshalling of a Hibernate model, using MOXy JAXB. Trying to do this, I have run into a problem with hibernates proxy objects. Consider something like: public class User…
Kasper Nielsen
  • 191
  • 1
  • 7
6
votes
2 answers

No descriptor found while unmarshalling element mapped to attribute

I have a REST client and server (Jersey) communicating via JSON messages. After switching both from Jackson to MOXy I started getting XMLMarshalException: No descriptor found while unmarshalling element mapped to attribute someAttribute. The…
Sergey
  • 3,253
  • 2
  • 33
  • 55
6
votes
1 answer

Not able to configure Moxy using JAXB

I am using Moxy Implementation of JAXB in my codeset and trying to create paths using @XMLPath but it seems to be not working. I have a Spring bassed Project and I have created jaxb.properties under /project/WEB/src/main/resources having content…
shivam-shekhar
  • 457
  • 1
  • 4
  • 9
6
votes
1 answer

Convert POJO to JSON with slash in field name via moxy

I'm trying to put JAXB annotations on POJO to produce following JSON (via moxy): { "apartmentNumber": "404", "city/town": "SomeCity", "state/province": "NoState", "street": "1st Street" } Some fields contains slashes. When I'm…
stborod
  • 533
  • 4
  • 11
6
votes
3 answers

Generation of XSD restrictions in a schema generated from Java JAXB annotated classes

MOXy BeanValidation gives me the ability to add validation to my JAXB classes. Using MOXy's "Bean Validation Plugin" I can have Bean Validation in generated JAXB classes based on restrictions/facets from a prexisting Schema. However is there any…
JFK
  • 1,527
  • 16
  • 21
6
votes
1 answer

Avoid creation of object wrapper type/value in MOXy (JAXB+JSON)

I'm using MOXy 2.6 (JAXB+JSON). I want ObjectElement and StringElement to be marshalled the same way, but MOXy creates wrapper object when fields are typed as Object. ObjectElement.java public class ObjectElement { public Object testVar =…
Toilal
  • 3,301
  • 1
  • 24
  • 32
6
votes
2 answers

JAXB: Unmarshal heterogeneous array

I'm trying to unmarshal using MOXy a json with the following structure: [ { "page": 1, "pages": 1 }, [ { "indicator": { "id": "IC.BUS.EASE.XQ", "value": "Ease of doing business index" }, …
MrMiyagi
  • 61
  • 4
6
votes
1 answer

Rename "type" from JSON moxy output

I'm struggling with the way how Moxy handles inheritance of objects. In particular, I need to rename the default type element which Moxy adds in case of subtypes as it prevents me from having my own type field in my objects. This question relates to…
Stepan Vavra
  • 3,884
  • 5
  • 29
  • 40
6
votes
1 answer

MOXy JAXB javax.xml.bind.PropertyException

I followed this example: http://wiki.eclipse.org/EclipseLink/Examples/MOXy/JSON_Twitter Now I have this class: import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBElement; import javax.xml.bind.Marshaller; import…
Gergely Fehérvári
  • 7,811
  • 6
  • 47
  • 74
6
votes
1 answer

Validation Exception Mapper not returning JSON format

I am using Jersey 2.5.1 as jax-rs implementation and I use Moxy as JSON serialiser. I configured Jersey to print validation errors to output in web.xml.
Bart
  • 301
  • 5
  • 12
6
votes
1 answer

MOXy JAXB marshals invalid control characters for Unicode (u+2019) when UTF-8 encoding is specified

I have encountered a very annoying error when trying to marshal a class to JSON using Eclipse Moxy. I have a an attribute with the following value in one of my domain classes: "the City’s original city site" which contains the code point u+2019…
THX1138
  • 1,518
  • 14
  • 28
6
votes
3 answers

How to replace EclipseLink 2.3.2 with EclipseLink 2.5 in WebLogic Server 12c

I currrently try to run Docx4j in WebLogic Server 12c. WebLogic Server 12c comes with EclipseLink 2.3.2. There is a similar Post describing the situation which unfortunately yield no answer. Docx4j does not work with the JAXB (MOXy) implementation…
Sascha Handke
  • 81
  • 1
  • 5
1 2
3
57 58