Re: V2. RC.3 : java.lang.NoSuchMethodError when POSTing xml

2012-02-22 Thread Thierry Boileau
Hi Guillaume,

this error Exception in thread main java.lang.NoClassDefFoundError:
com/google/gwt/user/client/rpc/IsSerializable is due to the missing
library com.sun.syndication.jar in your classpath. This library is shipped
with tthe Restlet in the lib directory.

this error Exception in thread main java.lang.NoClassDefFoundError:
com/google/gwt/user/client/rpc/IsSerializable is due to the missing
library  com.google.gwt.server.jar in your classpath. This library is
shipped with the Restlet in the lib/com.google.gwt.server directory.
But I think this class is already hosted by the gwt-servlet.jar archive...

Best regards,
Thierry Boileau

I've the same issue my war lib directory look like this

 appengine-api-1.0-sdk-1.6.2.jar
 appengine-api-labs-1.6.2.jar
 appengine-jsr107cache-1.6.2.jar
 c2dm-server.jar
 c2dm-server-src.jar
 datanucleus-appengine-1.0.10.final.jar
 datanucleus-core-1.1.5.jar
 datanucleus-jpa-1.1.5.jar
 geronimo-jpa_3.0_spec-1.1.1.jar
 geronimo-jta_1.1_spec-1.1.1.jar
 google_sql.jar
 gwt-servlet.jar
 javax.servlet.jar
 javax.xml.bind.jar
 javax.xml.stream.jar
 jdo2-api-2.3-eb.jar
 json-1.5.jar
 jsr107cache-1.1.jar
 org.codehaus.jackson.core.jar
 org.codehaus.jackson.mapper.jar
 org.json.jar
 org.restlet.ext.jackson.jar
 org.restlet.ext.json.jar
 org.restlet.ext.servlet.jar
 org.restlet.jar
 validation-api-1.0.0.GA.jar
 validation-api-1.0.0.GA-sources.jar

 An the exception

 Exception in thread main java.lang.NoClassDefFoundError: 
 com/google/gwt/user/client/rpc/IsSerializable
 at org.restlet.ext.gwt.GwtConverter.getVariants(GwtConverter.java:75)
 at 
 org.restlet.engine.converter.ConverterUtils.getVariants(ConverterUtils.java:93)
 at 
 org.restlet.service.ConverterService.getVariants(ConverterService.java:116)
 at 
 org.restlet.engine.resource.AnnotationInfo.getResponseVariants(AnnotationInfo.java:438)
 at 
 org.restlet.engine.resource.ClientInvocationHandler.invoke(ClientInvocationHandler.java:217)
 at $Proxy5.getUsers(Unknown Source)
 at com.youfood.client.Client.main(Client.java:23)

 or

 Exception in thread main java.lang.NoClassDefFoundError: 
 com/sun/syndication/feed/synd/SyndFeed
   at org.restlet.ext.rome.RomeConverter.getVariants(RomeConverter.java:76)
   at 
 org.restlet.engine.converter.ConverterUtils.getVariants(ConverterUtils.java:93)
   at 
 org.restlet.service.ConverterService.getVariants(ConverterService.java:116)
   at 
 org.restlet.engine.resource.AnnotationInfo.getResponseVariants(AnnotationInfo.java:438)
   at 
 org.restlet.engine.resource.ClientInvocationHandler.invoke(ClientInvocationHandler.java:217)
   at $Proxy7.retrieve(Unknown Source)
   at com.restletexample.Test.main(Test.java:18)

  Thierry Boileau wrote
  Hello, could you describe what are your needs? That is to says, the kind
 of Restlet extensions you need. Then, in each distribution, you can have a
 look at the /lib/readme.txt file. it lists extensions and their
 dependencies. Best regards, Thierry Boileau
 --
 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2702700


 --
 View this message in context: RE: V2. RC.3 : java.lang.NoSuchMethodError
 when POSTing 
 xmlhttp://restlet-discuss.1400322.n2.nabble.com/V2-RC-3-java-lang-NoSuchMethodError-when-POSTing-xml-tp5114202p7292103.html
 Sent from the Restlet Discuss mailing list 
 archivehttp://restlet-discuss.1400322.n2.nabble.com/at Nabble.com.


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

