Hello Jerome,
I've just tried it with the libraries you have provide, and it still doesn't 
work :(

My steps were:
- change the libraries on the eclipse project so I have the following:
 On the Reference libraries of the eclipse:
   -org.restlet.jar (from jee)
   -org.restlet.ext.gwt.jar (from jee)
   -org.restlet.ext.servlet.jar (from jee)
   -org.restlet.jar (from gwt)
   -RestTestServer.jar (compiled from the Netbeans project, to allow the use of 
the Contact object)

 On the war/WEB-INF
   -org.restlet.jar (from gwt)
   -org.restlet.gwt.jar (from jee)
   -org.restlet.ext.servlet.jar (from jee)
  
-Changed the libraries on the netbeans project (the one which runs the restlet 
rest server)
  In this project I have had to remove the use of the simple framework (as it 
is not available on the jee edition) and run it with the embebed restlet server.
  So the libraries that I have now on the netbeans is just the org.restlet.jar 
(from the jee edition)

If I start the netbeans server and then the eclipse web app. When I try to 
retrieve the contact resource from the client (/contacts/123) I receive the 
following error on the eclipse:

Información: Redirecting via client dispatcher to: 
http://localhost:8112/contacts/123
mar 22, 2012 9:00:37 PM org.restlet.engine.log.LogFilter afterHandle
Información: 2012-03-22 21:00:37        127.0.0.1       -       /127.0.0.1      
8112    GET     /contacts/123   -       200     -       0       79      
http://127.0.0.1:8888   Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.11 
(KHTML, like Gecko) Chrome/17.0.963.79 Safari/535.11 
http://127.0.0.1:8888/TestGWTRestlet.html?gwt.codesvr=127.0.0.1:9997

Internal Server Error (500) - Can't parse the enclosed entity because of its 
media type. Expected <application/x-java-serialized-object+gwt> but was 
<application/x-java-serialized-object>. Make sure you have added the 
org.restlet.client.ext.gwt.jar file to your server.

As I didn't know if the org.restlet.gwt.jar must be also on the netbeans 
project. I added it to test and then the error changes and I receive the 
following
On the eclipse webclient server:
[ERROR] 500 - GET /contacts/123 (127.0.0.1) 451 bytes
   Request headers
      Host: 127.0.0.1:8888
      Connection: keep-alive
      User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.11 (KHTML, 
like Gecko) Chrome/17.0.963.79 Safari/535.11
      Accept: application/x-java-serialized-object+gwt
      Accept-Encoding: gzip,deflate,sdch
      Accept-Language: es,en-US;q=0.8,en;q=0.6,en-GB;q=0.4
      Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
      Referer: 
http://127.0.0.1:8888/TestGWTRestlet.html?gwt.codesvr=127.0.0.1:9997
   Response headers
      Content-Location: http://localhost:8112/contacts/123
      Date: Thu, 22 Mar 2012 20:04:00 GMT
      Accept-Ranges: bytes
      Server: Restlet-Framework/2.1snapshot
      Content-Type: text/html; charset=UTF-8
      Content-Length: 451
      Vary: Accept-Charset, Accept-Encoding, Accept-Language, Accept
Internal Server Error (500) - Internal Server Error

On the netbeans server output:
Advertencia: Exception or error caught in server resource
java.lang.NoClassDefFoundError: 
com/google/gwt/user/server/rpc/SerializationPolicyProvider
        at 
org.restlet.ext.gwt.GwtConverter.toRepresentation(GwtConverter.java:165)
        at 
org.restlet.service.ConverterService.toRepresentation(ConverterService.java:263)
        at org.restlet.resource.Resource.toRepresentation(Resource.java:741)
        at org.restlet.resource.ServerResource.doHandle(ServerResource.java:513)
        at org.restlet.resource.ServerResource.get(ServerResource.java:699)
        at org.restlet.resource.ServerResource.doHandle(ServerResource.java:581)
        at 
org.restlet.resource.ServerResource.doNegotiatedHandle(ServerResource.java:641)
        at 
org.restlet.resource.ServerResource.doConditionalHandle(ServerResource.java:340)
        at org.restlet.resource.ServerResource.handle(ServerResource.java:929)
        at org.restlet.resource.Finder.handle(Finder.java:246)
        at org.restlet.routing.Filter.doHandle(Filter.java:159)
......

So I move on and make a last test: I've added the com.google.gwt.server.jar 
from the jee package to the netbeans library path, althought the included is 
the version for the gwt 2.3 and I'm using the gwt 2.4 on the eclipse project.
Now when I try to retrieve the resource, it doesn't fail, but after a long 
time, a null contact is returned (maybe caused by the use of the embedded 
server on netbeans instead of the simple framework?)  So I'm back to the square 
one.

I hope this test could help you. Probably some of then were unnecessary if the 
correct libraries are on the correct paths. However as I'm using a redirector, 
the documentation available doesn't make clear were the libraries should be.
Please, let me know what is the correct scenario, and if I need to make more 
test to make this work.

Thank you in advance.
Best regards
Gabriel Pulido

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

Reply via email to