1

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>
Thor
  • 6,607
  • 13
  • 62
  • 96

1 Answers1

2

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!

Thor
  • 6,607
  • 13
  • 62
  • 96
uzvar
  • 71
  • 1
  • 5
  • 2
    Hi, and welcome to SO! When providing an answer, it is _always_ a good idea to provide supporting links for your answers. – Brian Apr 23 '13 at 23:02
  • Thanks for your answer and welcome to SO! This targets me to http://docs.jboss.org/resteasy/2.0.0.GA/userguide/html/Migration_from_older_versions.html where it is mentioned that the call of `RegisterBuiltin.register(ResteasyProviderFactory.getInstance())` is not needed anymore! – Thor Apr 24 '13 at 00:30