Mailing List Archive

Getting LinkageError due to Panama APIs
Hi everyone,

I’m trying to build and run my software using JDK 19 which has a direct
dependency on Apache Lucene 9.6 built with JDK 17 and I’m running into
below exception due to Panama APIs. Is this expected behaviour? Any help
would be highly appreciated.

Exception in thread "main" java.lang.LinkageError:
MemorySegmentIndexInputProvider is missing in Lucene JAR file
at org.apache.lucene.store.MMapDirectory.lookupProvider(MMapDirectory.java:437)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
at org.apache.lucene.store.MMapDirectory.doPrivileged(MMapDirectory.java:395)
at org.apache.lucene.store.MMapDirectory.<clinit>(MMapDirectory.java:448)
:
:



Thanks,
Shubham
Re: Getting LinkageError due to Panama APIs [ In reply to ]
This was an internal build issue that is now fixed. Sorry for the confusion.

Thanks,
Shubham

On Tue, Jun 27, 2023 at 12:48?AM Shubham Chaudhary <shubhmasand@gmail.com>
wrote:

> Hi everyone,
>
> I’m trying to build and run my software using JDK 19 which has a direct
> dependency on Apache Lucene 9.6 built with JDK 17 and I’m running into
> below exception due to Panama APIs. Is this expected behaviour? Any help
> would be highly appreciated.
>
> Exception in thread "main" java.lang.LinkageError: MemorySegmentIndexInputProvider is missing in Lucene JAR file
> at org.apache.lucene.store.MMapDirectory.lookupProvider(MMapDirectory.java:437)
> at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
> at org.apache.lucene.store.MMapDirectory.doPrivileged(MMapDirectory.java:395)
> at org.apache.lucene.store.MMapDirectory.<clinit>(MMapDirectory.java:448)
> :
> :
>
>
>
> Thanks,
> Shubham
>
Re: Getting LinkageError due to Panama APIs [ In reply to ]
Hi,

It is not obvious what you have done, but the issue may come from custom
builds, e.g., if you are not using the original Lucene JAR file but a
modified one. Another reason may be Maven Shade plugin or other
assemblies like Uber-JARs!

Make sure that all class files and module information is included in the
final Uber-JAR. The Lucene team does not support repackaging Lucene JAR
files as this causes problems.

Uwe

Am 26.06.2023 um 21:18 schrieb Shubham Chaudhary:
> Hi everyone,
>
> I’m trying to build and run my software using JDK 19 which has a direct
> dependency on Apache Lucene 9.6 built with JDK 17 and I’m running into
> below exception due to Panama APIs. Is this expected behaviour? Any help
> would be highly appreciated.
>
> Exception in thread "main" java.lang.LinkageError:
> MemorySegmentIndexInputProvider is missing in Lucene JAR file
> at org.apache.lucene.store.MMapDirectory.lookupProvider(MMapDirectory.java:437)
> at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
> at org.apache.lucene.store.MMapDirectory.doPrivileged(MMapDirectory.java:395)
> at org.apache.lucene.store.MMapDirectory.<clinit>(MMapDirectory.java:448)
> :
> :
>
>
>
> Thanks,
> Shubham
>
--
Uwe Schindler
Achterdiek 19, D-28357 Bremen
https://www.thetaphi.de
eMail: uwe@thetaphi.de


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org