Uploaded image for project: 'Help-Desk'
  1. Help-Desk
  2. HELP-4315

FIWARE.Question.Tech.Data.OrionContextBroker.ErrorWithResponseOfOrionCBInEclipse

    Details

      Description

      Created question in FIWARE Q/A platform on 23-03-2015 at 23:03
      Please, ANSWER this question AT http://stackoverflow.com/questions/29221901/error-with-the-response-of-orion-in-eclipse

      Question:
      Error with the response of Orion in Eclipse

      Description:
      I am developing under an example (ExampleClient.zip) I dowloand from http://catalogue.fi-ware.eu/sites/default/files/storage/enablers/ExampleClient.zip

      But I have some problems with this error

      Exception in thread "main" org.apache.xmlbeans.XmlException: error: Unexpected end of file after null
      at org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java:3511)
      at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1277)
      at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1264)
      at org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:345)
      at noNamespace.UpdateContextSubscriptionResponseDocument$Factory.parse(UpdateContextSubscriptionResponseDocument.java:71)
      at com.sap.research.fiware.ngsi10.test.server.exampleclient.ExampleClient.main(ExampleClient.java:92)
      Caused by: org.xml.sax.SAXParseException; systemId: file:; lineNumber: 1; columnNumber: 1; Unexpected end of file after null
      at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.reportFatalError(Piccolo.java:1038)
      at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.parse(Piccolo.java:723)
      at org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java:3479)
      ... 5 more

      this happend when I try to work with the Json Response of my Orion Context.

      String Addrres = "http://CENTOS-66.cloudapp.net:1026/version";
      URL url = new URL(Addrres);
      HttpURLConnection connection = (HttpURLConnection) url.openConnection();

      InputStream inputStream = connection.getInputStream();

      UpdateContextSubscriptionResponseDocument respDoc = UpdateContextSubscriptionResponseDocument.Factory.parse(inputStream);

      I print the response of my Orion and I realice there is a null and some /ln at the end of the json response that maybe produces this error and when I compare the characters of the response with connection.getContentLength() are not the same with the print of the response that i make, always 5 characters more.

      the XML response in this case is

      <orion>
      <version>0.19.0</version>
      <uptime>6 d, 23 h, 23 m, 42 s</uptime>
      <git_hash>1ad73b298cd261861203fbffb9c789f6ade2796d</git_hash>
      <compile_time>Wed Feb 11 13:00:19 CET 2015</compile_time>
      <compiled_by>fermin</compiled_by>
      <compiled_in>centollo</compiled_in>
      </orion>

      the error, It could be problem of the null of the response, or maybe i didn`t realice something.?

        Activity

          People

          • Assignee:
            fermin Fermín Galán
            Reporter:
            backlogmanager Backlog Manager
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: