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

Compilation error while generating java files.

    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:
      9

      Description

      Defect : Compilation error while generating java files.

      Pyang Error info :
      root1@root1-HP-EliteBook-840-G2:/opt/YangTest/YangFiles$ pyang -f yang Test_Int_1.yang
      Test_Int_1.yang:1: warning: unexpected modulename "examples" in Test_Int_1.yang, should be Test_Int_1
      Test_Int_1.yang:6: error: module "ietf-inet-types" not found in search path
      Test_Int_1.yang:6: warning: imported module ietf-inet-types not used
      module examples {

      root1@root1-HP-EliteBook-840-G2:/opt/YangTest/YangFiles$ pyang -f yang ietf-inet-typesold.yang
      ietf-inet-typesold.yang:1: warning: unexpected modulename "ietf-inet-types" in ietf-inet-typesold.yang, should be ietf-inet-typesold
      module ietf-inet-types

      { Logs : root1@root1-HP-EliteBook-840-G2:/opt/onos-master/onos/utils/test$ 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 2 resources [INFO] [INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ onlab-test --- [INFO] Compiling 92 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/examples/rev20081109/examples/interfaces/yangautoprefixinterface/SpeedEnum.java:[23,23] error: <identifier> expected [ERROR] /opt/YangTest/JavaGenerate/org/onosproject/yang/gen/v1/http/netconfcentral/org/ns/examples/rev20081109/examples/interfaces/yangautoprefixinterface/SpeedEnum.java:[28,4] error: ',', '}

      ', or ';' expected
      [ERROR] /opt/YangTest/JavaGenerate/org/onosproject/yang/gen/v1/http/netconfcentral/org/ns/examples/rev20081109/examples/interfaces/yangautoprefixinterface/SpeedEnum.java:[28,7] error: '}' expected
      [ERROR] /opt/YangTest/JavaGenerate/org/onosproject/yang/gen/v1/http/netconfcentral/org/ns/examples/rev20081109/examples/interfaces/yangautoprefixinterface/SpeedEnum.java:[40,12] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/org/onosproject/yang/gen/v1/http/netconfcentral/org/ns/examples/rev20081109/examples/interfaces/yangautoprefixinterface/SpeedEnum.java:[47,4] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/org/onosproject/yang/gen/v1/http/netconfcentral/org/ns/examples/rev20081109/examples/interfaces/yangautoprefixinterface/SpeedEnum.java:[49,4] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/org/onosproject/yang/gen/v1/http/netconfcentral/org/ns/examples/rev20081109/examples/interfaces/yangautoprefixinterface/SpeedEnum.java:[57,18] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/org/onosproject/yang/gen/v1/http/netconfcentral/org/ns/examples/rev20081109/examples/interfaces/yangautoprefixinterface/SpeedEnum.java:[61,12] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/org/onosproject/yang/gen/v1/http/netconfcentral/org/ns/examples/rev20081109/examples/interfaces/yangautoprefixinterface/SpeedEnum.java:[63,12] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/org/onosproject/yang/gen/v1/http/netconfcentral/org/ns/examples/rev20081109/examples/interfaces/yangautoprefixinterface/SpeedEnum.java:[65,20] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/org/onosproject/yang/gen/v1/http/netconfcentral/org/ns/examples/rev20081109/examples/interfaces/yangautoprefixinterface/SpeedEnum.java:[67,8] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/org/onosproject/yang/gen/v1/http/netconfcentral/org/ns/examples/rev20081109/examples/interfaces/yangautoprefixinterface/SpeedEnum.java:[75,11] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/org/onosproject/yang/gen/v1/http/netconfcentral/org/ns/examples/rev20081109/examples/interfaces/yangautoprefixinterface/SpeedEnum.java:[77,4] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/org/onosproject/yang/gen/v1/http/netconfcentral/org/ns/examples/rev20081109/examples/interfaces/yangautoprefixinterface/SpeedEnum.java:[85,18] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/org/onosproject/yang/gen/v1/http/netconfcentral/org/ns/examples/rev20081109/examples/interfaces/yangautoprefixinterface/SpeedEnum.java:[88,12] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/org/onosproject/yang/gen/v1/http/netconfcentral/org/ns/examples/rev20081109/examples/interfaces/yangautoprefixinterface/SpeedEnum.java:[89,8] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/org/onosproject/yang/gen/v1/http/netconfcentral/org/ns/examples/rev20081109/examples/interfaces/yangautoprefixinterface/SpeedEnum.java:[92,4] error: class, interface, or enum expected
      [INFO] 17 errors
      [INFO] -------------------------------------------------------------
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 2.816 s
      [INFO] Finished at: 2016-05-23T15:35:29+05:30
      [INFO] Final Memory: 21M/307M
      [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/examples/rev20081109/examples/interfaces/yangautoprefixinterface/SpeedEnum.java:[23,23] error: <identifier> expected
      [ERROR] /opt/YangTest/JavaGenerate/org/onosproject/yang/gen/v1/http/netconfcentral/org/ns/examples/rev20081109/examples/interfaces/yangautoprefixinterface/SpeedEnum.java:[28,4] error: ',', '}', or ';' expected
      [ERROR] /opt/YangTest/JavaGenerate/org/onosproject/yang/gen/v1/http/netconfcentral/org/ns/examples/rev20081109/examples/interfaces/yangautoprefixinterface/SpeedEnum.java:[28,7] error: '}' expected
      [ERROR] /opt/YangTest/JavaGenerate/org/onosproject/yang/gen/v1/http/netconfcentral/org/ns/examples/rev20081109/examples/interfaces/yangautoprefixinterface/SpeedEnum.java:[40,12] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/org/onosproject/yang/gen/v1/http/netconfcentral/org/ns/examples/rev20081109/examples/interfaces/yangautoprefixinterface/SpeedEnum.java:[47,4] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/org/onosproject/yang/gen/v1/http/netconfcentral/org/ns/examples/rev20081109/examples/interfaces/yangautoprefixinterface/SpeedEnum.java:[49,4] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/org/onosproject/yang/gen/v1/http/netconfcentral/org/ns/examples/rev20081109/examples/interfaces/yangautoprefixinterface/SpeedEnum.java:[57,18] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/org/onosproject/yang/gen/v1/http/netconfcentral/org/ns/examples/rev20081109/examples/interfaces/yangautoprefixinterface/SpeedEnum.java:[61,12] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/org/onosproject/yang/gen/v1/http/netconfcentral/org/ns/examples/rev20081109/examples/interfaces/yangautoprefixinterface/SpeedEnum.java:[63,12] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/org/onosproject/yang/gen/v1/http/netconfcentral/org/ns/examples/rev20081109/examples/interfaces/yangautoprefixinterface/SpeedEnum.java:[65,20] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/org/onosproject/yang/gen/v1/http/netconfcentral/org/ns/examples/rev20081109/examples/interfaces/yangautoprefixinterface/SpeedEnum.java:[67,8] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/org/onosproject/yang/gen/v1/http/netconfcentral/org/ns/examples/rev20081109/examples/interfaces/yangautoprefixinterface/SpeedEnum.java:[75,11] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/org/onosproject/yang/gen/v1/http/netconfcentral/org/ns/examples/rev20081109/examples/interfaces/yangautoprefixinterface/SpeedEnum.java:[77,4] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/org/onosproject/yang/gen/v1/http/netconfcentral/org/ns/examples/rev20081109/examples/interfaces/yangautoprefixinterface/SpeedEnum.java:[85,18] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/org/onosproject/yang/gen/v1/http/netconfcentral/org/ns/examples/rev20081109/examples/interfaces/yangautoprefixinterface/SpeedEnum.java:[88,12] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/org/onosproject/yang/gen/v1/http/netconfcentral/org/ns/examples/rev20081109/examples/interfaces/yangautoprefixinterface/SpeedEnum.java:[89,8] error: class, interface, or enum expected
      [ERROR] /opt/YangTest/JavaGenerate/org/onosproject/yang/gen/v1/http/netconfcentral/org/ns/examples/rev20081109/examples/interfaces/yangautoprefixinterface/SpeedEnum.java:[92,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

        1. JavaGenerate.tar
          290 kB
          Adarsh m
        2. YangFiles.tar
          9 kB
          Adarsh m
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            • Assignee:
              janani Janani B
              Reporter:
              huawei-adarsh Adarsh m
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: