Questions tagged [spring-oxm]
46 questions
25
votes
4 answers
How to use spring to marshal and unmarshal xml?
I have a spring boot project. I have a few xsds in my project. I have generated the classes using maven-jaxb2-plugin. I have used this tutorial to get a sample spring boot application running.
import…

Kaushik Chakraborty
- 669
- 1
- 9
- 16
10
votes
3 answers
Managing JAXB-generated classes in a Maven project
I have a Maven-based project, in which I trying to add some JAXB classes automatically generated by the "jaxb2-maven-plugin" Maven plugin. However, my first cut has me in a circular dependency loop:
Because these JAXB classes aren't generated yet,…

Steve Perkins
- 11,520
- 19
- 63
- 95
8
votes
3 answers
Vulnerability warning with XStreamMarshaller
When using a XStreamMarshaller with spring batch, I get the following message:
Security framework of XStream not initialized, XStream is probably vulnerable.
First try: According to the documentation, I've tried to reset all permissions, but I…

Nicolas
- 1,812
- 3
- 19
- 43
6
votes
1 answer
JDK17 + Spring Boot Starter Web Services: Implementation of JAXB-API has not been found on module path or classpath
I have a simple spring boot app and I want to send request to a SOAP endpoint. Unfortunately every time I try to do this I receive: javax.xml.bind.JAXBException: Implementation of JAXB-API has not been found on module path or classpath. I'm really…

Clyde Barrow
- 1,924
- 8
- 30
- 60
6
votes
1 answer
Ignoring DTDs when unmarshalling with EclipseLink MOXy
When trying to unmarshall some XML into a POJO using EclipseLink MOXy I'm getting a FileNotFoundException where it's looking for the document's DTD as a relative path.
Exception in thread "main" org.springframework.oxm.UnmarshallingFailureException:…

DeejUK
- 12,891
- 19
- 89
- 169
4
votes
3 answers
Proper way to use Spring JAXB Marshaller with Java 9 without defining additional modules
To illustrate my issue, I created a small spring boot sample application. The purpose of the application is to create a Jaxb2Marshaller bean.
@SpringBootApplication
public class App implements CommandLineRunner {
public static void…

hotzst
- 7,238
- 9
- 41
- 64
3
votes
0 answers
Using jakarta.xml.bind-api v4.0.0 with spring-oxm
I'm using spring-oxm v5.3.23. With jakarta.xml.bind-api v2.3.3 it all works fine. But if I upgrade jakarta.xml.bind-api to v4.0.0 below exception is thrown.
org.springframework.beans.BeanInstantiationException: Failed to instantiate…

Suthan S M
- 193
- 1
- 6
3
votes
1 answer
Marshalling Different Classes with Spring MVC and JIBX
We are trying to build some RESTful services with Spring MVC. We will be providing several representations: XML, HTML, & JSON. We would like to use JiBX as the OXM technology.
We are currently having difficulty figuring out how to wire up Spring…

SingleShot
- 18,821
- 13
- 71
- 101
3
votes
1 answer
JAXB marshaller throwing NullPointerException when upgrading from Java 6 to Java 7 in XMLSerializer
I've scoured the interwebs for a solution but I am at a loss so I'm hoping someone can point me in the right direction here.
I've been tasked with upgrading an app, which makes use of JAXB2, to Java 7.
Since I understand JVM 7 can run Java 6…

anojan
- 43
- 1
- 5
3
votes
2 answers
Producing a XML view with a XStreamMarshaller Spring
I am using the spring framework 3.1 (with hibernate) and I am trying to produce an XML representation like:
1
bla@hello.com
bob
from this java class:
@Entity
public class User…
user1997943
2
votes
1 answer
@XmlSeeAlso doesn't work for the same root node
I'm trying to implement inheritance with @XmlSeeAlso annotation. Everything works as expected when using different root node names for subclasses. But with the same root names Unmarshaller always choses the last class from the XmlSeeAlso list…

Tanya
- 21
- 1
2
votes
1 answer
Spring MVC with JAXB, List response based on a Generic class
I am working with Spring 4, together with Spring MVC.
I have the following POJO class
@XmlRootElement(name="person")
@XmlType(propOrder = {"id",...})
public class Person implements Serializable {
…
@Id
@XmlElement
public Integer…

Manuel Jordan
- 15,253
- 21
- 95
- 158
2
votes
1 answer
UnmarshalException in Spring 3.1 Restful Service Using xml Request
i use spring web 3.1.1 and spring oxm 3.1.1.
when jaxb2marshaller attempt to unmarshall xml source to object
blow Exception occured.
2012-12-03 13:38:41,152[k.c.s.s.c.r.AuthenticationController:154][ERROR] JAXB unmarshalling exception; nested…

namxee
- 233
- 1
- 9
2
votes
2 answers
Setting castor properties using Spring Oxm
Spring Oxm allows you to use different marshallers/unmarshallers and Castor is one of them.
By default castor marshalles xml documents unindented and official documents tell that putting a castor.properties file in the search locations including the…

Serkan Arıkuşu
- 5,549
- 5
- 33
- 50
1
vote
0 answers
Spring Boot/Spring Batch Latest: setting the Marshaller in StaxEventItemWriterBuilder using .marshaller() gives an error
when I'm trying to set a Marshaller to StaxEventItemWriterBuilder in my spring batch config file it gives me the following error in Eclipse IDE,
"The method marshaller(Marshaller) from the type StaxEventItemWriterBuilder refers to the missing type…

Hasanka Sapumal
- 61
- 4