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

FIWARE.Request.Tech.IoT.IoTDiscovery.ResponseError

    Details

    • Type: extRequest
    • Status: Closed
    • Priority: Major
    • Resolution: Done
    • Fix Version/s: 2021
    • Component/s: FIWARE-TECH-HELP
    • Labels:
      None

      Description

      Dear Sir or Madam,

      I tried to use IoTDiscovery with an example including in the IoT Guide
      manual
      and ai received always the same error. Do you know the reason. Is there any
      bug.
      Thank you in advance.

      Marinos Kardaris

      {
      "contextRegistrations": [
      {
      "entities": [

      { "type": "Room", "isPattern": "false", "id": "Room1" }

      ,

      { "type": "Room", "isPattern": "false", "id": "Room2" }

      ],
      "attributes": [

      { "name": "temperature", "type": "float", "isDomain": "false" }

      ,

      { "name": "pressure", "type": "integer", "isDomain": "false" }

      ],
      "providingApplication": "http://mysensors.com/Rooms"
      }
      ],
      "duration": "P1M"
      }

      I received the following error message
      <registerContextResponse><errorCode><code>400</code><reasonPhrase>Bad
      Request</reasonPhrase><details xmlns:xs="http://www.w3.org/2001/XMLSchema"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:type="xs:string">Error
      in XML structure</details></errorCode></registerContextResponse>


      Kardaris Marinos
      Systems Engineer - Aviation Expert

      Future Intelligence Ltd.
      Technological & Scientific Park of Attica "Lefkippos"
      NCSR Demokritos
      Branch: Scientific & Technological Park of Epirus
      University of Ioannina
      P: (+30) 2130417996 M: (+30)
      F: (+30) 2130021245
      mkardariss@f-in.gr <kanastasopoulos@f-in.gr>
      http://f-in.gr

      _______________________________________________
      Fiware-lab-help mailing list
      Fiware-lab-help@lists.fi-ware.org
      https://lists.fi-ware.org/listinfo/fiware-lab-help

      [Created via e-mail received from: mk <mkardaris@f-in.gr>]

        Activity

        Hide
        sandor Sándor Laki added a comment -

        Dear Marinos,

        For me it seems that you do not specified the content type in the http
        header of your post request. The default content type is XML in Orion,
        so please add the following headers to your request:
        Content-type: application/json
        Accept: application/json

        Please let me know if it solved the problem or if you have any further
        difficulties!

        Best,
        Sandor


        Sándor Laki
        EU FP7 FI-PPP XIFI project,
        Wigner Research Centre for Physics,
        Hungarian Academy of Sciences
        Konkoly Thege Miklós út 29-33.
        H-1121, Budapest, Hungary
        Cell: +36 70 374 2646
        Skype: sandor.laki

        XIFI: https://fi-xifi.eu/home.html
        FI-PPP: http://www.fi-ppp.eu/

        _______________________________________________
        Fiware-lab-help mailing list
        Fiware-lab-help@lists.fi-ware.org
        https://lists.fi-ware.org/listinfo/fiware-lab-help

        Show
        sandor Sándor Laki added a comment - Dear Marinos, For me it seems that you do not specified the content type in the http header of your post request. The default content type is XML in Orion, so please add the following headers to your request: Content-type: application/json Accept: application/json Please let me know if it solved the problem or if you have any further difficulties! Best, Sandor – Sándor Laki EU FP7 FI-PPP XIFI project, Wigner Research Centre for Physics, Hungarian Academy of Sciences Konkoly Thege Miklós út 29-33. H-1121, Budapest, Hungary Cell: +36 70 374 2646 Skype: sandor.laki XIFI: https://fi-xifi.eu/home.html FI-PPP: http://www.fi-ppp.eu/ _______________________________________________ Fiware-lab-help mailing list Fiware-lab-help@lists.fi-ware.org https://lists.fi-ware.org/listinfo/fiware-lab-help
        Hide
        sandor Sándor Laki added a comment -

        Dear Marinos,

        Could you please check the version number of your Orion instance?
        E.g.
        curl <cbhost>:1026/version

        Thanks,
        Sandor


        Sándor Laki
        EU FP7 FI-PPP XIFI project,
        Wigner Research Centre for Physics,
        Hungarian Academy of Sciences
        Konkoly Thege Miklós út 29-33.
        H-1121, Budapest, Hungary
        Cell: +36 70 374 2646
        Skype: sandor.laki

        XIFI: https://fi-xifi.eu/home.html
        FI-PPP: http://www.fi-ppp.eu/

        _______________________________________________
        Fiware-lab-help mailing list
        Fiware-lab-help@lists.fi-ware.org
        https://lists.fi-ware.org/listinfo/fiware-lab-help

        Show
        sandor Sándor Laki added a comment - Dear Marinos, Could you please check the version number of your Orion instance? E.g. curl <cbhost>:1026/version Thanks, Sandor – Sándor Laki EU FP7 FI-PPP XIFI project, Wigner Research Centre for Physics, Hungarian Academy of Sciences Konkoly Thege Miklós út 29-33. H-1121, Budapest, Hungary Cell: +36 70 374 2646 Skype: sandor.laki XIFI: https://fi-xifi.eu/home.html FI-PPP: http://www.fi-ppp.eu/ _______________________________________________ Fiware-lab-help mailing list Fiware-lab-help@lists.fi-ware.org https://lists.fi-ware.org/listinfo/fiware-lab-help
        Hide
        sandor Sándor Laki added a comment -

        Dear Marinos,

        Yes, you are right. It is not an Orion, and I tried and got the same
        error, suggesting that IoTDiscovery GE only supports XML format. I
        forward your request to the developers to check it.

        Best,
        Sandor


        Sándor Laki
        EU FP7 FI-PPP XIFI project,
        Wigner Research Centre for Physics,
        Hungarian Academy of Sciences
        Konkoly Thege Miklós út 29-33.
        H-1121, Budapest, Hungary
        Cell: +36 70 374 2646
        Skype: sandor.laki

        XIFI: https://fi-xifi.eu/home.html
        FI-PPP: http://www.fi-ppp.eu/

        _______________________________________________
        Fiware-lab-help mailing list
        Fiware-lab-help@lists.fi-ware.org
        https://lists.fi-ware.org/listinfo/fiware-lab-help

        Show
        sandor Sándor Laki added a comment - Dear Marinos, Yes, you are right. It is not an Orion, and I tried and got the same error, suggesting that IoTDiscovery GE only supports XML format. I forward your request to the developers to check it. Best, Sandor – Sándor Laki EU FP7 FI-PPP XIFI project, Wigner Research Centre for Physics, Hungarian Academy of Sciences Konkoly Thege Miklós út 29-33. H-1121, Budapest, Hungary Cell: +36 70 374 2646 Skype: sandor.laki XIFI: https://fi-xifi.eu/home.html FI-PPP: http://www.fi-ppp.eu/ _______________________________________________ Fiware-lab-help mailing list Fiware-lab-help@lists.fi-ware.org https://lists.fi-ware.org/listinfo/fiware-lab-help
        Hide
        sandor Sándor Laki added a comment -

        Dear Tarek,

        Please send your answer directly to the user via email: mkardaris@f-in.gr

        Many thanks,
        Sandor
        – level-1 support team

        Show
        sandor Sándor Laki added a comment - Dear Tarek, Please send your answer directly to the user via email: mkardaris@f-in.gr Many thanks, Sandor – level-1 support team
        Hide
        telsaleh Tarek Elsaleh added a comment -

        Hello Sandor, Marinos,
        Thank you for contacting us. I will check what is the problem and get back asap.

        Best regards,
        Tarek

        Show
        telsaleh Tarek Elsaleh added a comment - Hello Sandor, Marinos, Thank you for contacting us. I will check what is the problem and get back asap. Best regards, Tarek
        Hide
        telsaleh Tarek Elsaleh added a comment -

        Hi,
        I am not sure whether you have downloaded the package or got it running on FIWARE LAB.
        If you have downloaded then please find release 4.2 (available now) in the catalogue.
        If you are using FIWARE LAB, then please use the blueprint for automated deployment.

        You should now be able to send and receive JSON messages. Please make sure you set the "Content-type" in the header. Any further issues please let me know.

        Best regards,
        Tarek

        Show
        telsaleh Tarek Elsaleh added a comment - Hi, I am not sure whether you have downloaded the package or got it running on FIWARE LAB. If you have downloaded then please find release 4.2 (available now) in the catalogue. If you are using FIWARE LAB, then please use the blueprint for automated deployment. You should now be able to send and receive JSON messages. Please make sure you set the "Content-type" in the header. Any further issues please let me know. Best regards, Tarek
        Hide
        sandor Sándor Laki added a comment -

        Dear Marinos,

        We got the following reply from the developers:

        Hi,
        I am not sure whether you have downloaded the package or got it running on FIWARE LAB.
        If you have downloaded then please find release 4.2 (available now) in the catalogue.
        If you are using FIWARE LAB, then please use the blueprint for automated deployment.

        You should now be able to send and receive JSON messages. Please make sure you set the "Content-type" in the header. Any further issues please let me know.

        Best regards,
        Tarek

        I hope that it will work with the upgraded version...

        Best,
        Sandor


        Sándor Laki
        EU FP7 FI-PPP XIFI project,
        Wigner Research Centre for Physics,
        Hungarian Academy of Sciences
        Konkoly Thege Miklós út 29-33.
        H-1121, Budapest, Hungary
        Cell: +36 70 374 2646
        Skype: sandor.laki

        XIFI: https://fi-xifi.eu/home.html
        FI-PPP: http://www.fi-ppp.eu/

        _______________________________________________
        Fiware-lab-help mailing list
        Fiware-lab-help@lists.fi-ware.org
        https://lists.fi-ware.org/listinfo/fiware-lab-help

        Show
        sandor Sándor Laki added a comment - Dear Marinos, We got the following reply from the developers: Hi, I am not sure whether you have downloaded the package or got it running on FIWARE LAB. If you have downloaded then please find release 4.2 (available now) in the catalogue. If you are using FIWARE LAB, then please use the blueprint for automated deployment. You should now be able to send and receive JSON messages. Please make sure you set the "Content-type" in the header. Any further issues please let me know. Best regards, Tarek I hope that it will work with the upgraded version... Best, Sandor – Sándor Laki EU FP7 FI-PPP XIFI project, Wigner Research Centre for Physics, Hungarian Academy of Sciences Konkoly Thege Miklós út 29-33. H-1121, Budapest, Hungary Cell: +36 70 374 2646 Skype: sandor.laki XIFI: https://fi-xifi.eu/home.html FI-PPP: http://www.fi-ppp.eu/ _______________________________________________ Fiware-lab-help mailing list Fiware-lab-help@lists.fi-ware.org https://lists.fi-ware.org/listinfo/fiware-lab-help
        Hide
        telsaleh Tarek Elsaleh added a comment -

        Hi Tarek,

        Thank's a lot, this was the solution.

        I wish you a nice weekend
        Marinos

        2015-05-29 18:38 GMT+03:00 <t.elsaleh@surrey.ac.uk>:
        Hi Marinos,
        Please could you try this:

        http://askubuntu.com/questions/154953/specify-jdk-for-tomcat7

        Here you should explicitly specify the path for the Oracle Java JDK that tomcat will use. Then please make sure you restart tomcat7.

        Best regards,
        Tarek

        From: marinos kardaris marinoskardaris@gmail.com
        Sent: 29 May 2015 16:24
        To: Elsaleh T Mr (Electronic Eng)
        Subject: Re: IoTDiscovery

        Hi Tarek,

        I did all your suggestions but I still have the same problem.

        I found an explanation in the following link which suggest some steps. I don't know if it can help.

        http://stackoverflow.com/questions/22489398/unsupported-major-minor-version-52-0

        Best regards

        Marinos

        2015-05-28 17:06 GMT+03:00 <t.elsaleh@surrey.ac.uk>:
        Hi Marinos,
        The problem is with a type of class we use in java, called a “listener”. These classes are called first when the webapp is deployed. There is something it doesn’t like about it. At this point I can only guess it is a java version issue.

        Have you tried restarting the machine? Have you uninstalled Java 1.7?

        If you are on ubunutu you can try this on the terminal: “ps -ef | grep tomcat7”

        This should give an indication of the version being used.

        Best regards,
        Tarek

        From: marinos kardaris marinoskardaris@gmail.com
        Sent: 28 May 2015 13:25

        To: Elsaleh T Mr (Electronic Eng)
        Subject: Re: IoTDiscovery

        It is exactly the same:

        May 28, 2015 2:41:51 PM org.apache.catalina.core.StandardContext listenerStart
        SEVERE: Skipped installing application listeners due to previous error(s)
        May 28, 2015 2:43:15 PM org.apache.catalina.core.StandardContext listenerStart
        SEVERE: Error configuring application listener of class uk.ac.surrey.ee.iot.fiware.ngsi9.storage.db4o.StorageStartup
        java.lang.UnsupportedClassVersionError: uk/ac/surrey/ee/iot/fiware/ngsi9/storage/db4o/StorageStartup : Unsupported major.minor version 52.0 (unable to load class uk.ac.surrey.ee.iot.fiware.ngsi9.storage.db4o.StorageStartup)
        at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2961)
        at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1210)

        I am apologize for your time, ones more thank's a lot

        Marinos

        2015-05-28 15:15 GMT+03:00 <t.elsaleh@surrey.ac.uk>:
        Do you still get this error: “Unsupported major.minor version 52.0”?

        Or is it another error?

        Best regards,
        Tarek

        From: marinos kardaris marinoskardaris@gmail.com
        Sent: 28 May 2015 12:56

        To: Elsaleh T Mr (Electronic Eng)
        Subject: Re: IoTDiscovery

        Hi Tarek,

        I tried but I received the same error.
        I saw that it is not created in /ngsi9/repository the ngsiRegRepo.db40 files
        something is uncompatible with this class

        Could you send me the ngsi9.war maybe is corrupted in Catalogue

        Thank you for your effort

        Marinos

        2015-05-28 14:29 GMT+03:00 <t.elsaleh@surrey.ac.uk>:
        Hi Marinos,
        Try with tomcat7, you should be ok.

        Best regards,
        Tarek

        From: marinos kardaris marinoskardaris@gmail.com
        Sent: 28 May 2015 12:28

        To: Elsaleh T Mr (Electronic Eng)
        Subject: Re: IoTDiscovery

        Hi Tarek,

        I will upgrade java to version 8. But in this case I will have problem with tomcat 7 which supports only V7 java.
        May be I need also Tomcat 8. What you suggest?

        Best regards
        Marinos

        2015-05-28 13:33 GMT+03:00 <t.elsaleh@surrey.ac.uk>:
        Hi Marinos,

        IoT Discovery requires Java 1.8. Would you be able to upgrade you java version?

        Best regards,
        Tarek

        From: marinos kardaris marinoskardaris@gmail.com
        Sent: 28 May 2015 09:40

        To: Elsaleh T Mr (Electronic Eng)
        Subject: Re: IoTDiscovery

        java version is 1.7.0_79

        Marinos

        2015-05-28 11:38 GMT+03:00 <t.elsaleh@surrey.ac.uk>:
        Thanks!....please could you confirm which java version you are using.

        Type in terminal: “java –version”

        Best regards,
        Tarek

        From: marinos kardaris marinoskardaris@gmail.com
        Sent: 28 May 2015 09:34

        To: Elsaleh T Mr (Electronic Eng)
        Subject: Re: IoTDiscovery

        Hi Tarek,

        Please find attached the required files

        Best regards
        Marinos

        2015-05-28 11:22 GMT+03:00 <t.elsaleh@surrey.ac.uk>:
        Hi Marinos,
        Please send me the tomcat log, so I can deduce more information about the problem.

        You will find it under:

        • “

        {tomcat_home}/logs/localhost.2015-05-##.log
        • “{tomcat_home}

        /logs/catalina.2015-05-##.log

        Best regards,
        Tarek

        From: marinos kardaris marinoskardaris@gmail.com
        Sent: 28 May 2015 09:17
        To: Elsaleh T Mr (Electronic Eng)
        Subject: Re: IoTDiscovery

        Hi Tarek,

        I follow your instructions and I download the release 4.2 from the catalogue but it create to me a more serious problem as I receive the following message:
        FAIL - Application at context path /ngsi9 could not be started
        All the other environmet is the same tomcat7, java etc.
        Have you any idea?
        Thank's in advance
        Marinos
        2015-05-27 13:24 GMT+03:00 mk <mkardaris@f-in.gr>:
        Hi Tarek,

        Thank you for your answer. I had download from
        http://catalogue.fiware.org/enablers/configuration-manager-iot-discovery/downloads.
        But now I see a very new version. I will try with this as soon as possible.

        Thanks a lot again

        Marinos

        Show
        telsaleh Tarek Elsaleh added a comment - Hi Tarek, Thank's a lot, this was the solution. I wish you a nice weekend Marinos 2015-05-29 18:38 GMT+03:00 <t.elsaleh@surrey.ac.uk>: Hi Marinos, Please could you try this: http://askubuntu.com/questions/154953/specify-jdk-for-tomcat7 Here you should explicitly specify the path for the Oracle Java JDK that tomcat will use. Then please make sure you restart tomcat7. Best regards, Tarek From: marinos kardaris marinoskardaris@gmail.com Sent: 29 May 2015 16:24 To: Elsaleh T Mr (Electronic Eng) Subject: Re: IoTDiscovery Hi Tarek, I did all your suggestions but I still have the same problem. I found an explanation in the following link which suggest some steps. I don't know if it can help. http://stackoverflow.com/questions/22489398/unsupported-major-minor-version-52-0 Best regards Marinos 2015-05-28 17:06 GMT+03:00 <t.elsaleh@surrey.ac.uk>: Hi Marinos, The problem is with a type of class we use in java, called a “listener”. These classes are called first when the webapp is deployed. There is something it doesn’t like about it. At this point I can only guess it is a java version issue. Have you tried restarting the machine? Have you uninstalled Java 1.7? If you are on ubunutu you can try this on the terminal: “ps -ef | grep tomcat7” This should give an indication of the version being used. Best regards, Tarek From: marinos kardaris marinoskardaris@gmail.com Sent: 28 May 2015 13:25 To: Elsaleh T Mr (Electronic Eng) Subject: Re: IoTDiscovery It is exactly the same: May 28, 2015 2:41:51 PM org.apache.catalina.core.StandardContext listenerStart SEVERE: Skipped installing application listeners due to previous error(s) May 28, 2015 2:43:15 PM org.apache.catalina.core.StandardContext listenerStart SEVERE: Error configuring application listener of class uk.ac.surrey.ee.iot.fiware.ngsi9.storage.db4o.StorageStartup java.lang.UnsupportedClassVersionError: uk/ac/surrey/ee/iot/fiware/ngsi9/storage/db4o/StorageStartup : Unsupported major.minor version 52.0 (unable to load class uk.ac.surrey.ee.iot.fiware.ngsi9.storage.db4o.StorageStartup) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2961) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1210) I am apologize for your time, ones more thank's a lot Marinos 2015-05-28 15:15 GMT+03:00 <t.elsaleh@surrey.ac.uk>: Do you still get this error: “Unsupported major.minor version 52.0”? Or is it another error? Best regards, Tarek From: marinos kardaris marinoskardaris@gmail.com Sent: 28 May 2015 12:56 To: Elsaleh T Mr (Electronic Eng) Subject: Re: IoTDiscovery Hi Tarek, I tried but I received the same error. I saw that it is not created in /ngsi9/repository the ngsiRegRepo.db40 files something is uncompatible with this class Could you send me the ngsi9.war maybe is corrupted in Catalogue Thank you for your effort Marinos 2015-05-28 14:29 GMT+03:00 <t.elsaleh@surrey.ac.uk>: Hi Marinos, Try with tomcat7, you should be ok. Best regards, Tarek From: marinos kardaris marinoskardaris@gmail.com Sent: 28 May 2015 12:28 To: Elsaleh T Mr (Electronic Eng) Subject: Re: IoTDiscovery Hi Tarek, I will upgrade java to version 8. But in this case I will have problem with tomcat 7 which supports only V7 java. May be I need also Tomcat 8. What you suggest? Best regards Marinos 2015-05-28 13:33 GMT+03:00 <t.elsaleh@surrey.ac.uk>: Hi Marinos, IoT Discovery requires Java 1.8. Would you be able to upgrade you java version? Best regards, Tarek From: marinos kardaris marinoskardaris@gmail.com Sent: 28 May 2015 09:40 To: Elsaleh T Mr (Electronic Eng) Subject: Re: IoTDiscovery java version is 1.7.0_79 Marinos 2015-05-28 11:38 GMT+03:00 <t.elsaleh@surrey.ac.uk>: Thanks!....please could you confirm which java version you are using. Type in terminal: “java –version” Best regards, Tarek From: marinos kardaris marinoskardaris@gmail.com Sent: 28 May 2015 09:34 To: Elsaleh T Mr (Electronic Eng) Subject: Re: IoTDiscovery Hi Tarek, Please find attached the required files Best regards Marinos 2015-05-28 11:22 GMT+03:00 <t.elsaleh@surrey.ac.uk>: Hi Marinos, Please send me the tomcat log, so I can deduce more information about the problem. You will find it under: • “ {tomcat_home}/logs/localhost.2015-05-##.log • “{tomcat_home} /logs/catalina.2015-05-##.log Best regards, Tarek From: marinos kardaris marinoskardaris@gmail.com Sent: 28 May 2015 09:17 To: Elsaleh T Mr (Electronic Eng) Subject: Re: IoTDiscovery Hi Tarek, I follow your instructions and I download the release 4.2 from the catalogue but it create to me a more serious problem as I receive the following message: FAIL - Application at context path /ngsi9 could not be started All the other environmet is the same tomcat7, java etc. Have you any idea? Thank's in advance Marinos 2015-05-27 13:24 GMT+03:00 mk <mkardaris@f-in.gr>: Hi Tarek, Thank you for your answer. I had download from http://catalogue.fiware.org/enablers/configuration-manager-iot-discovery/downloads . But now I see a very new version. I will try with this as soon as possible. Thanks a lot again Marinos

          People

          • Assignee:
            telsaleh Tarek Elsaleh
            Reporter:
            fw.ext.user FW External User
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: