lohcve opened a new issue, #15602:
URL: https://github.com/apache/dolphinscheduler/issues/15602

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and 
found no similar issues.
   
   
   ### What happened
   
   I have upgraded to 3.2.1 version,but find some error to execute simple java 
code and jar file。
   
   1、execute java code error
   error logs:
   `[INFO] 2024-02-20 15:35:37.325 +0800 - Success initialized task plugin 
instance successfully
   [INFO] 2024-02-20 15:35:37.325 +0800 - Set taskVarPool: null successfully
   [INFO] 2024-02-20 15:35:37.325 +0800 - 
***********************************************************************************************
   [INFO] 2024-02-20 15:35:37.325 +0800 - *********************************  
Execute task instance  *************************************
   [INFO] 2024-02-20 15:35:37.325 +0800 - 
***********************************************************************************************
   [INFO] 2024-02-20 15:35:37.326 +0800 - The current java source code will 
begin to replace the placeholder: public class TEST {
        
        public static void main(String[] args) {
                System.out.println("Hello world");
        }
   }
   [INFO] 2024-02-20 15:35:37.331 +0800 - tenantCode: default, task 
dir:/opt/dmgeo/dolphinscheduler/filestorage/exec/process/default/10366644005024/12360796539680_2/3635/6145
   [INFO] 2024-02-20 15:35:37.331 +0800 - the java source 
code:/opt/dmgeo/dolphinscheduler/filestorage/exec/process/default/10366644005024/12360796539680_2/3635/6145/TEST.java,
 will be write to the file: public class TEST {
        
        public static void main(String[] args) {
                System.out.println("Hello world");
        }
   }
   [INFO] 2024-02-20 15:35:37.342 +0800 - Final Shell file is: 
   [INFO] 2024-02-20 15:35:37.342 +0800 - ****************************** Script 
Content *****************************************************************
   [INFO] 2024-02-20 15:35:37.342 +0800 - #!/bin/bash
   BASEDIR=$(cd `dirname $0`; pwd)
   cd $BASEDIR
   ${JAVA_HOME}/bin/javac -classpath 
.:/opt/dmgeo/dolphinscheduler/filestorage/exec/process/default/10366644005024/12360796539680_2/3635/6145
 
/opt/dmgeo/dolphinscheduler/filestorage/exec/process/default/10366644005024/12360796539680_2/3635/6145/TEST.java;${JAVA_HOME}/bin/java
 -classpath 
.:/opt/dmgeo/dolphinscheduler/filestorage/exec/process/default/10366644005024/12360796539680_2/3635/6145
 TEST  
   [INFO] 2024-02-20 15:35:37.342 +0800 - ****************************** Script 
Content *****************************************************************
   [INFO] 2024-02-20 15:35:37.342 +0800 - Executing shell command : sudo -u 
default -i 
/opt/dmgeo/dolphinscheduler/filestorage/exec/process/default/10366644005024/12360796539680_2/3635/6145/3635_6145.sh
   [INFO] 2024-02-20 15:35:37.344 +0800 - process start, process id is: 28695
   [INFO] 2024-02-20 15:35:38.345 +0800 -  -> 
        
/opt/dmgeo/dolphinscheduler/filestorage/exec/process/default/10366644005024/12360796539680_2/3635/6145/3635_6145.sh:
 line 4: /bin/javac: No such file or directory
        Error: Could not find or load main class TEST
   [INFO] 2024-02-20 15:35:38.346 +0800 - process has exited. execute 
path:/opt/dmgeo/dolphinscheduler/filestorage/exec/process/default/10366644005024/12360796539680_2/3635/6145,
 processId:28695 ,exitStatusCode:1 ,processWaitForStatus:true 
,processExitValue:1
   [INFO] 2024-02-20 15:35:38.346 +0800 - java task run result: 
TaskResponse(varPool=null, processId=28695, resultString=null, appIds=null, 
process=null, cancel=false, exitStatusCode=1, status=null)
   [INFO] 2024-02-20 15:35:38.346 +0800 - 
***********************************************************************************************
   [INFO] 2024-02-20 15:35:38.346 +0800 - *********************************  
Finalize task instance  ************************************
   [INFO] 2024-02-20 15:35:38.347 +0800 - 
***********************************************************************************************`
   
   it looks like read ${JAVA_HOME} error.
   
   2、execute jar file error
   error logs:
   `[INFO] 2024-02-20 16:43:55.879 +0800 - Success initialized task plugin 
instance successfully
   [INFO] 2024-02-20 16:43:55.879 +0800 - Set taskVarPool: null successfully
   [INFO] 2024-02-20 16:43:55.879 +0800 - 
***********************************************************************************************
   [INFO] 2024-02-20 16:43:55.879 +0800 - *********************************  
Execute task instance  *************************************
   [INFO] 2024-02-20 16:43:55.879 +0800 - 
***********************************************************************************************
   [INFO] 2024-02-20 16:43:55.879 +0800 - Final Shell file is: 
   [INFO] 2024-02-20 16:43:55.879 +0800 - ****************************** Script 
Content *****************************************************************
   [INFO] 2024-02-20 16:43:55.879 +0800 - #!/bin/bash
   BASEDIR=$(cd `dirname $0`; pwd)
   cd $BASEDIR
   ${JAVA_HOME}/bin/java -classpath 
.:/opt/dmgeo/dolphinscheduler/filestorage/exec/process/default/10366644005024/12360719265696_6/3637/6147:/opt/dmgeo/dolphinscheduler/filestorage/exec/process/default/10366644005024/12360719265696_6/3637/6147//opt/dmgeo/dolphinscheduler/filestorage/exec/process/default/10366644005024/12360719265696_6/3637/6147/test.jar
 -jar 
/opt/dmgeo/dolphinscheduler/filestorage/exec/process/default/10366644005024/12360719265696_6/3637/6147//opt/dmgeo/dolphinscheduler/filestorage/exec/process/default/10366644005024/12360719265696_6/3637/6147/test.jar
  -Xms512m -Xmx512m -XX:PermSize=64M -XX:MaxPermSize=256M
   [INFO] 2024-02-20 16:43:55.879 +0800 - ****************************** Script 
Content *****************************************************************
   [INFO] 2024-02-20 16:43:55.880 +0800 - Executing shell command : sudo -u 
default -i 
/opt/dmgeo/dolphinscheduler/filestorage/exec/process/default/10366644005024/12360719265696_6/3637/6147/3637_6147.sh
   [INFO] 2024-02-20 16:43:55.882 +0800 - process start, process id is: 30045
   [INFO] 2024-02-20 16:43:56.883 +0800 -  -> 
        Error: Unable to access jarfile 
/opt/dmgeo/dolphinscheduler/filestorage/exec/process/default/10366644005024/12360719265696_6/3637/6147//opt/dmgeo/dolphinscheduler/filestorage/exec/process/default/10366644005024/12360719265696_6/3637/6147/test.jar
   [INFO] 2024-02-20 16:43:56.883 +0800 - process has exited. execute 
path:/opt/dmgeo/dolphinscheduler/filestorage/exec/process/default/10366644005024/12360719265696_6/3637/6147,
 processId:30045 ,exitStatusCode:1 ,processWaitForStatus:true 
,processExitValue:1
   [INFO] 2024-02-20 16:43:56.884 +0800 - java task run result: 
TaskResponse(varPool=null, processId=30045, resultString=null, appIds=null, 
process=null, cancel=false, exitStatusCode=1, status=null)
   [INFO] 2024-02-20 16:43:56.884 +0800 - 
***********************************************************************************************
   [INFO] 2024-02-20 16:43:56.884 +0800 - *********************************  
Finalize task instance  ************************************
   [INFO] 2024-02-20 16:43:56.884 +0800 - 
***********************************************************************************************`
   
   it looks like jar path error.
   
   
   ### What you expected to happen
   
   support java code and jar file
   
   ### How to reproduce
   
   execute simple java code and jar file
   
   ### Anything else
   
   _No response_
   
   ### Version
   
   3.2.x
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: 
[email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to