webMethods

webMethods

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

wM Java Error - The source was saved, but was not compiled due to the following errors:

  • 1.  wM Java Error - The source was saved, but was not compiled due to the following errors:

    Posted Wed December 22, 2021 02:26 AM

    Hi Team,

    I am getting the below error, in the existing Java code I have added a few lines of new code and tried to save the java code (source), and after some time got the below error, could you please let me know how to fix the issue.

    Error-
    The source was saved, but was not compiled due to the following errors:

    C:\SoftwareAG\IntegrationServer\instances\default\packages\TESTPackage\code\source\TESTPackage\svc\utils\search.java:1: error: package TESTPackage.svc.utils clashes with class of same name

    package TESTPackage.svc.utils;

    ^

    1 error


    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: wM Java Error - The source was saved, but was not compiled due to the following errors:

    Posted Wed December 22, 2021 08:46 AM

    Hi @Yogesh_Maheshwari ,
    This issue can occur when you have a service with the same name as the folder at the same level. (For example in the structure below)- search is name of a folder as well as a java service, and if you try to edit j1 and save, you can run into the error you mentioned.

    ABC 
    svc
    utils
    search (folder)
    j1(java service)
    search(java service)
    

    Expand the package TestPackage and check if you have a similar structure.

    It is better to have unique names/unique fully qualified paths for services.

    NP


    #webMethods
    #Integration-Server-and-ESB


  • 3.  RE: wM Java Error - The source was saved, but was not compiled due to the following errors:

    Posted Mon December 27, 2021 02:31 AM

    @Nagendra_Prasad - But one more observation -

    Due to the above issue, I am getting errors in other java services as well and a couple of APIs are failing.

    Error - [ISS.0026.9102] Service ‘TestPackage.svc.utils.search:getOrderByQuery’ is not operational. To run this service, first recompile the Java source.

    Could you please let me know how I can recompile the Java source again and fix this issue?


    #Integration-Server-and-ESB
    #webMethods


  • 4.  RE: wM Java Error - The source was saved, but was not compiled due to the following errors:

    Posted Mon December 27, 2021 02:46 AM

    @Nagendra_Prasad @Holger_von_Thomsen - Please suggest if any command or steps to recompile all java services in DEV env?
    OS: Windows


    #Integration-Server-and-ESB
    #webMethods


  • 5.  RE: wM Java Error - The source was saved, but was not compiled due to the following errors:

    Posted Mon December 27, 2021 04:07 AM

    Hi @Yogesh_Maheshwari ,
    You can use jcode utility to compile the packages. For details you can refer to Service Development Guide https://documentation.softwareag.com/webmethods/designer/sdf10-7/10-7_Service_Development_Help.pdf

    <install_dir>/IntegrationServer/instances//bin/jcode.
    usage: select one of the following formats
    jcode frag // create node fragments from source
    jcode comp // composite node fragments into source
    jcode make // compile package’s nodes (new style)
    jcode makeold // compile package’s nodes (old style)
    jcode makeall // compile package’s nodes (new & old)
    jcode fragall // frag all nodes in specified package
    jcode update // compile and frag any changed nodes
    jcode upall // same as update for all packages
    jcode all // frag & compile all packages (new & old)


    #webMethods
    #Integration-Server-and-ESB


  • 6.  RE: wM Java Error - The source was saved, but was not compiled due to the following errors:

    Posted Tue December 28, 2021 06:01 AM

    Thanks @Jaideep for sharing the information.

    @Jaideep - If possible, Could you please let me know the jcode utility step-by-step process to recompile the specific java service/ all java service in the windows platform?


    #webMethods
    #Integration-Server-and-ESB


  • 7.  RE: wM Java Error - The source was saved, but was not compiled due to the following errors:

    Posted Tue December 28, 2021 09:44 AM

    Hi @Yogesh_Maheshwari ,
    jcode is a utility that is present in the <install_dir>/IntegrationServer/instances/<instance_name>/bin/jcode.bat as mentioned by Jaideep.
    To compile a specific package you can run jcode make from the command line or run jcode makeall to run all the packages in that IS instance. Hope this clarifies.
    Additional commands are in the above post/ Service Development guide.

    -NP


    #Integration-Server-and-ESB
    #webMethods