AutoSys Workload Automation

 View Only
  • 1.  Problem with SAP Agent

    Posted Nov 06, 2019 12:46 PM

    I've donwloaded the sapjco3-NTAMD64-3.0.20 package and for this troubleshooting I'm using the javadoc documentation inside this package.

     

    In this scenario, I've have installed the sap agent delivered with the legacy solution, which is CA Workload Automate. I've provided the logon information for this agent and that information is stored in a flat file, called "<sid>.properties" and its content was informed in the original message of this ticket. Now, is attached too.

     

    During the consumption of referred solution, I'm getting different message errors and the behavior of these erros is directly affected by those parameters that are active inside the properties file. 

     

    What I want and I'm trying to do:

    1. I want to write a line command for validation of connections parameters to SAP S/4;
      1. For that, I'm using the java utility but I'm struggeling with the methods and it's specific syntax. 
      2. Command: java -classpath "C:\Program Files\CA\WA Agent\jars\ext\sapjco3.jar" com.sap.conn.jco.JCoCustomDestination ping()
        1. Result: Error: Main method not found in class com.sap.conn.jco.JCoCustomDestination, please define the main method as:
          public static void main(String[] args)
          or a JavaFX application class must extend javafx.application.Application
    2. This will be valid in order to validate the information provided to jco parameters used during this connection and reflect them on the legacy solution.


  • 2.  RE: Problem with SAP Agent
    Best Answer

    Posted Nov 06, 2019 02:01 PM
    Hi Paulo,
    I have very old material, but I will share it with you, because I think it can help you !!

    Attachment(s)

    pdf
    SAP_DOC.pdf   1.68 MB 1 version


  • 3.  RE: Problem with SAP Agent

    Posted Nov 29, 2021 05:07 AM
    In Java, each application must have the main method. The main method is the entry point of every java program. The java program searches for the main method while running. This error occurred when the main method is not available. The reason that the compiler don't complain about the public is because it doesn't care about the main method. It doesn't take difference for it if a main exists or not. It's the JVM which need a start point public and static to launch your application.

    So you should make your main method :

    public static void main(String[] args)

    The JVM is programmed to look for a specific signature for the main method before executing the program. It finds this signature by looking for a specific series of bytes in the bytecode. That signature only results from compiling a method that is - public static void main. If any of the three modifiers (public, static and void) are omitted the bytecode code will look different and the JVM will not be able to find your main method.