Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[Bug][java] Missing Log4j dependencies in IDE support

Closed Beginner friendly
#1,209 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
java

Research direction

Start with ide-support/pom.xml and inspect how its dependencies relate to the runtime module’s provided Log4j dependencies and the change referenced in issue #954. Reproduce the failure with the described IntelliJ IDEA run configuration for WorkflowSingleAgentExample; done means the local Java example runs without the NoClassDefFoundError and the IDE support dependency is appropriate.

Written by the indexing model from the issue text.

Description

bug priority/major
Search before asking
  • I searched in the issues and found nothing similar.
Description

Running the Java example locally fails with:

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?

<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?
  • I'm willing to submit a PR!
Dominant language
Java
Stars
469
Forks
171
Avg merge
3d 17h
Merged PRs (30d)
62

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/flink-agents

All issues in apache/flink-agents

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.