Hello Thilo,

it seems you are mixing the httpclient extension of Restlet 1.1 and the 
api of Restlet 1.0...
Could you check that you get the right java archives?



Best regards,
Thierry Boileau
--
Restlet ~ Core developer ~ http://www.restlet.org
Noelios Technologies ~ Co-founder ~ http://www.noelios.com
> Hello together,
> currently I´m "fighting" with restlet to connect our database resources via
> url to the web. I want to run the service in the  tomcat container. Without
> tomcat I can use the apache httpclient to connect to a url. In tomcat the
> same code does not work anymore. I don´t know what dependencies are not
> fullfilled. If I use the httpclient directly everything works fine but it´s
> not as elegant in comparison to the http client in restlet api. The code is
> quite simple:
>
> ...getRepresentation(...)
>
> Client client = new Client(Protocol.HTTP);
> Response response = client.get(url);
> in comparison to
>     HttpClient httpClient = new HttpClient();
>     GetMethod getMetadataRequest = new GetMethod(url);
>         try {
>             httpClient.executeMethod(getMetadataRequest);
>             BufferedReader in = new BufferedReader(new InputStreamReader(
>                     getMetadataRequest.getResponseBodyAsStream()));
>         } catch (HttpException e)
>             e.printStackTrace();
>         } catch (IOException e) {
>             e.printStackTrace();
>         }
>
> ... do some data transformation
> return representation
>
> I included all the necessary jars regarding the readme.txt:
> c.n.r.e.httpclient,c.n.r.e.servlet,c.n.restlet,common-logging,javax.servlet,log4j,o.a.c.codec,o.a.c.httpclient,o.a.c.logging,o,restlet,postgresql,spring
>
> Thanks in advance,
>  Thilo
>
> 03.12.2008 16:30:08 com.noelios.restlet.StatusFilter getStatus
> SCHWERWIEGEND: Unhandled exception or error intercepted
> java.lang.NoSuchMethodError:
> com.noelios.restlet.ext.httpclient.HttpClientHelper.getHelpedParameters()Lorg/restlet/util/Series;
>     at
> com.noelios.restlet.ext.httpclient.HttpClientHelper.getMaxConnectionsPerHost(HttpClientHelper.java:185)
>     at
> com.noelios.restlet.ext.httpclient.HttpClientHelper.start(HttpClientHelper.java:261)
>     at org.restlet.Client.start(Client.java:118)
>     at org.restlet.Restlet.init(Restlet.java:123)
>     at org.restlet.Client.handle(Client.java:108)
>     at org.restlet.Uniform.handle(Uniform.java:97)
>     at org.restlet.Uniform.get(Uniform.java:74)
>     at
> de.dlr.caf.wisdom.system.web.rest.Metadata.getRepresentation(Metadata.java:72)
>     at org.restlet.resource.Resource.handleGet(Resource.java:415)
>     at org.restlet.Finder.handle(Finder.java:292)
>     at org.restlet.Filter.doHandle(Filter.java:105)
>     at org.restlet.Filter.handle(Filter.java:134)
>     at org.restlet.Router.handle(Router.java:444)
>     at org.restlet.Filter.doHandle(Filter.java:105)
>     at org.restlet.Filter.handle(Filter.java:134)
>     at org.restlet.Filter.doHandle(Filter.java:105)
>     at com.noelios.restlet.StatusFilter.doHandle(StatusFilter.java:87)
>     at org.restlet.Filter.handle(Filter.java:134)
>     at org.restlet.Filter.doHandle(Filter.java:105)
>     at org.restlet.Filter.handle(Filter.java:134)
>     at
> com.noelios.restlet.application.ApplicationHelper.handle(ApplicationHelper.java:96)
>     at org.restlet.Application.handle(Application.java:293)
>     at org.restlet.Filter.doHandle(Filter.java:105)
>     at org.restlet.Filter.handle(Filter.java:134)
>     at org.restlet.Router.handle(Router.java:444)
>     at org.restlet.Filter.doHandle(Filter.java:105)
>     at org.restlet.Filter.handle(Filter.java:134)
>     at org.restlet.Router.handle(Router.java:444)
>     at org.restlet.Filter.doHandle(Filter.java:105)
>     at com.noelios.restlet.StatusFilter.doHandle(StatusFilter.java:87)
>     at org.restlet.Filter.handle(Filter.java:134)
>     at org.restlet.Filter.doHandle(Filter.java:105)
>     at org.restlet.Filter.handle(Filter.java:134)
>     at
> com.noelios.restlet.component.ComponentHelper.handle(ComponentHelper.java:118)
>     at org.restlet.Component.handle(Component.java:230)
>     at org.restlet.Server.handle(Server.java:281)
>     at com.noelios.restlet.ServerHelper.handle(ServerHelper.java:99)
>     at
> com.noelios.restlet.http.HttpServerHelper.handle(HttpServerHelper.java:94)
>     at
> com.noelios.restlet.ext.servlet.ServerServlet.service(ServerServlet.java:397)
>     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:128)
>     at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>     at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>     at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
>     at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
>     at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
>     at
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
>     at java.lang.Thread.run(Thread.java:595)
> 03.12.2008 16:30:08 com.noelios.restlet.LogFilter afterHandle
>
>

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

Reply via email to