RE: gwt compiler can

2012-02-02 Thread Tomasz Kaczynski
Hmm, 
the error was generated from my misguided attempt to use the FormDtaSet class 
in the client. The GWT compiler properly reported error and the .html package 
didn't provide to be inherited in GWT because it was meant for Server. The code 
in question runs on Server just fine. 

--tomekka

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


RE: UriBuilder encoding

2012-02-02 Thread Thomas Mortagne
From what I understood this method is supposed to add a new segment and not
replace the {somevar}.

--
View this message in context: 
http://restlet-discuss.1400322.n2.nabble.com/UriBuilder-encoding-tp7230131p7246398.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.

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


RE: Re: reg TokenBuffer

2012-02-02 Thread Domnic
Hello Thierry and Tim,
thanks you for your support. The example works like a gem. Yes Tim is right, 
When I include the Jackson 1.5 it is better. I am not getting this error.
thanks
Domnic

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


AWS and Freemaker + Restlet

2012-02-02 Thread Domnic
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-nameorg.restlet.application/param-name
param-valuecom.aws.resource.AlertApplication/param-value
/context-param

servlet
   

Re: AWS and Freemaker + Restlet

2012-02-02 Thread Tim Peierls
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)

RE: Re: AWS and Freemaker + Restlet

2012-02-02 Thread Domnic
Hello Tim,
Thanks for your reply. I have to learn Guice and follow up your code.. I will 
try that ASAP. meanwhile I tried the manual way... when I export a standalone 
restlet application into a war..and deploy in aws, it works.. but the moment I 
try to use the freemaker.. I get the errors. I rechecked the jars...and 
imported them in the WEB/lib folder and referenced it in the class path. Now I 
get a different error..

java.lang.AbstractMethodError
at 
org.restlet.engine.converter.ConverterUtils.getBestHelper(ConverterUtils.java:137)
at 
org.restlet.service.ConverterService.toRepresentation(ConverterService.java:208)

it is at the converterUtils. do you think it is still the jars.or I am missing 
something on my web.xml..?

thanks
domnic

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


Re: Re: AWS and Freemaker + Restlet

2012-02-02 Thread Tim Peierls
You could try instrumenting getBestHelper so that it dumps the concrete
type of the ConverterHelper, ch, just before it tries to call the score
method.

It certainly sounds as though the Restlet Engine is not finding the
Freemarker extension in the classpath, but I don't know why that might be
happening.

--tim

On Thu, Feb 2, 2012 at 4:58 PM, Domnic saviodom...@yahoo.com wrote:

 Hello Tim,
 Thanks for your reply. I have to learn Guice and follow up your code.. I
 will try that ASAP. meanwhile I tried the manual way... when I export a
 standalone restlet application into a war..and deploy in aws, it works..
 but the moment I try to use the freemaker.. I get the errors. I rechecked
 the jars...and imported them in the WEB/lib folder and referenced it in the
 class path. Now I get a different error..

 java.lang.AbstractMethodError
at
 org.restlet.engine.converter.ConverterUtils.getBestHelper(ConverterUtils.java:137)
at
 org.restlet.service.ConverterService.toRepresentation(ConverterService.java:208)

 it is at the converterUtils. do you think it is still the jars.or I am
 missing something on my web.xml..?

 thanks
 domnic

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2917602


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