abdera-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Arjun Sharma" <toar...@gmail.com>
Subject Not able to POST in the employee example
Date Mon, 26 May 2008 07:33:06 GMT
Hi
I am trying to work with the Employee example of Abdera Servlet. GET method
works fine. But when i try to POST or PUT I am getting the following
exceptions:

     [java] Method:    POST
     [java] May 26, 2008 12:57:31 PM
org.apache.abdera.protocol.server.impl.Abst
ractCollectionAdapter createErrorResponse
     [java] INFO: A ResponseException was thrown.
     [java]
org.apache.abdera.protocol.server.context.ResponseContextException
     [java]     at
org.apache.abdera.protocol.server.impl.AbstractCollectionAdap
ter.getEntryFromRequest(AbstractCollectionAdapter.java:247)
     [java]     at
org.apache.abdera.protocol.server.impl.AbstractEntityCollecti
onAdapter.postEntry(AbstractEntityCollectionAdapter.java:142)
     [java]     at
org.apache.abdera.protocol.server.impl.AbstractProvider.proce
ss(AbstractProvider.java:147)
     [java]     at
org.apache.abdera.protocol.server.FilterChain.next(FilterChai
n.java:42)
     [java]     at
org.apache.abdera.protocol.server.servlet.AbderaServlet.servi
ce(Unknown Source)
     [java]     at
javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
     [java]     at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.
java:487)
     [java]     at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandle
r.java:367)
     [java]     at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandle
r.java:181)
     [java]     at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandle
r.java:712)
     [java]     at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrappe
r.java:139)
     [java]     at org.mortbay.jetty.Server.handle(Server.java:285)
     [java]     at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection
.java:502)
     [java]     at
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpC
onnection.java:835)
     [java]     at
org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:641)
     [java]     at
org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:2
08)
     [java]     at
org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:3
78)
     [java]     at
org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketCo
nnector.java:226)
     [java]     at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedTh
readPool.java:442)
     [java] Caused by: org.apache.abdera.parser.ParseException:
javax.xml.stream
.XMLStreamException: ParseError at [row,col]:[2,18]
     [java] Message: XML document structures must start and end within the
same
entity.
     [java]     at
org.apache.abdera.parser.stax.FOMBuilder.next(FOMBuilder.java
:260)
     [java]     at
org.apache.axiom.om.impl.llom.OMElementImpl.getNextOMSibling(
OMElementImpl.java:265)
     [java]     at
org.apache.axiom.om.impl.traverse.OMChildrenIterator.next(OMC
hildrenIterator.java:106)
     [java]     at
org.apache.abdera.parser.stax.FOMDocument.clone(FOMDocument.j
ava:229)
     [java]     at
org.apache.abdera.protocol.server.impl.AbstractCollectionAdap
ter.getEntryFromRequest(AbstractCollectionAdapter.java:245)
     [java]     ... 18 more
     [java] Caused by: javax.xml.stream.XMLStreamException: ParseError at
[row,c
ol]:[2,18]
     [java] Message: XML document structures must start and end within the
same
entity.
     [java]     at
com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.n
ext(XMLStreamReaderImpl.java:588)
     [java]     at
org.apache.abdera.parser.stax.FOMBuilder.getNextElementToPars
e(FOMBuilder.java:163)
     [java]     at
org.apache.abdera.parser.stax.FOMBuilder.next(FOMBuilder.java
:187)
     [java]     ... 22 more


My entry.xml which contains the entry to POST is:
<?xml version="1.0"?>
<entry><link href="/employee/3-Third_Employee"
rel="edit"></link><id>feed-3</id><title type="text">3
Employee</title><updated>2008-05-26T05:49:03.453Z</updated><author><name>Acme
Industries</name></author><content type="text">Third
Employee</content></entry>

-- 
Arjun Sharma S

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message