RE: V2. RC.3 : java.lang.NoSuchMethodError when POSTing xml

2012-02-16 Thread guillaume.m...@gmail.com
I've the same issue my war lib directory look like this

appengine-api-1.0-sdk-1.6.2.jar
appengine-api-labs-1.6.2.jar
appengine-jsr107cache-1.6.2.jar
c2dm-server.jar
c2dm-server-src.jar
datanucleus-appengine-1.0.10.final.jar
datanucleus-core-1.1.5.jar
datanucleus-jpa-1.1.5.jar
geronimo-jpa_3.0_spec-1.1.1.jar
geronimo-jta_1.1_spec-1.1.1.jar
google_sql.jar
gwt-servlet.jar
javax.servlet.jar
javax.xml.bind.jar
javax.xml.stream.jar
jdo2-api-2.3-eb.jar
json-1.5.jar
jsr107cache-1.1.jar
org.codehaus.jackson.core.jar
org.codehaus.jackson.mapper.jar
org.json.jar
org.restlet.ext.jackson.jar
org.restlet.ext.json.jar
org.restlet.ext.servlet.jar
org.restlet.jar
validation-api-1.0.0.GA.jar
validation-api-1.0.0.GA-sources.jar


An the exception 

Exception in thread main java.lang.NoClassDefFoundError:
com/google/gwt/user/client/rpc/IsSerializable
at org.restlet.ext.gwt.GwtConverter.getVariants(GwtConverter.java:75)
at
org.restlet.engine.converter.ConverterUtils.getVariants(ConverterUtils.java:93)
at
org.restlet.service.ConverterService.getVariants(ConverterService.java:116)
at
org.restlet.engine.resource.AnnotationInfo.getResponseVariants(AnnotationInfo.java:438)
at
org.restlet.engine.resource.ClientInvocationHandler.invoke(ClientInvocationHandler.java:217)
at $Proxy5.getUsers(Unknown Source)
at com.youfood.client.Client.main(Client.java:23)


or


Exception in thread main java.lang.NoClassDefFoundError:
com/sun/syndication/feed/synd/SyndFeed
at org.restlet.ext.rome.RomeConverter.getVariants(RomeConverter.java:76)
at
org.restlet.engine.converter.ConverterUtils.getVariants(ConverterUtils.java:93)
at
org.restlet.service.ConverterService.getVariants(ConverterService.java:116)
at
org.restlet.engine.resource.AnnotationInfo.getResponseVariants(AnnotationInfo.java:438)
at
org.restlet.engine.resource.ClientInvocationHandler.invoke(ClientInvocationHandler.java:217)
at $Proxy7.retrieve(Unknown Source)
at com.restletexample.Test.main(Test.java:18)



Thierry Boileau wrote
 
 Hello,
 
 could you describe what are your needs? That is to says, the kind of
 Restlet extensions you need. Then, in each distribution, you can have a
 look at the /lib/readme.txt file. it lists extensions and their
 dependencies.
 
 
 Best regards,
 Thierry Boileau
 
 --
 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2702700
 


--
View this message in context: 
http://restlet-discuss.1400322.n2.nabble.com/V2-RC-3-java-lang-NoSuchMethodError-when-POSTing-xml-tp5114202p7292103.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.

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

RE: V2. RC.3 : java.lang.NoSuchMethodError when POSTing xml

2011-02-07 Thread Thierry Boileau
Hello,

could you describe what are your needs? That is to says, the kind of Restlet 
extensions you need. Then, in each distribution, you can have a look at the 
/lib/readme.txt file. it lists extensions and their dependencies.


Best regards,
Thierry Boileau

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


RE: V2. RC.3 : java.lang.NoSuchMethodError when POSTing xml

2011-02-04 Thread farhan
Hello,

How did you solve the problem exactly? Which jar files do you have now in
your classpath? I added all the jars inside the lib directory i.e. the jars
included in the subdirectories too. Would the jars found only at the top
level of the directory do? Please help.

Thanks.
-- 
View this message in context: 
http://restlet-discuss.1400322.n2.nabble.com/V2-RC-3-java-lang-NoSuchMethodError-when-POSTing-xml-tp5114202p5991891.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.

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


