SocketM
SocketM

Reputation: 574

The currently selected JAXB library provider is invalid

I'm using Elipse Neon with JDK 1.8 and run time environment GlassFish 4.1. I have tried to add to my project facet configuration JAXB 2.2 however I'm getting the error: The currently selected JAXB library provider is invalid.

What I can do, or what library I should use in order to use JAXB configuration. Additionally I mention that I'm using JAXB for a JAX-RS project with Jersey implementation (natively build into Glassfish)

Regards,

Upvotes: 2

Views: 6055

Answers (2)

Ravi
Ravi

Reputation: 31437

JAX-RS supports the automatic creation of XML and JSON via JAXB. You are NOT require to explicitly add any jars as part of JAXB configuration.

Upvotes: 0

Mike
Mike

Reputation: 4963

JAXB is present in GlassFish, you do not need to add it. For GlassFish 4.1, just add the Java EE 7.0 full profile as a provided dependency so that you can develop with all the APIs, knowing they will be there when you deploy your WAR:

<dependency>
    <groupId>javax</groupId>
    <artifactId>javaee-api</artifactId>
    <version>7.0</version>
    <scope>provided</scope>
</dependency>

Upvotes: 1

Related Questions