users@jersey.java.net

Cannot Instantiate new provider

From: Jonathan Cook - FM&T <Jonathan.Cook2_at_bbc.co.uk>
Date: Fri, 19 Jun 2009 11:51:57 +0100

Hi,
 
I have a problem were I have written my own FreeMarkerTemplateProcessor.
Everything works nicely but when I deploy my application it registers
the new provider successfully but then it complains that it can't
instantiate the new class and then goes on to fail I assume because it
can't do the freemarker initialisation.
 
19-Jun-2009 11:11:58 com.sun.ws.rest.api.core.PackagesResourceConfig
init
INFO: Provider classes found:
  class
com.bbc.newsi.feeds.sport.webservice.providers.FreemarkerTemplateProcess
or
19-Jun-2009 11:11:58
com.sun.ws.rest.impl.application.ComponentProviderCache get
Component
WARNING: The provider class, class
com.bbc.newsi.feeds.sport.webservice.provider
s.FreemarkerTemplateProcessor, could not be instantiated
2009-06-19 11:11:58.110::WARN: /football/includepathgenerator:
java.io.IOExcept
ion: The template name, /include_path_generator.ftl, could not be
resolved to th
e path of a template
 
Should I have a default constructor explicitly in the class? Is there
some condition when accessing the application remotely that the
templateprocessor won't get instantiated because as I say it all works
locally? I'm using an embedded instance of jetty as the web server.
 
I'm using the following annotations at the top of the class:
@Provider
@Singleton
 
Any ideas?
 
Thanks
Jonathan