You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "JinkunLiu (via GitHub)" <gi...@apache.org> on 2026/02/17 07:27:03 UTC

[I] [Bug] [Example] Missing flink-json dependency causes ValidationException in WorkflowMultipleAgentExample [flink-agents]

JinkunLiu opened a new issue, #540:
URL: https://github.com/apache/flink-agents/issues/540

   ### Search before asking
   
   - [x] I searched in the [issues](https://github.com/apache/flink-agents/issues) and found nothing similar.
   
   ### Description
   
   When running the WorkflowMultipleAgentExample in local, the application fails to start due to a ValidationException.
   
   The example code attempts to create a table source using the 'format'='json' option:
   
   ```java
   // WorkflowMultipleAgentExample.java
   tableEnv.createTemporaryTable(
           "product_reviews",
           TableDescriptor.forConnector("filesystem")
                   // ...
                   .option("format", "json") // Requires flink-json on classpath
                   // ...
                   .build());
   ```
   However, the flink-json dependency is not explicitly declared in examples/pom.xml (or ide-support/pom.xml), cause finding for the JSON format factory failed.
   
   ### How to reproduce
   
   1. Run the main method of class `org.apache.flink.agents.examples.WorkflowMultipleAgentExample` in IDE.
   2. The execution fails with the exception below.
   ### Stack Trace
   ```
   Exception in thread "main" org.apache.flink.table.api.ValidationException: Unable to create a source for reading table 'default_catalog.default_database.product_reviews'.
   ...
   Caused by: org.apache.flink.table.api.ValidationException: Could not find any format factory for identifier 'json' in the classpath.
   	at org.apache.flink.connector.file.table.FileSystemTableSource.<init>(FileSystemTableSource.java:118)
   	at org.apache.flink.connector.file.table.FileSystemTableFactory.createDynamicTableSource(FileSystemTableFactory.java:78)
   	at org.apache.flink.table.factories.FactoryUtil.createDynamicTableSource(FactoryUtil.java:241)
   	...
   ```
   
   ### Version and environment
   
   version: main branch, after this commit [b03e69ad](https://github.com/apache/flink-agents/issues/527)
   
   ### 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] [Example] Missing flink-json dependency causes ValidationException in WorkflowMultipleAgentExample [flink-agents]

Posted by "JinkunLiu (via GitHub)" <gi...@apache.org>.
JinkunLiu commented on issue #540:
URL: https://github.com/apache/flink-agents/issues/540#issuecomment-3912825710

   Hello @weiqingy.
   
   Could you please take a look? If I have misunderstood anything, I'm happy to be corrected.


-- 
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] [Example] Missing flink-json dependency causes ValidationException in WorkflowMultipleAgentExample [flink-agents]

Posted by "xintongsong (via GitHub)" <gi...@apache.org>.
xintongsong closed issue #540: [Bug] [Example] Missing flink-json dependency causes ValidationException in WorkflowMultipleAgentExample
URL: https://github.com/apache/flink-agents/issues/540


-- 
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] [Example] Missing flink-json dependency causes ValidationException in WorkflowMultipleAgentExample [flink-agents]

Posted by "weiqingy (via GitHub)" <gi...@apache.org>.
weiqingy commented on issue #540:
URL: https://github.com/apache/flink-agents/issues/540#issuecomment-3919008932

   Thanks for reporting this @JinkunLiu. You're right - commit b03e69ad added the WorkflowMultipleAgentExample which uses "format"="json" but missed adding the flink-json dependency. The fix you suggested is correct. Since you offered to submit a PR, feel free to go ahead. It should be a hotfix adding flink-json to examples/pom.xml and ide-support/pom.xml.
   


-- 
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