lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <...@thetaphi.de>
Subject RE: Java 9 issues
Date Fri, 28 Jul 2017 06:37:25 GMT
Hallo,

as with OSGI, there is currently no support for running Lucene in Java 9. This requires a
complete restructure of the Lucene/Solr package structure and that's not going to happen in
the next release. You should compile and run Lucene with the standard classpath where it works
without any problems! Don't put the JAR files as auto-modules on the module-path (neither
at runtime nor at compile time). So stay with classpath and all should be fine.

FYI, when placed on classpath, Apache Lucene and Solr (latest 6.x) versions are compatible
with the module system and its restrictions (it works with illegal-access=deny and we run
our tests with it), but you cannot make modules out of the JARs. 

One solutions is possible: Combine all Lucene JARs to one Uber JAR file using Maven Shade
plugin and use that as a "single huge module".

Uwe

-----
Uwe Schindler
Achterdiek 19, D-28357 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de

> -----Original Message-----
> From: Abu Abdullah [mailto:falcon.sheep@gmail.com]
> Sent: Friday, July 28, 2017 6:33 AM
> To: java-user@lucene.apache.org
> Subject: Java 9 issues
> 
> Hi,
> 
> I'm trying to compile my app in java 9 where i hit an issue related to
> the module system of java 9. the current lucene libraries (JARs) have
> the same classes in multiple JARs (considered modules in java9). the
> error thrown is:
> 
> error: module ant reads package org.apache.lucene.analysis.standard
> from both lucene.core and lucene.analyzers.common
> error: module lucene.highlighter reads package
> org.apache.lucene.search from both lucene.sandbox and lucene.core
> error: module lucene.highlighter reads package
> org.apache.lucene.document from both lucene.sandbox and lucene.core
> error: module lucene.highlighter reads package
> org.apache.lucene.analysis.standard from both lucene.core and
> lucene.analyzers.common
> 
> 
> and many more ...
> 
> the module system checks that no two named modules split a package.
> the only option i have seen to solve this is to use the --patch-module
> but it seems not working for me e.g.
> 
> javac --module-path lib --patch-module
> lucene.core=lucene.analyzers.common -d mods/com.myApp
> src/module-info.java src/com/myApp/*
> 
> 
> any support is appreciated
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org


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


Mime
View raw message