Gen EDGE

 View Only
  • 1.  Inline Global Variable Declaration

    Posted Jan 07, 2021 08:48 PM
      |   view attached
    Hello. I'm trying to call an external Java library function inside Toolset Inline code. It's to decode a Base64 string using commons-codec-1.15.jar. The error that I got when generation code is error: package org.apache.commons.codec.binary does not exist. Is it possible to call external library inside inline code?


  • 2.  RE: Inline Global Variable Declaration

    Broadcom Employee
    Posted Jan 07, 2021 09:08 PM
    Edited by Lynn Williams Jan 07, 2021 09:10 PM

    Hello,
    That error "package org.apache.commons.codec.binary does not exist." occurred during the build of the generated code in the Build Tool?
    If you set your BT ​​​​profile JAVA token OPT.USECLASSPATH=YES instead of default NO, and put the full path of commons-codec-1.15.jar in your System environment variable CLASSPATH I think that should resolve the build error.

    Hope that helps

    Regards,

    Lynn



    ------------------------------
    Lynn Williams
    Senior Principal Support Engineer
    Broadcom
    Australia
    ------------------------------



  • 3.  RE: Inline Global Variable Declaration

    Broadcom Employee
    Posted Jan 10, 2021 10:44 PM

    Hi @MUNIRAH MAZLAN
    Did my suggestion above resolve your problem?

    Thanks

    Lynn​​



    ------------------------------
    Lynn Williams
    Senior Principal Support Engineer
    Broadcom
    Australia
    ------------------------------



  • 4.  RE: Inline Global Variable Declaration

    Posted Jan 11, 2021 12:32 AM
    Hi @Lynn Williams. I already try to implement your suggestion. But still got "BUILD FAILED". For TP Monitor = None. If I change the TP Monitor = None got no error.​


  • 5.  RE: Inline Global Variable Declaration

    Broadcom Employee
    Posted Jan 11, 2021 12:57 AM
    Edited by Lynn Williams Jan 11, 2021 01:00 AM

    Hi @MUNIRAH MAZLAN
    Depending on what the default value of TP Monitor is under Model Construction -> Environment  OR  under Construction -> Generation -> Options > Generation Defaults,  changing the Inline Code TP Monitor from NONE may be necessary.
    I assume you changed it to one of the 4 Java-related values i.e. INTERNET, EJB, EJB Web Services, Web View? (they would have been the only ones listed because you already had OS=JVM and Language=Java selected). 

    Add an Inline Code Statement

    Which one did you use?

    Thanks

    Lynn



    ------------------------------
    Lynn Williams
    Senior Principal Support Engineer
    Broadcom
    Australia
    ------------------------------