Uploaded image for project: 'ONOS'
  1. ONOS
  2. ONOS-4524

compilation error for <null> cannot be converted to short

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 1.6.0
    • Component/s: None
    • Environment:

      ONOS build compilation

    • Story Points:
      3

      Description

      yang file:
      module Test____ospf {
      namespace "urn:cisco:params:xml:ns:yang:ospf";
      // replace with IANA namespace when assigned
      prefix ospf;

      organization
      "Cisco Systems
      170 West Tasman Drive
      San Jose, CA 95134-1706
      USA";
      contact
      "Derek Yeung myeung@cisco.com
      Yingzhen Qu yiqu@cisco.com
      Alexander Clemm alex@cisco.com";

      description
      "This YANG module defines the generic configuration
      data for OSPF, which is common across all of the vendor
      implementations of the protocol. It is intended that the module
      will be extended by vendors to define vendor-specific
      OSPF configuration parameters and policies,
      for example route maps or route policies.

      Terms and Acronyms

      OSPF (ospf): Open Shortest Path First

      IP (ip): Internet Protocol

      IPv4 (ipv4):Internet Protocol Version 4

      IPv6 (ipv6): Internet Protocol Version 6

      MTU (mtu) Maximum Transmission Unit
      ";

      revision 2013-10-20

      { description "Initial revision."; }

      leaf one {
      description
      "OSPF version.";
      mandatory true;
      type uint8

      { range "2..3"; }
      }




      container ospf-routers {
      leaf version {
      description
      "OSPF version.";
      mandatory true;
      type uint8 { range "2..3"; }

      }

      leaf name

      { description "Name, combined with ospf-routers/ospf_router/ospf-afs/ospf-af, identify an OSPF protocol instance."; mandatory true; type string; }

      } // container ospf-routers
      }

      [INFO] Scanning for projects...
      [INFO]
      [INFO] ------------------------------------------------------------------------
      [INFO] Building onlab-rest 1.6.0-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      [INFO]
      [INFO] — maven-clean-plugin:2.5:clean (default-clean) @ onlab-rest —
      [INFO]
      [INFO] — jacoco-maven-plugin:0.7.5.201505241946:prepare-agent (default-prepare-agent) @ onlab-rest —
      [INFO] argLine set to -javaagent:/root/.m2/repository/org/jacoco/org.jacoco.agent/0.7.5.201505241946/org.jacoco.agent-0.7.5.201505241946-runtime.jar=destfile=/home/root1/onos/utils/test/target/jacoco.exec -Duser.language=en -Duser.region=US
      [INFO]
      [INFO] — yangutils-maven-plugin:1.0.0-SNAPSHOT:yang2java (default) @ onlab-rest —
      [INFO] Source directory added to compilation root: /home/root1/onos/utils/test/src/main/java/org/onosproject/yang/gen
      [INFO]
      [INFO] — maven-resources-plugin:2.7:resources (default-resources) @ onlab-rest —
      [INFO] Using 'UTF-8' encoding to copy filtered resources.
      [INFO] skip non existing resourceDirectory /home/root1/onos/utils/test/src/main/resources
      [INFO] Copying 1 resource
      [INFO]
      [INFO] — maven-compiler-plugin:2.5.1:compile (default-compile) @ onlab-rest —
      [INFO] Compiling 6 source files to /home/root1/onos/utils/test/target/classes
      [INFO] -------------------------------------------------------------
      [ERROR] COMPILATION ERROR :
      [INFO] -------------------------------------------------------------
      [ERROR] /home/root1/onos/utils/test/src/main/java/org/onosproject/yang/gen/v1/urn/cisco/params/xml/ns/yang/ospf/rev20131020/TestOspfManager.java:[30,15] error: incompatible types: <null> cannot be converted to short
      [INFO] 1 error
      [INFO] -------------------------------------------------------------
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 4.059 s
      [INFO] Finished at: 2016-05-11T13:01:22+05:30
      [INFO] Final Memory: 28M/324M
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile) on project onlab-rest: Compilation failure
      [ERROR] /home/root1/onos/utils/test/src/main/java/org/onosproject/yang/gen/v1/urn/cisco/params/xml/ns/yang/ospf/rev20131020/TestOspfManager.java:[30,15] error: incompatible types: <null> cannot be converted to short
      [ERROR] -> [Help 1]
      [ERROR]
      [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
      [ERROR] Re-run Maven using the -X switch to enable full debug logging.
      [ERROR]
      [ERROR] For more information about the errors and possible solutions, please read the following articles:
      [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
      0

        Attachments

          Activity

            People

            • Assignee:
              bsaraswal bharat saraswal
              Reporter:
              sathishmurugesan sathishkumar murugesan
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: