The AbstractMethodError suggests that somehow you're getting a stub
ConverterHelper that doesn't implement the abstract score method. Make sure
you're using the Restlet J2EE edition and the servlet extension. Make sure
the Freemarker extension jar (and the Freemarker jar) are on your servlet's
classpath. (Make sure you're using the correct version of Freemarker for
the extension, too, but I don't think that's the problem.)

I wrote a blog entry about writing Restlet components that can be run both
standalone and as servlets. It's specifically geared to Elastic Beanstalk
deployments, and it depends on Guice heavily, but the ideas are applicable
in general.

http://tembrel.blogspot.com/2012/01/deploying-restlet-components-in-elastic.html

--tim

On Thu, Feb 2, 2012 at 11:04 AM, Domnic <saviodom...@yahoo.com> wrote:

> Hi there,
> I am trying to use a Freemaker template with a restlet Resource. this runs
> fine on local host i.e. on a standalone java. But when I try to export a
> WAR out of it.I get the following error while deployment.
>
> WARNING: Exception or error caught in server resource
> java.lang.AbstractMethodError:
> org.restlet.engine.converter.ConverterHelper.score(Ljava/lang/Object;Lorg/restlet/representation/Variant;Lorg/restlet/resource/Resource;)F
>        at
> org.restlet.engine.converter.ConverterUtils.getBestHelper(ConverterUtils.java:137)
>        at
> org.restlet.service.ConverterService.toRepresentation(ConverterService.java:229)
>        at org.restlet.resource.Resource.toRepresentation(Resource.java:738)
>        at
> org.restlet.resource.ServerResource.doHandle(ServerResource.java:509)
>        at org.restlet.resource.ServerResource.get(ServerResource.java:695)
>        at org.restlet.resource.ServerResource.head(ServerResource.java:977)
>        at
> org.restlet.resource.ServerResource.doHandle(ServerResource.java:587)
>        at
> org.restlet.resource.ServerResource.doNegotiatedHandle(ServerResource.java:637)
>        at
> org.restlet.resource.ServerResource.doConditionalHandle(ServerResource.java:336)
>        at
> org.restlet.resource.ServerResource.handle(ServerResource.java:899)
>        at org.restlet.resource.Finder.handle(Finder.java:243)
>        at org.restlet.routing.Filter.doHandle(Filter.java:156)
>        at org.restlet.routing.Filter.handle(Filter.java:203)
>        at org.restlet.routing.Router.doHandle(Router.java:428)
>        at org.restlet.routing.Router.handle(Router.java:645)
>        at org.restlet.routing.Filter.doHandle(Filter.java:156)
>        at org.restlet.routing.Filter.handle(Filter.java:203)
>        at org.restlet.routing.Filter.doHandle(Filter.java:156)
>        at org.restlet.routing.Filter.handle(Filter.java:203)
>        at org.restlet.routing.Filter.doHandle(Filter.java:156)
>        at
> org.restlet.engine.application.StatusFilter.doHandle(StatusFilter.java:151)
>        at org.restlet.routing.Filter.handle(Filter.java:203)
>        at org.restlet.routing.Filter.doHandle(Filter.java:156)
>        at org.restlet.routing.Filter.handle(Filter.java:203)
>        at
> org.restlet.engine.CompositeHelper.handle(CompositeHelper.java:208)
>        at
> org.restlet.engine.application.ApplicationHelper.handle(ApplicationHelper.java:81)
>        at org.restlet.Application.handle(Application.java:378)
>        at org.restlet.routing.Filter.doHandle(Filter.java:156)
>        at org.restlet.routing.Filter.handle(Filter.java:203)
>        at org.restlet.routing.Router.doHandle(Router.java:428)
>        at org.restlet.routing.Router.handle(Router.java:645)
>        at org.restlet.routing.Filter.doHandle(Filter.java:156)
>        at org.restlet.routing.Filter.handle(Filter.java:203)
>        at org.restlet.routing.Router.doHandle(Router.java:428)
>        at org.restlet.routing.Router.handle(Router.java:645)
>        at org.restlet.routing.Filter.doHandle(Filter.java:156)
>        at org.restlet.routing.Filter.handle(Filter.java:203)
>        at
> org.restlet.engine.CompositeHelper.handle(CompositeHelper.java:208)
>        at org.restlet.Component.handle(Component.java:389)
>        at org.restlet.Server.handle(Server.java:513)
>        at org.restlet.engine.ServerHelper.handle(ServerHelper.java:69)
>        at
> org.restlet.engine.adapter.HttpServerHelper.handle(HttpServerHelper.java:149)
>        at
> org.restlet.ext.servlet.ServerServlet.service(ServerServlet.java:1086)
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>        at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>        at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>        at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
>        at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
>        at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
>        at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>        at
> org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:647)
>        at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>        at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
>        at
> org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:864)
>        at
> org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
>        at
> org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1665)
>        at java.lang.Thread.run(Thread.java:636)
>
>
> My web.xml looks like
>
>
>        <context-param>
>                <param-name>org.restlet.application</param-name>
>                <param-value>com.aws.resource.AlertApplication</param-value>
>        </context-param>
>
>        <servlet>
>                <servlet-name>ServerServlet</servlet-name>
>
>  <servlet-class>org.restlet.ext.servlet.ServerServlet</servlet-class>
>                <init-param>
>             <param-name>org.restlet.clients</param-name>
>             <param-value>HTTP CLAP</param-value>
>         </init-param>
>        </servlet>
>        <servlet-mapping>
>                <servlet-name>ServerServlet</servlet-name>
>                <url-pattern>/*</url-pattern>
>        </servlet-mapping>
> </web-app>
>
>
>
> could some one guide me thru this.. esp. in relation to servlet deployment
> on tomcat ?
> thanks
> Domnic
>
> ------------------------------------------------------
>
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2917527
>

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2917534

Reply via email to