V2. RC.3 : java.lang.NoSuchMethodError when POSTing xml

2010-05-28 Thread HT
Hi,

I get following error when trying to  consume an xml document passed via a 
POST. The error pops-up at following line: 

 SaxRepresentation xmldocument = new SaxRepresentation(entity);


FINE: Delegating the call to the target Restlet
28-mei-2010 20:28:59 org.restlet.service.ConverterService toObject
FINE: The following converter was selected for the [application/xml] 
representation: org.restlet.engine.converter.defaultconver...@e1ed5b
28-mei-2010 20:28:59 org.restlet.resource.UniformResource doCatch
INFO: Exception or error caught in resource
org.restlet.resource.ResourceException: 
org.restlet.representation.Representation.getLocationRef()Lorg/restlet/data/Reference;
 at org.restlet.resource.ServerResource.doHandle(ServerResource.java:410)

Caused by: java.lang.NoSuchMethodError: 
org.restlet.representation.Representation.getLocationRef()Lorg/restlet/data/Reference;
 at org.restlet.ext.xml.SaxRepresentation.init(SaxRepresentation.java:145)

Can someone help me please ?

H.

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


RE: V2. RC.3 : java.lang.NoSuchMethodError when POSTing xml

2010-05-28 Thread HT
I managed to solve the problem by copying all the *.jars I found in the V2RC3 
jar file and retry again (using Tomcat 6).

The error disappears but now I get another:

28-mei-2010 22:20:33 org.restlet.resource.UniformResource doCatch
WARNING: Exception or error caught in resource
java.lang.NoClassDefFoundError: com/sun/syndication/feed/synd/SyndFeed

I'm still missing a .jar file ?

Any help much appreciated.

H.

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


RE: V2. RC.3 : java.lang.NoSuchMethodError when POSTing xml

2010-05-28 Thread HT
Solved!

IT was a problem with too much / too many jar files.

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


Re: posting xml

2007-08-07 Thread Thierry Boileau

Hello matt,

I send you a very simple server/client application illustrating how to 
send a representation via post method.
I hope this will help you. (nb : as your code is quite similar, I think 
the truth is out there... Is your classpath all right?).


best regards,
Thierry Boileau


Does anyone have an example they'd be willing to share demonstrating how to
properly post an xml document to a restlet service?  I've been unsuccessful so
far with the following, as well as several other alternatives.  


StringRepresentation represent = new StringRepresentation(xmlString,
MediaType.APPLICATION_XML);
Client client = new Client(Protocol.HTTP);
Response response =
client.post(http://127.0.0.1:8080/Resources/api/department;, represent);


In general, I have yet to see anything show up on the service side. And the
client side throws the following error when trying the above:

Unable to complete the HTTP call due to a communication error with the remote
server. socket closed.

Thanks,
matt

  




testPost.jar
Description: Binary data


posting xml

2007-08-06 Thread matt
Does anyone have an example they'd be willing to share demonstrating how to
properly post an xml document to a restlet service?  I've been unsuccessful so
far with the following, as well as several other alternatives.  

StringRepresentation represent = new StringRepresentation(xmlString,
MediaType.APPLICATION_XML);
Client client = new Client(Protocol.HTTP);
Response response =
client.post(http://127.0.0.1:8080/Resources/api/department;, represent);


In general, I have yet to see anything show up on the service side. And the
client side throws the following error when trying the above:

Unable to complete the HTTP call due to a communication error with the remote
server. socket closed.

Thanks,
matt


Re: posting xml

2007-08-06 Thread Mark Rosenthal

Are you sure you want to post to port 8080?

matt wrote:

Does anyone have an example they'd be willing to share demonstrating how to
properly post an xml document to a restlet service?  I've been unsuccessful so
far with the following, as well as several other alternatives.  


StringRepresentation represent = new StringRepresentation(xmlString,
MediaType.APPLICATION_XML);
Client client = new Client(Protocol.HTTP);
Response response =
client.post(http://127.0.0.1:8080/Resources/api/department;, represent);


In general, I have yet to see anything show up on the service side. And the
client side throws the following error when trying the above:

Unable to complete the HTTP call due to a communication error with the remote
server. socket closed.

Thanks,
matt