Uploaded image for project: 'Service Design and Creation'
  1. Service Design and Creation
  2. SDC-2554

DCAE-BE-TOOLS always throws LinkageError

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Medium Medium
    • None
    • El Alto Release
    • SDC-DCAE-DS
    • None

      Overview

      The dcaebe-tools seems to have the hard to track bug inside the docker container.
      The tools.Main class only catch the RuntimeExpetion but the current version of the DcaeRestClient throws the LinkageError (that isn't catch):

      java.lang.NoClassDefFoundError: org/springframework/core/KotlinDetector
      at org.springframework.http.converter.json.Jackson2ObjectMapperBuilder.registerWellKnownModulesIfAvailable(Jackson2ObjectMapperBuilder.java:762)
      at org.springframework.http.converter.json.Jackson2ObjectMapperBuilder.configure(Jackson2ObjectMapperBuilder.java:624)
      at org.springframework.http.converter.json.Jackson2ObjectMapperBuilder.build(Jackson2ObjectMapperBuilder.java:608)
      at org.springframework.http.converter.json.MappingJackson2HttpMessageConverter.<init>(MappingJackson2HttpMessageConverter.java:59)
      at org.springframework.http.converter.support.AllEncompassingFormHttpMessageConverter.<init>(AllEncompassingFormHttpMessageConverter.java:74)
      at org.springframework.web.client.RestTemplate.<init>(RestTemplate.java:143)
      at org.springframework.web.client.RestTemplate.<init>(RestTemplate.java:182)
      at utilities.DcaeRestClient.init(DcaeRestClient.java:94)
      at tools.Main.main(Main.java:75)
      Caused by: java.lang.ClassNotFoundException: org.springframework.core.KotlinDetector
      at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      ... 9 more

      Technical detalis 

      It seems that some of the packages are missing (in the pom.xml file):
      <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-core</artifactId>
      <version>${org.springframework.version}</version>
      </dependency>

      And
      <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
      <version>1.7.26</version>
      </dependency>

      to solve another issue with the SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". warring.

      With those dependencies, the container starts correctly but the request to the dcae_be (from dcae_tools) return the Internal Error 500, and still the dcae-tools can't do his work.

      When the user (in local deployment) create the "BasicMonitoringTemplate" resource using sdc ui, and the container will restart this error not will be throw and container end the work with these logs:

      Connecting to server host: https://0.0.0.0, port: 8444
      end function
      Sending request: https://0.0.0.0:8444/dcae/catalog
      Sending request: https://0.0.0.0:8444/dcae/getResourcesByCategory
      Sending request: https://0.0.0.0:8444/dcae/getResourcesByMonitoringTemplateCategory
      Starting verify deployment
      Sending request: https://0.0.0.0:8444/dcae/getResourcesByCategory
      Sending request: https://0.0.0.0:8444/dcae/getResourcesByMonitoringTemplateCategory
      Deployment verify finished successfully
      VFCMT template deployment completed
      Error:
      vfcmt: Syslog Collector. DCAE Component not found
      vfcmt: Syslog MSEA. DCAE Component not found
      vfcmt: Status Poller MSE. DCAE Component not found
      vfcmt: FOI Collector. DCAE Component not found
      vfcmt: SNMP MSE. DCAE Component not found
      vfcmt: Docker Map. DCAE Component not found
      vfcmt: SAM Collector. DCAE Component not found
      vfcmt: SNMP PM Poller. DCAE Component not found
      vfcmt: Status Poller Collector. DCAE Component not found
      vfcmt: VES Collector. DCAE Component not found
      vfcmt: VES Fault SE. DCAE Component not found
      vfcmt: Docker Supplement. DCAE Component not found
      vfcmt: Docker Enrich. DCAE Component not found
      vfcmt: MIB Poller. DCAE Component not found
      vfcmt: Discovery Poller. DCAE Component not found

      But the tools.Main method end successfully.

            Unassigned Unassigned
            krystian krystian
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: