You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by "Smilewh888 (via GitHub)" <gi...@apache.org> on 2023/12/18 08:05:59 UTC
[I] [Bug] [Worker] Workflow Definition JAVA [dolphinscheduler]
Smilewh888 opened a new issue, #15334:
URL: https://github.com/apache/dolphinscheduler/issues/15334
### 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
**1. I have defined the workflow error for JAVA language as follows**
[{"prop":"name","direct":"IN","type":"VARCHAR","value":"superadmin"}] successfully
[INFO] 2023-12-18 15:53:02.815 +0800 - ***********************************************************************************************
[INFO] 2023-12-18 15:53:02.815 +0800 - ********************************* Execute task instance *************************************
[INFO] 2023-12-18 15:53:02.815 +0800 - ***********************************************************************************************
[INFO] 2023-12-18 15:53:02.815 +0800 - The current java source code will begin to replace the placeholder:
public class HelloUser{
public static void main(String[] args){
if("superadmin".equals("${name}"){
System.out.println("this is superadmin!");
}
System.out.println("Hello: ${name}");
}
}
[INFO] 2023-12-18 15:53:02.816 +0800 - tenantCode: default, task dir:/tmp/dolphinscheduler/exec/process/default/11926875436032/11929388222080_8/12/27
[INFO] 2023-12-18 15:53:02.816 +0800 - the java source code:/tmp/dolphinscheduler/exec/process/default/11926875436032/11929388222080_8/12/27/HelloUser.java, will be write to the file:
public class HelloUser{
public static void main(String[] args){
if("superadmin".equals("superadmin"){
System.out.println("this is superadmin!");
}
System.out.println("Hello: superadmin");
}
}
[INFO] 2023-12-18 15:53:02.817 +0800 - Final Shell file is :
#!/bin/bash
BASEDIR=$(cd `dirname $0`; pwd)
cd $BASEDIR
${JAVA_HOME}/bin/javac --class-path .:/tmp/dolphinscheduler/exec/process/default/11926875436032/11929388222080_8/12/27 /tmp/dolphinscheduler/exec/process/default/11926875436032/11929388222080_8/12/27/HelloUser.java;${JAVA_HOME}/bin/java --class-path .:/tmp/dolphinscheduler/exec/process/default/11926875436032/11929388222080_8/12/27 HelloUser
[INFO] 2023-12-18 15:53:02.817 +0800 - Executing shell command : sudo -u root -i /tmp/dolphinscheduler/exec/process/default/11926875436032/11929388222080_8/12/27/12_27.sh
[INFO] 2023-12-18 15:53:02.821 +0800 - process start, process id is: 4900
[INFO] 2023-12-18 15:53:03.821 +0800 - ->
/tmp/dolphinscheduler/exec/process/default/11926875436032/11929388222080_8/12/27/12_27.sh: line 4: /bin/javac: No such file or directory
/tmp/dolphinscheduler/exec/process/default/11926875436032/11929388222080_8/12/27/12_27.sh: line 4: /bin/java: No such file or directory
[INFO] 2023-12-18 15:53:03.823 +0800 - process has exited. execute
**2.According to the logs, the JAVA file cannot be found on the server. I don't know why?**

### What you expected to happen
normal
### How to reproduce

### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [X] 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: commits-unsubscribe@dolphinscheduler.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Question] [Worker] Workflow Definition JAVA [dolphinscheduler]
Posted by "zhongjiajie (via GitHub)" <gi...@apache.org>.
zhongjiajie closed issue #15334: [Question] [Worker] Workflow Definition JAVA
URL: https://github.com/apache/dolphinscheduler/issues/15334
--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] [Worker] Workflow Definition JAVA [dolphinscheduler]
Posted by "lixianli1987 (via GitHub)" <gi...@apache.org>.
lixianli1987 commented on issue #15334:
URL: https://github.com/apache/dolphinscheduler/issues/15334#issuecomment-1860544359
请问要使JAVA组件运行起来,在哪里设置JDK呢?
--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Question] [Worker] Workflow Definition JAVA [dolphinscheduler]
Posted by "zhongjiajie (via GitHub)" <gi...@apache.org>.
zhongjiajie commented on issue #15334:
URL: https://github.com/apache/dolphinscheduler/issues/15334#issuecomment-1916215006
@Smilewh888 please fix according to https://github.com/apache/dolphinscheduler/issues/15334#issuecomment-1868516801
--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] [Worker] Workflow Definition JAVA [dolphinscheduler]
Posted by "Smilewh888 (via GitHub)" <gi...@apache.org>.
Smilewh888 commented on issue #15334:
URL: https://github.com/apache/dolphinscheduler/issues/15334#issuecomment-1861958073
> 请问要使JAVA组件运行起来,在哪里设置JDK呢?
我用docker-compose启动的,容器就有jdk,并且能输出JAVA_HOME
--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Question] [Worker] Workflow Definition JAVA [dolphinscheduler]
Posted by "davidzollo (via GitHub)" <gi...@apache.org>.
davidzollo commented on issue #15334:
URL: https://github.com/apache/dolphinscheduler/issues/15334#issuecomment-1868516801
You can set the JAVA_HOME in the UI, you can choose the environment when you set the task
<img width="1657" alt="image" src="https://github.com/apache/dolphinscheduler/assets/15833811/94b09755-527c-4585-9a3f-c3c34839fa1e">

--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Question] [Worker] Workflow Definition JAVA [dolphinscheduler]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #15334:
URL: https://github.com/apache/dolphinscheduler/issues/15334#issuecomment-1907136858
This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs.
--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org