Skip to main content

Questions tagged [jaxb]

Java Architecture for XML Binding is the Java standard for working with XML as domain objects. It provides an easy mechanism for mapping Java classes to XML representations. It is part of Jakarta EE API and it was until Java SE 8 also provided by the Java SE runtime itself. Since Java SE 9 you would need to manually provide it along with your application, or to rely on a platform-provided one (e.g. when you target a stock Jakarta EE runtime).

jaxb
0 votes
1 answer
36 views

java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlNs

I am getting following exceptions in gradle ant.xjc. its working perfectly when it has generate("javax.xml.bind:jaxb-api:2.3.1") as a dependency. Execution failed for task ':createWsdlSource'...
ERK's user avatar
  • 352
-1 votes
0 answers
32 views

Using ecplise link with spring webservicetemplate

I try using Eclipse Moxy for marshalling in spring-ws. Using: <dependency> <groupId>org.eclipse.persistence</groupId> <artifactId>org.eclipse.persistence....
BarbetNL's user avatar
  • 455
-1 votes
0 answers
37 views

How to create xml sub element by XmlElement annotation

I need to create the following type of XML file as an output. JDK 1.8 (must use javax.xml.*) Expected: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <...
ERK's user avatar
  • 352
-1 votes
0 answers
11 views

Ignoring in resulting XML for webservice fields that are nullified as a result of adapter call

I'm creating a webservice using Apache CXF. In my webservice methods I need to keep some legacy logic, meaning that for some fields and read operations, if value retrieved from DB is 0, the ...
mitrue's user avatar
  • 61
0 votes
0 answers
17 views

Removing ns2 and xmlns from xml output when marshalling with JAXB

In java i'm doing the following conversion: json -> POJO with Jackson POJO -> xml with JAXB The problem I encounter when validating the xml based upon xsd's is it throws an error because of the ...
Iljaas Dhonre's user avatar
0 votes
1 answer
23 views

How to add schemaLocation to XML element when marshalling using Jaxb2Marshaller?

I'm currently trying to realize an Open Archives Harvesting compliant service, using Spring Boot 3 / Java 17. The protocol is XML-based and so I generate Java classes from OAI-PMH.xsd (and others) and ...
Christoph Dahlen's user avatar
-1 votes
0 answers
58 views

Unmarshaller in Java 17 results in null response

I need to upgrade my app from Java 8 to Java 17. We have some unmarshallers using JaxbContext JAXBContext jaxbContext = JAXBContext.newInstance(Order.class); Unmarshaller ...
Alok Kumar's user avatar
1 vote
1 answer
64 views

JAXB generated classes not seeing their own dependencies in IntelliJ IDEA

I have a maven project that auto generates some classes using the JAXB plugin in the POM. Everything in the project works fine, the project builds correctly, and runs without any issues, however ...
paul frith's user avatar
0 votes
0 answers
30 views

Generating Java classes from XSD with enumeration containing non-ascii values

Using Java 17 and Gradle-plugin com.github.bjornvester.xjc' version '1.8.2 I want to generate java classes from an XSD schema. The java classes is to be used for values read from database. The values ...
StarMcSnow's user avatar
0 votes
1 answer
53 views

Async methods throws "Implementation of JAXB-API has not been found on module path or classpath"

I have a project based on java 17 and springboot 3. Recently I added an async method to the project. The async configuration class is the following: @Configuration @EnableAsync public class ...
Vincent's user avatar
  • 105
-1 votes
1 answer
33 views

Jaxb timestamp xmlAdapter not working while unmarshalling

I'm trying to unmarshall the given XML to the java object, everything except from the timestamp is populating. I wrote a custom xmlAdapter to parse the timestamp, but while debugging, it never stops ...
Lucky's user avatar
  • 807
0 votes
1 answer
76 views

Exception with Jackson-Module-Jaxb-Annotation when upgrading to Jakarta EE

i am trying to upgrade my application from JEE 8 to Jakarta EE. When I am starting the application, it is throwing this exception with Jackson-Module-Jaxb-Annotations-2.17.1 trying to use the old ...
Michael Stirling's user avatar
0 votes
0 answers
24 views

nilReason cannot be populated while parsing xml with jaxb if nil=true

I have an application developed with Quarkus framework with Java 17. I am parsing xml messages like this with jaxb library <xm:temperature uom="N/A" nilReason="http://codes.wmo.int/...
Fatih Polatlı's user avatar
0 votes
1 answer
12 views

contextPath is not allowed to appear in element oxm:jaxb2-marshaller, when upgrading to Spring Framework 5

Background Upgrading from Spring Framework 4.3.30.RELEASE to 5.0.20.RELEASE Using oxm:jaxb2-marshaller Problem After upgrading the Spring Framework dependency version, the application fails to start ...
Kenny Linsky's user avatar
  • 1,776
0 votes
0 answers
33 views

Java 8 - JAXB: Unmarshalling generics and element with same name

I'm querying several endpoints of an API that returns XML data. The XML returned by the various endpoints are very similar to each other, with the exception of the name of one element (simplified ...
Charles's user avatar
  • 63

15 30 50 per page
1
2 3 4 5
745