[Bug][java] Missing Log4j dependencies in IDE support
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
- Domain
- build-system, desktop-dev
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
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
- Import the project into IntelliJ IDEA.
- Create a run configuration for
org.apache.flink.agents.examples.WorkflowSingleAgentExample, using theexamplesmodule classpath. - 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
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/flink-agents
-
priority/minor tech debt
Difficulty 3/5 Half a day Newbie friendliness 72/100
apache/flink-agents#1266 · 1 comment ·
Maintainers usually reply within 2 days
-
[Doc] Improve Sub-Agents documentationPossibly taken @yunfengzhou-hub claimed this 3 days ago. Openpriority/major tech debt
apache/flink-agents#1258 · 1 assignee ·
Maintainers usually reply within 2 days
-
[Feature] Render a flat RowTypeInfo output schema as JSON SchemaPossibly taken @sangkyoonnam claimed this 1 day ago. Openfeature priority/major
Difficulty 4/5 3-5 days Newbie friendliness 35/100
apache/flink-agents#1256 · 2 comments · 1 assignee ·
Maintainers usually reply within 2 days
-
[Tech Debt][api] Chat model setups handle a blank model differently across providers and languagesOpenpriority/major tech debt
Difficulty 4/5 3-5 days Newbie friendliness 25/100
apache/flink-agents#1255 ·
Maintainers usually reply within 2 days
-
[Bug][integrations][java] A Map field in a native schema becomes an empty object on OpenAI, Azure OpenAI and AnthropicPossibly taken @weiqingy claimed this 1 day ago. Openbug priority/major
Difficulty 4/5 3-5 days Newbie friendliness 40/100
apache/flink-agents#1253 · 3 comments · 1 assignee ·
Maintainers usually reply within 2 days
All issues in apache/flink-agents
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 88/100
PhasetransCrystal/FPSMatch#47 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 76/100
apache/maven-toolchains-plugin#205 · 1 comment ·
Maintainers usually reply within 2 days
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
Maintainers usually reply within 1 day
-
type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day