-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix compiler error on kafka-emitter #13029
Fix compiler error on kafka-emitter #13029
Conversation
… incomplete. Cannot find the class file for org.slf4j.Logger. Fix the build path then try building this project
Kafka emitter does not directly use API in slf4j. Which IDE are you using? Intellij? If it is, usually 'Reload All Maven Projects' button on the Maven panel solves compliation problem on IDE. |
@FrankChen021 I am seeing this error on VSCode. |
I have worked around this by using the solution posted at the end of redhat-developer/vscode-java#2569 but maybe we should add the directive to the pom? |
@dampcake Thanks for the link. Seems it's a problem at the vs code side. I'm wondering if this problem is only on Kafka emitter extension? |
Yes, it is indeed only on kafka-emitter extension. |
Without adding that dependency, this is marked as broken: public class KafkaEmitter implements Emitter
{
private static Logger log = new Logger(KafkaEmitter.class);
...
} with the following message:
|
It should affect any IDE that uses m2e; VSCode and Eclipse, possibly others. Would also extend to stuff based on those like GitHub Codespaces. |
But if we look at other extensions, such as graphite emitter, it has the same code, public class GraphiteEmitter implements Emitter
{
private static Logger log = new Logger(GraphiteEmitter.class); And this extension does not explictly include slf4j dependency. Why doesn't it have similar compliation error? This is weired. |
Description
Fix compiler error on IDE:
Key changed/added classes in this PR
KafkaEmitter.java
This PR has: