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

Compilation error occurred for union with boolean type.

    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
    • Labels:
      None
    • Story Points:
      6

      Description

      Defect : Compilation error occurred for union with boolean type.

      Yang :
      module siltest3 {

      namespace "http://netconfcentral.org/ns/ siltest3";
      prefix "siltest3";

      description
      "Test SIL code generation for nested lists and union types.";

      revision 2011-09-16

      { description "Initial version."; }

      list u {
      key ux;
      leaf ux {
      type union

      { type uint32; type string; }

      }
      leaf uy

      { type uint32; }

      leaf uz

      { config false; type uint32; }

      leaf uu {
      config false;
      type union

      { type int32; type uint8; type boolean; }

      }
      }

      }

      Build Logs :
      $ mvn clean install
      [INFO] Scanning for projects...
      [INFO]
      [INFO] ------------------------------ ------------------------------ ------------
      [INFO] Building onlab-test 1.6.0-SNAPSHOT
      [INFO] ------------------------------ ------------------------------ ------------
      [INFO]
      [INFO] — maven-clean-plugin:2.5:clean (default-clean) @ onlab-test —
      [INFO] Deleting /opt/onos-master/onos/utils/ test/target
      [INFO]
      [INFO] — jacoco-maven-plugin:0.7.5. 201505241946:prepare-agent (default-prepare-agent) @ onlab-test —
      [INFO] argLine set to javaagent:/home/root1/.m2/ repository/org/jacoco/org. jacoco.agent/0.7.5. 201505241946/org.jacoco.agent 0.7.5.201505241946-runtime. jar=destfile=/opt/onos-master/ onos/utils/test/target/jacoco. exec -Duser.language=en -Duser.region=US
      [INFO]
      [INFO] — yangutils-maven-plugin:1.0.0- SNAPSHOT:yang2java (default) @ onlab-test —
      [INFO] Source directory added to compilation root: /opt/YangTest/JavaGenerate
      [INFO]
      [INFO] — maven-resources-plugin:2.7: resources (default-resources) @ onlab-test —
      [INFO] Using 'UTF-8' encoding to copy filtered resources.
      [INFO] skip non existing resourceDirectory /opt/onos-master/onos/utils/ test/src/main/resources
      [INFO] Copying 1 resource
      [INFO]
      [INFO] — maven-compiler-plugin:2.5.1: compile (default-compile) @ onlab-test —
      [INFO] Compiling 9 source files to /opt/onos-master/onos/utils/ test/target/classes
      [INFO] ------------------------------ ------------------------------ -
      [ERROR] COMPILATION ERROR :
      [INFO] ------------------------------ ------------------------------ -
      [ERROR] /opt/YangTest/JavaGenerate/ org/onosproject/yang/gen/v1/ http/netconfcentral/org/ns/ siltest3/rev20110916/siltest3/ u/UuUnion.java:[61,13] error: <identifier> expected
      [ERROR] /opt/YangTest/JavaGenerate/ org/onosproject/yang/gen/v1/ http/netconfcentral/org/ns/ siltest3/rev20110916/siltest3/ u/UuUnion.java:[61,12] error: not a statement
      [ERROR] /opt/YangTest/JavaGenerate/ org/onosproject/yang/gen/v1/ http/netconfcentral/org/ns/ siltest3/rev20110916/siltest3/ u/UuUnion.java:[61,21] error: illegal start of expression
      [ERROR] /opt/YangTest/JavaGenerate/ org/onosproject/yang/gen/v1/ http/netconfcentral/org/ns/ siltest3/rev20110916/siltest3/ u/UuUnion.java:[117,18] error: <identifier> expected
      [ERROR] /opt/YangTest/JavaGenerate/ org/onosproject/yang/gen/v1/ http/netconfcentral/org/ns/ siltest3/rev20110916/siltest3/ u/UuUnion.java:[117,26] error: illegal start of type
      [ERROR] /opt/YangTest/JavaGenerate/ org/onosproject/yang/gen/v1/ http/netconfcentral/org/ns/ siltest3/rev20110916/siltest3/ u/UuUnion.java:[117,27] error: <identifier> expected
      [ERROR] /opt/YangTest/JavaGenerate/ org/onosproject/yang/gen/v1/ http/netconfcentral/org/ns/ siltest3/rev20110916/siltest3/ u/UuUnion.java:[117,28] error: ';' expected
      [ERROR] /opt/YangTest/JavaGenerate/ org/onosproject/yang/gen/v1/ http/netconfcentral/org/ns/ siltest3/rev20110916/siltest3/ u/UuUnion.java:[118,8] error: illegal start of type
      [ERROR] /opt/YangTest/JavaGenerate/ org/onosproject/yang/gen/v1/ http/netconfcentral/org/ns/ siltest3/rev20110916/siltest3/ u/UuUnion.java:[118,14] error: <identifier> expected
      [ERROR] /opt/YangTest/JavaGenerate/ org/onosproject/yang/gen/v1/ http/netconfcentral/org/ns/ siltest3/rev20110916/siltest3/ u/UuUnion.java:[122,11] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/ org/onosproject/yang/gen/v1/ http/netconfcentral/org/ns/ siltest3/rev20110916/siltest3/ u/UuUnion.java:[124,4] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/ org/onosproject/yang/gen/v1/ http/netconfcentral/org/ns/ siltest3/rev20110916/siltest3/ u/UuUnion.java:[127,11] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/ org/onosproject/yang/gen/v1/ http/netconfcentral/org/ns/ siltest3/rev20110916/siltest3/ u/UuUnion.java:[130,8] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/ org/onosproject/yang/gen/v1/ http/netconfcentral/org/ns/ siltest3/rev20110916/siltest3/ u/UuUnion.java:[133,12] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/ org/onosproject/yang/gen/v1/ http/netconfcentral/org/ns/ siltest3/rev20110916/siltest3/ u/UuUnion.java:[137,8] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/ org/onosproject/yang/gen/v1/ http/netconfcentral/org/ns/ siltest3/rev20110916/siltest3/ u/UuUnion.java:[139,4] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/ org/onosproject/yang/gen/v1/ http/netconfcentral/org/ns/ siltest3/rev20110916/siltest3/ u/UuUnion.java:[142,11] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/ org/onosproject/yang/gen/v1/ http/netconfcentral/org/ns/ siltest3/rev20110916/siltest3/ u/UuUnion.java:[149,4] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/ org/onosproject/yang/gen/v1/ http/netconfcentral/org/ns/ siltest3/rev20110916/siltest3/ u/UuUnion.java:[157,18] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/ org/onosproject/yang/gen/v1/ http/netconfcentral/org/ns/ siltest3/rev20110916/siltest3/ u/UuUnion.java:[160,12] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/ org/onosproject/yang/gen/v1/ http/netconfcentral/org/ns/ siltest3/rev20110916/siltest3/ u/UuUnion.java:[161,8] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/ org/onosproject/yang/gen/v1/ http/netconfcentral/org/ns/ siltest3/rev20110916/siltest3/ u/UuUnion.java:[165,12] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/ org/onosproject/yang/gen/v1/ http/netconfcentral/org/ns/ siltest3/rev20110916/siltest3/ u/UuUnion.java:[166,8] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/ org/onosproject/yang/gen/v1/ http/netconfcentral/org/ns/ siltest3/rev20110916/siltest3/ u/UuUnion.java:[170,12] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/ org/onosproject/yang/gen/v1/ http/netconfcentral/org/ns/ siltest3/rev20110916/siltest3/ u/UuUnion.java:[171,8] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/ org/onosproject/yang/gen/v1/ http/netconfcentral/org/ns/ siltest3/rev20110916/siltest3/ u/UuUnion.java:[174,4] error: class, interface, or enum expected
      [INFO] 26 errors
      [INFO] ------------------------------ ------------------------------ -
      [INFO] ------------------------------ ------------------------------ ------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------ ------------------------------ ------------
      [INFO] Total time: 2.608 s
      [INFO] Finished at: 2016-05-23T17:31:41+05:30
      [INFO] Final Memory: 22M/315M
      [INFO] ------------------------------ ------------------------------ ------------
      [ERROR] Failed to execute goal org.apache.maven.plugins: maven-compiler-plugin:2.5.1: compile (default-compile) on project onlab-test: Compilation failure: Compilation failure:
      [ERROR] /opt/YangTest/JavaGenerate/ org/onosproject/yang/gen/v1/ http/netconfcentral/org/ns/ siltest3/rev20110916/siltest3/ u/UuUnion.java:[61,13] error: <identifier> expected
      [ERROR] /opt/YangTest/JavaGenerate/ org/onosproject/yang/gen/v1/ http/netconfcentral/org/ns/ siltest3/rev20110916/siltest3/ u/UuUnion.java:[61,12] error: not a statement
      [ERROR] /opt/YangTest/JavaGenerate/ org/onosproject/yang/gen/v1/ http/netconfcentral/org/ns/ siltest3/rev20110916/siltest3/ u/UuUnion.java:[61,21] error: illegal start of expression
      [ERROR] /opt/YangTest/JavaGenerate/ org/onosproject/yang/gen/v1/ http/netconfcentral/org/ns/ siltest3/rev20110916/siltest3/ u/UuUnion.java:[117,18] error: <identifier> expected
      [ERROR] /opt/YangTest/JavaGenerate/ org/onosproject/yang/gen/v1/ http/netconfcentral/org/ns/ siltest3/rev20110916/siltest3/ u/UuUnion.java:[117,26] error: illegal start of type
      [ERROR] /opt/YangTest/JavaGenerate/ org/onosproject/yang/gen/v1/ http/netconfcentral/org/ns/ siltest3/rev20110916/siltest3/ u/UuUnion.java:[117,27] error: <identifier> expected
      [ERROR] /opt/YangTest/JavaGenerate/ org/onosproject/yang/gen/v1/ http/netconfcentral/org/ns/ siltest3/rev20110916/siltest3/ u/UuUnion.java:[117,28] error: ';' expected
      [ERROR] /opt/YangTest/JavaGenerate/ org/onosproject/yang/gen/v1/ http/netconfcentral/org/ns/ siltest3/rev20110916/siltest3/ u/UuUnion.java:[118,8] error: illegal start of type
      [ERROR] /opt/YangTest/JavaGenerate/ org/onosproject/yang/gen/v1/ http/netconfcentral/org/ns/ siltest3/rev20110916/siltest3/ u/UuUnion.java:[118,14] error: <identifier> expected
      [ERROR] /opt/YangTest/JavaGenerate/ org/onosproject/yang/gen/v1/ http/netconfcentral/org/ns/ siltest3/rev20110916/siltest3/ u/UuUnion.java:[122,11] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/ org/onosproject/yang/gen/v1/ http/netconfcentral/org/ns/ siltest3/rev20110916/siltest3/ u/UuUnion.java:[124,4] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/ org/onosproject/yang/gen/v1/ http/netconfcentral/org/ns/ siltest3/rev20110916/siltest3/ u/UuUnion.java:[127,11] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/ org/onosproject/yang/gen/v1/ http/netconfcentral/org/ns/ siltest3/rev20110916/siltest3/ u/UuUnion.java:[130,8] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/ org/onosproject/yang/gen/v1/ http/netconfcentral/org/ns/ siltest3/rev20110916/siltest3/ u/UuUnion.java:[133,12] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/ org/onosproject/yang/gen/v1/ http/netconfcentral/org/ns/ siltest3/rev20110916/siltest3/ u/UuUnion.java:[137,8] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/ org/onosproject/yang/gen/v1/ http/netconfcentral/org/ns/ siltest3/rev20110916/siltest3/ u/UuUnion.java:[139,4] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/ org/onosproject/yang/gen/v1/ http/netconfcentral/org/ns/ siltest3/rev20110916/siltest3/ u/UuUnion.java:[142,11] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/ org/onosproject/yang/gen/v1/ http/netconfcentral/org/ns/ siltest3/rev20110916/siltest3/ u/UuUnion.java:[149,4] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/ org/onosproject/yang/gen/v1/ http/netconfcentral/org/ns/ siltest3/rev20110916/siltest3/ u/UuUnion.java:[157,18] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/ org/onosproject/yang/gen/v1/ http/netconfcentral/org/ns/ siltest3/rev20110916/siltest3/ u/UuUnion.java:[160,12] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/ org/onosproject/yang/gen/v1/ http/netconfcentral/org/ns/ siltest3/rev20110916/siltest3/ u/UuUnion.java:[161,8] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/ org/onosproject/yang/gen/v1/ http/netconfcentral/org/ns/ siltest3/rev20110916/siltest3/ u/UuUnion.java:[165,12] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/ org/onosproject/yang/gen/v1/ http/netconfcentral/org/ns/ siltest3/rev20110916/siltest3/ u/UuUnion.java:[166,8] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/ org/onosproject/yang/gen/v1/ http/netconfcentral/org/ns/ siltest3/rev20110916/siltest3/ u/UuUnion.java:[170,12] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/ org/onosproject/yang/gen/v1/ http/netconfcentral/org/ns/ siltest3/rev20110916/siltest3/ u/UuUnion.java:[171,8] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/ org/onosproject/yang/gen/v1/ http/netconfcentral/org/ns/ siltest3/rev20110916/siltest3/ u/UuUnion.java:[174,4] error: class, interface, or enum expected
      [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
      root1@root1-HP-EliteBook-840- G2:/opt/onos-master/onos/ utils/test$

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            • Assignee:
              bsaraswal bharat saraswal
              Reporter:
              huawei-adarsh Adarsh m
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: