Reputation: 6656
I'm using the RestEasy Client Framework and have a WARN
with the following code:
RegisterBuiltin.register(ResteasyProviderFactory.getInstance());
// [WARN] org.jboss.resteasy.logging.impl.Log4jLogger-103: NoClassDefFoundError:
// Unable to load builtin provider:
// org.jboss.resteasy.plugins.providers.DocumentProvider
According to GrepCode this class should be in resteasy-jaxrs
module. It's only a warning, but I have found only a few few hints to this on Google and wonder if I should ignore it or find a solution, since it is only a warning and not a CNFE. The code followings works without problems.
<dependencyManagement>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-bom</artifactId>
<version>2.3.1.GA</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxb-provider</artifactId>
</dependency>
</dependencies>
Upvotes: 1
Views: 4606
Reputation: 71
To avoid this warning try this:
public class SomeClass
{
static {ResteasyProviderFactory.setRegisterBuiltinByDefault(false);}
public static void main(String[] args) {}
}
Update According to http://docs.jboss.org/resteasy/2.0.0.GA/userguide/html/Migration_from_older_versions.html the method call RegisterBuiltin.register(ResteasyProviderFactory.getInstance());
is not needed anymore!
Upvotes: 2