none
Running a Java Jar application on Azure Batch Service RRS feed

  • Question

  • I am trying to run a custom Java Jar application on Azure Batch Service on Azure Data Factory Pipeline. For this I have created a Java Jar file and uploaded on Azure Blob Storage, which is being pointed to by Batch Service.

    I am passing following command to run the Jar on Azure Batch Pool:

    "java -jar exceltocsv-1.0-SNAPSHOT.jar" and pipeline run giving error: "The system cannot find the file specified

    I also tried following command:

    cmd /c "java -jar exceltocsv-1.0-SNAPSHOT.jar

    and got same error: The system cannot find the file specified

    Any help on this is appreciated.

    Complete error:

    {
        "exitcode": null,
        "outputs": [
            "https://sourcefincrime.blob.core.windows.net/adfjobs/8bc3e97a-e645-435c-96da-513c2bdbb44f/output/stdout.txt",
            "https://sourcefincrime.blob.core.windows.net/adfjobs/8bc3e97a-e645-435c-96da-513c2bdbb44f/output/stderr.txt"
        ],
        "errorCategory": 0,
        "code": "CommandProgramNotFound",
        "message": "The specified command program is not found",
        "details": [
            {
                "Name": "CommandLine",
                "Value": "cmd /c \"java -jar exceltocsv-1.0-SNAPSHOT.jar\""
            },
            {
                "Name": "Message",
                "Value": "The system cannot find the file specified"
            }
        ],
        "computeInformation": "{\"account\":\"batchservicefincrime\",\"poolName\":\"MyBatchPool\",\"vmSize\":\"standard_a1\"}",
        "effectiveIntegrationRuntime": "DefaultIntegrationRuntime (Southeast Asia)",
        "executionDuration": 30954
    }

    Thursday, January 10, 2019 10:47 AM

All replies

  • Hi Pushpraj,

    Can you try with the full path of the jar file?

    While adding the resource file you would have given the path to which the file has to be downloaded.

    Try this out and let me know.

    Friday, January 11, 2019 5:41 AM
    Moderator
  • Were you able to try the suggestion shared in the reply above? Did it help? Let us know

    Karishma Tiwari - MSFT

    Monday, January 14, 2019 9:15 PM
    Moderator
  • I am getting this same error - I think it is not finding the java executable.  Can an environment variable be added for the path to the java executable?
    Monday, May 6, 2019 4:28 PM
  • The command we are giving will be executed in the Command prompt.

    You can login to one of the node and then go to the command prompt. Then try to execute the java command there.

    Check the response. If its not finding java there, Then check if java is install led on that server or not.

    If its installed its better to provide the fulll path to the java like this

    cmd /c "C:\executable\java -jar C:\executable\exceltocsv-1.0-SNAPSHOT.jar
    
    

    Try this out and let me know

    Thursday, May 16, 2019 7:04 AM
    Moderator
  • HI,

    Is there any update

    Friday, May 24, 2019 12:16 PM
    Moderator