Skip to content
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

An occasional problem:Unable to load implementation class JsonFormat #570

Open
epiao55 opened this issue May 17, 2023 · 1 comment
Open
Labels
needs-user-input The author of an issue or PR should provide more details

Comments

@epiao55
Copy link

epiao55 commented May 17, 2023

I have a cluster that deploys the same image, with a total of six nodes. Occasionally, some nodes do not load the JsonFormat class,
The relevant codes are as follows

EventFormat eventFormat = EventFormatProvider.getInstance()
                    .resolveFormat(JsonFormat.CONTENT_TYPE);
            if (eventFormat == null) {
                logger.info("resolveFormat failed,force retry..");
                eventFormat = new JsonFormat().withForceNonJsonDataToString();
                if (eventFormat != null) {
                    logger.info("resolveFormat failed,retry success..");
                }
                EventFormatProvider.getInstance().registerFormat(eventFormat);
                return eventFormat;

i observed that the SPI mechanism did not take effect on the problem node and manually instantiated the successful log of the JsonFormat class.
I can't understand why this situation occurs. It occurs relatively infrequently, but it does exist. The current solution is not elegant enough, and I hope to receive help.

this is my version
image

@pierDipi
Copy link
Member

It seems a problem on how you're packaging your application to me, can you share a minimal reproducer?

@pierDipi pierDipi added the needs-user-input The author of an issue or PR should provide more details label Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-user-input The author of an issue or PR should provide more details
Projects
None yet
Development

No branches or pull requests

2 participants