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

Exception java.lang.NoSuchMethodError: 'void net.openhft.chronicle.wire.Wire.usePadding(boolean) #674

Closed
RajvanshR opened this issue May 15, 2020 · 2 comments

Comments

@RajvanshR
Copy link

I am using the latest version of Chronicle Queue 5.19.15. Test program is

        try (ChronicleQueue chronicleQueue = ChronicleQueue.singleBuilder(
                System.getProperty("user.dir") +
                        "/OpenHFT/trades").build()) {

            final ExcerptAppender excerptAppender =
                    chronicleQueue.acquireAppender();
            try (DocumentContext documentContext = excerptAppender.writingDocument()) {
                documentContext.wire().write().text("Hello Chronicle Queue");
            }

        }

Error is

log4j:WARN No appenders could be found for logger (net.openhft.chronicle.core.Jvm).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by net.openhft.chronicle.core.Jvm to field java.nio.Buffer.address
WARNING: Please consider reporting this to the maintainers of net.openhft.chronicle.core.Jvm
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Exception in thread "main" java.lang.NoSuchMethodError: 'void net.openhft.chronicle.wire.Wire.usePadding(boolean)'
	at net.openhft.chronicle.queue.impl.single.SingleChronicleQueueExcerpts$StoreAppender.createWire(SingleChronicleQueueExcerpts.java:318)
	at net.openhft.chronicle.queue.impl.single.SingleChronicleQueueExcerpts$StoreAppender.resetWires(SingleChronicleQueueExcerpts.java:297)
	at net.openhft.chronicle.queue.impl.single.SingleChronicleQueueExcerpts$StoreAppender.setCycle2(SingleChronicleQueueExcerpts.java:274)
	at net.openhft.chronicle.queue.impl.single.SingleChronicleQueueExcerpts$StoreAppender.setWireIfNull(SingleChronicleQueueExcerpts.java:426)
	at net.openhft.chronicle.queue.impl.single.SingleChronicleQueueExcerpts$StoreAppender.writingDocument(SingleChronicleQueueExcerpts.java:394)
	at net.openhft.chronicle.queue.impl.single.SingleChronicleQueueExcerpts$StoreAppender.writingDocument(SingleChronicleQueueExcerpts.java:360)
	at ChronicleQueueDemo.main(ChronicleQueueDemo.java:18)

Process finished with exit code 1
@dpisklov
Copy link
Contributor

@RajvanshR you have some problem with your dependencies - likely you specify chronicle-wire explicitly somewhere. We recommend using chronicle-bom for all Chronicle-related dependency management to avoid this.

@RajvanshR
Copy link
Author

Thanks @dpisklov . I had previously downloaded Chronicle Map and Chronicle Wire in the same project. I just removed below two entries from .IML file and it worked fine.

    <orderEntry type="library" name="net.openhft:chronicle-map:3.19.4" level="project" />
    <orderEntry type="library" name="net.openhft:chronicle-wire:2.19.11" level="project" />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants