You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "zzwqqq (via GitHub)" <gi...@apache.org> on 2026/10/08 11:49:12 UTC
[I] [Bug][java] Missing Log4j dependencies in IDE support [flink-agents]
zzwqqq opened a new issue, #1209:
URL: https://github.com/apache/flink-agents/issues/1209
### Search before asking
- [x] I searched in the [issues](https://github.com/apache/flink-agents/issues) and found nothing similar.
### Description
Running the Java example locally fails with:
```text
NoClassDefFoundError: org/apache/logging/log4j/core/Layout
```
It looks like the Log4j dependencies are missing from the IDE classpath because `runtime` declares them as `provided`. This may be related to #954, which removed them from `plan`.
Adding the following to `ide-support/pom.xml` resolved the missing-class error in local testing. It also pulls in `log4j-api` and `log4j-core`. Would this be an appropriate fix?
```xml
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>${log4j2.version}</version>
</dependency>
```
### How to reproduce
1. Import the project into IntelliJ IDEA.
2. Create a run configuration for `org.apache.flink.agents.examples.WorkflowSingleAgentExample`, using the `examples` module classpath.
3. Enable "Add dependencies with provided scope to classpath" and run it.
### Version and environment
- Flink Agents: 0.4-SNAPSHOT, main (99103da6)
- Flink: 2.3.0
- Java: OpenJDK 17.0.15
### Are you willing to submit a PR?
- [x] I'm willing to submit a PR!
--
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: issues-unsubscribe@flink.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug][java] Missing Log4j dependencies in IDE support [flink-agents]
Posted by "wenjin272 (via GitHub)" <gi...@apache.org>.
wenjin272 closed issue #1209: [Bug][java] Missing Log4j dependencies in IDE support
URL: https://github.com/apache/flink-agents/issues/1209
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug][java] Missing Log4j dependencies in IDE support [flink-agents]
Posted by "wenjin272 (via GitHub)" <gi...@apache.org>.
wenjin272 commented on issue #1209:
URL: https://github.com/apache/flink-agents/issues/1209#issuecomment-6073351064
Thanks for reporting this and investigating the cause. Adding `log4j-slf4j-impl` to `ide-support` sounds like the right approach.
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org