MessageBodyWriter not found for media type=application/xml

See original GitHub issue

Getting org.glassfish.jersey.message.internal.MessageBodyProviderNotFoundException: MessageBodyWriter not found for media type=application/xml, type=class java.util.ArrayList, genericType=class java.util.ArrayList when running java-jersey2 with application/xml response.

I tried to add

<dependency>
            <groupId>org.glassfish.jersey.media</groupId>
            <artifactId>jersey-media-jaxb</artifactId>
            <version>2.19</version>
        </dependency>

to pom.xml with no luck.

What am I missing here?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
sameenap1247096commented, Aug 27, 2021

I am also facing the same issue now, SEVERE: MessageBodyWriter not found for media type=application/xml, type=class com.sam.demo.Alien, genericType=class com.sam.demo.Alien. I am new to these concepts and learning now, van you please help me? @mar612

0reactions
Mukul-Vcommented, Oct 26, 2021

here is the same issue anybody there to suggest the right way to make it clear

Read more comments on GitHub >

github_iconTop Results From Across the Web

MessageBodyWriter not found for media type=application/xml ...
as say @Paul Samsotha, it solve this problem for me, I append in pom.xml this: <dependency> <groupId>org.glassfish.jersey.media</groupId> ...
Read more >
[SOLVED] MessageBodyWriter not found for media type ...
The error MessageBodyWriter not found for media type=application/json typically indicates that there is a problem with the way you are trying to serialize...
Read more >
MessageBodyWriter not found for media type=application/xml
Hi everyone, I am struggling to return a xml response from an endpoint. I only have experience with json responses and my annotations...
Read more >
REST Service fails with MessageBodyWriter not found
It is a simple Java EE 8 application using JAX-RS. ... MessageBodyWriter not found for media type=application/xml, type=class java.util.
Read more >
[Jersey] Getting MessageBodyWriter not found for media type ...
... MessageBodyWriter not found for media type=application/json Error ... Java object (Annotated with @XmlRootElement) should automatically ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found