Uploaded image for project: 'DSpace'
  1. DSpace
  2. DS-3310

HTTP 500 error in the SWORD v2 interface

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.3, 7.0
    • Component/s: None
    • Environment:


      *Location*: http://demo.dspace.org/
      *User-Agent*: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0 Iceweasel/38.8.0
      *Screen Resolution*: 1280 x 800
    • Attachments:
      0
    • Comments:
      10

      Description

      I tried to submit the following metadata to the demo.dspace.org via SWORD v2:

      <?xml version='1.0' encoding='UTF-8'?>
      <entry xmlns:dcterms="http://purl.org/dc/terms/" xmlns="http://www.w3.org/2005/Atom"><title>Provenance Circuits for Trees and Treelike Instances</title><id>paper/5</id><updated>2016-09-08T21:37:35.625185+00:00</updated><dcterms:title>Provenance Circuits for Trees and Treelike Instances</dcterms:title><dcterms:type>book-chapter</dcterms:type><dcterms:contributor>Antoine Amarilli</dcterms:contributor><dcterms:contributor>Pierre Bourhis</dcterms:contributor><dcterms:contributor>Pierre Senellart</dcterms:contributor><dcterms:identifier>10.1007/978-3-662-47666-6_5</dcterms:identifier></entry>

      http://demo.dspace.org/swordv2/collection/10673/2

      (with the credentials provided)

      Status code: 500 (expected 201)

      Server response:
      <html><head><title>Apache Tomcat/7.0.56 - Error report</title><style><!--H1

      {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}

      H2

      {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}

      H3

      {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}

      BODY

      {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;}

      B

      {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;}

      P

      {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}

      A

      {color : black;}

      A.name

      {color : black;}

      HR

      {color : #525D76;}

      -></style> </head><body><h1>HTTP Status 500 - org.apache.axiom.om.OMException: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '' (code 45) in prolog; expected '<'</h1><HR size="1" noshade="noshade"><p><b>type</b> Exception report</p><p><b>message</b> <u>org.apache.axiom.om.OMException: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '' (code 45) in prolog; expected '<'</u></p><p><b>description</b> <u>The server encountered an internal error that prevented it from fulfilling this request.</u></p><p><b>exception</b> <pre>org.apache.abdera.parser.ParseException: org.apache.axiom.om.OMException: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '' (code 45) in prolog; expected '<'
      at [row,col

      {unknown-source}]: [1,1]
      org.apache.abdera.parser.stax.FOMBuilder.next(FOMBuilder.java:96)
      org.apache.abdera.parser.stax.FOMBuilder.getFomDocument(FOMBuilder.java:117)
      org.apache.abdera.parser.stax.FOMParser.getDocument(FOMParser.java:79)
      org.apache.abdera.parser.stax.FOMParser.parse(FOMParser.java:191)
      org.apache.abdera.parser.stax.FOMParser.parse(FOMParser.java:124)
      org.apache.abdera.util.AbstractParser.parse(AbstractParser.java:65)
      org.swordapp.server.SwordAPIEndpoint.addDepositPropertiesFromEntry(SwordAPIEndpoint.java:355)
      org.swordapp.server.CollectionAPI.post(CollectionAPI.java:156)
      org.swordapp.server.servlets.CollectionServletDefault.doPost(CollectionServletDefault.java:48)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
      org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      </pre></p><p><b>root cause</b> <pre>org.apache.axiom.om.OMException: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '-' (code 45) in prolog; expected '<'
      at [row,col {unknown-source}

      ]: [1,1]
      org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:276)
      org.apache.abdera.parser.stax.FOMBuilder.next(FOMBuilder.java:93)
      org.apache.abdera.parser.stax.FOMBuilder.getFomDocument(FOMBuilder.java:117)
      org.apache.abdera.parser.stax.FOMParser.getDocument(FOMParser.java:79)
      org.apache.abdera.parser.stax.FOMParser.parse(FOMParser.java:191)
      org.apache.abdera.parser.stax.FOMParser.parse(FOMParser.java:124)
      org.apache.abdera.util.AbstractParser.parse(AbstractParser.java:65)
      org.swordapp.server.SwordAPIEndpoint.addDepositPropertiesFromEntry(SwordAPIEndpoint.java:355)
      org.swordapp.server.CollectionAPI.post(CollectionAPI.java:156)
      org.swordapp.server.servlets.CollectionServletDefault.doPost(CollectionServletDefault.java:48)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
      org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      </pre></p><p><b>root cause</b> <pre>com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '-' (code 45) in prolog; expected '<'
      at [row,col

      {unknown-source}

      ]: [1,1]
      com.ctc.wstx.sr.StreamScanner.throwUnexpectedChar(StreamScanner.java:639)
      com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2029)
      com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1114)
      org.apache.axiom.util.stax.wrapper.XMLStreamReaderWrapper.next(XMLStreamReaderWrapper.java:225)
      org.apache.axiom.util.stax.wrapper.XMLStreamReaderWrapper.next(XMLStreamReaderWrapper.java:225)
      org.apache.abdera.parser.stax.FOMStAXFilter.next(FOMStAXFilter.java:111)
      org.apache.axiom.om.impl.builder.StAXOMBuilder.parserNext(StAXOMBuilder.java:651)
      org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:189)
      org.apache.abdera.parser.stax.FOMBuilder.next(FOMBuilder.java:93)
      org.apache.abdera.parser.stax.FOMBuilder.getFomDocument(FOMBuilder.java:117)
      org.apache.abdera.parser.stax.FOMParser.getDocument(FOMParser.java:79)
      org.apache.abdera.parser.stax.FOMParser.parse(FOMParser.java:191)
      org.apache.abdera.parser.stax.FOMParser.parse(FOMParser.java:124)
      org.apache.abdera.util.AbstractParser.parse(AbstractParser.java:65)
      org.swordapp.server.SwordAPIEndpoint.addDepositPropertiesFromEntry(SwordAPIEndpoint.java:355)
      org.swordapp.server.CollectionAPI.post(CollectionAPI.java:156)
      org.swordapp.server.servlets.CollectionServletDefault.doPost(CollectionServletDefault.java:48)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
      org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      </pre></p><p><b>note</b> <u>The full stack trace of the root cause is available in the Apache Tomcat/7.0.56 logs.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/7.0.56</h3></body></html>

      Reporter: Antonin Delpeuch
      E-mail: antonin@delpeuch.eu

        Attachments

          Activity

            People

            Assignee:
            kshepherd Kim Shepherd
            Reporter:
            no-reply Anonymous (No Reply)
            Reviewer:
            Tim Donohue Tim Donohue
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: