You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Andi Vajda <os...@ovaltofu.org> on 2022/01/04 18:36:25 UTC

issue with modules while building PyLucene

  Hi,

I was able to build PyLucene with Lucene 9.0 and have it pass all its tests.
Now, I moved to branch_9x (to get access to the new collectRuntimeJars 
Gradle task) and I'm hitting an issue that seems to be related to the new 
work around java modules:

   Exception in thread "main" java.lang.NoClassDefFoundError: module-info is
   not a class because access_flag ACC_MODULE is set

I now nothing about java modules so maybe this is trivial or non-sensical 
but all JCC is doing with the Lucene jars in order to build PyLucene is to 
load them, walk their class trees and, using reflection, generate wrappers 
for the publicly accessible methods and some extra ones as well, as listed 
in the JCC command line (at line 215 in PyLucene's Makefile here:
   https://svn.apache.org/repos/asf/lucene/pylucene/trunk/Makefile

Is there an easy way to disable the module feature ? (does this question 
even make sense ? is there a proper way to do what JCC is doing with modules 
enabled ?)

Thanks !

Andi..

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


Re: issue with modules while building PyLucene

Posted by Andi Vajda <os...@ovaltofu.org>.
On Tue, 4 Jan 2022, Andi Vajda wrote:

>
> On Tue, 4 Jan 2022, Dawid Weiss wrote:
>
>> You have to exclude that module-info.class from processing somehow, Andi.
>> It isn't a proper class indeed. Can jcc accept an exclusion pattern 
>> somehow?
>
> Oh yes, that's not a problem, just add it via --exclude, let me try that and 
> report back.

Yes, that worked like a charm.
PyLucene now builds with Lucene 9x sources and passes its tests.

Thank you for the clue !

Andi..

>
> Andi..
>
>> 
>> Dawid
>> 
>> On Tue, Jan 4, 2022 at 7:36 PM Andi Vajda <os...@ovaltofu.org> wrote:
>> 
>>>
>>>   Hi,
>>> 
>>> I was able to build PyLucene with Lucene 9.0 and have it pass all its
>>> tests.
>>> Now, I moved to branch_9x (to get access to the new collectRuntimeJars
>>> Gradle task) and I'm hitting an issue that seems to be related to the new
>>> work around java modules:
>>>
>>>    Exception in thread "main" java.lang.NoClassDefFoundError: module-info
>>> is
>>>    not a class because access_flag ACC_MODULE is set
>>> 
>>> I now nothing about java modules so maybe this is trivial or non-sensical
>>> but all JCC is doing with the Lucene jars in order to build PyLucene is to
>>> load them, walk their class trees and, using reflection, generate wrappers
>>> for the publicly accessible methods and some extra ones as well, as listed
>>> in the JCC command line (at line 215 in PyLucene's Makefile here:
>>>    https://svn.apache.org/repos/asf/lucene/pylucene/trunk/Makefile
>>> 
>>> Is there an easy way to disable the module feature ? (does this question
>>> even make sense ? is there a proper way to do what JCC is doing with
>>> modules
>>> enabled ?)
>>> 
>>> Thanks !
>>> 
>>> Andi..
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
>>> For additional commands, e-mail: dev-help@lucene.apache.org
>>> 
>>> 
>> 
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
>

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


Re: issue with modules while building PyLucene

Posted by Dawid Weiss <da...@gmail.com>.
For the record - that module-info.class isn't really needed since Lucene is
designed to work fine in classpath mode anyway (and in classpath mode the
module info is ignored too).

On Tue, Jan 4, 2022 at 7:52 PM Andi Vajda <os...@ovaltofu.org> wrote:

>
> On Tue, 4 Jan 2022, Dawid Weiss wrote:
>
> > You have to exclude that module-info.class from processing somehow, Andi.
> > It isn't a proper class indeed. Can jcc accept an exclusion pattern
> somehow?
>
> Oh yes, that's not a problem, just add it via --exclude, let me try that
> and
> report back.
>
> Andi..
>
> >
> > Dawid
> >
> > On Tue, Jan 4, 2022 at 7:36 PM Andi Vajda <os...@ovaltofu.org> wrote:
> >
> >>
> >>   Hi,
> >>
> >> I was able to build PyLucene with Lucene 9.0 and have it pass all its
> >> tests.
> >> Now, I moved to branch_9x (to get access to the new collectRuntimeJars
> >> Gradle task) and I'm hitting an issue that seems to be related to the
> new
> >> work around java modules:
> >>
> >>    Exception in thread "main" java.lang.NoClassDefFoundError:
> module-info
> >> is
> >>    not a class because access_flag ACC_MODULE is set
> >>
> >> I now nothing about java modules so maybe this is trivial or
> non-sensical
> >> but all JCC is doing with the Lucene jars in order to build PyLucene is
> to
> >> load them, walk their class trees and, using reflection, generate
> wrappers
> >> for the publicly accessible methods and some extra ones as well, as
> listed
> >> in the JCC command line (at line 215 in PyLucene's Makefile here:
> >>    https://svn.apache.org/repos/asf/lucene/pylucene/trunk/Makefile
> >>
> >> Is there an easy way to disable the module feature ? (does this question
> >> even make sense ? is there a proper way to do what JCC is doing with
> >> modules
> >> enabled ?)
> >>
> >> Thanks !
> >>
> >> Andi..
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> >> For additional commands, e-mail: dev-help@lucene.apache.org
> >>
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
>

Re: issue with modules while building PyLucene

Posted by Andi Vajda <os...@ovaltofu.org>.
On Tue, 4 Jan 2022, Dawid Weiss wrote:

> You have to exclude that module-info.class from processing somehow, Andi.
> It isn't a proper class indeed. Can jcc accept an exclusion pattern somehow?

Oh yes, that's not a problem, just add it via --exclude, let me try that and 
report back.

Andi..

>
> Dawid
>
> On Tue, Jan 4, 2022 at 7:36 PM Andi Vajda <os...@ovaltofu.org> wrote:
>
>>
>>   Hi,
>>
>> I was able to build PyLucene with Lucene 9.0 and have it pass all its
>> tests.
>> Now, I moved to branch_9x (to get access to the new collectRuntimeJars
>> Gradle task) and I'm hitting an issue that seems to be related to the new
>> work around java modules:
>>
>>    Exception in thread "main" java.lang.NoClassDefFoundError: module-info
>> is
>>    not a class because access_flag ACC_MODULE is set
>>
>> I now nothing about java modules so maybe this is trivial or non-sensical
>> but all JCC is doing with the Lucene jars in order to build PyLucene is to
>> load them, walk their class trees and, using reflection, generate wrappers
>> for the publicly accessible methods and some extra ones as well, as listed
>> in the JCC command line (at line 215 in PyLucene's Makefile here:
>>    https://svn.apache.org/repos/asf/lucene/pylucene/trunk/Makefile
>>
>> Is there an easy way to disable the module feature ? (does this question
>> even make sense ? is there a proper way to do what JCC is doing with
>> modules
>> enabled ?)
>>
>> Thanks !
>>
>> Andi..
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: dev-help@lucene.apache.org
>>
>>
>

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


Re: issue with modules while building PyLucene

Posted by Dawid Weiss <da...@gmail.com>.
You have to exclude that module-info.class from processing somehow, Andi.
It isn't a proper class indeed. Can jcc accept an exclusion pattern somehow?

Dawid

On Tue, Jan 4, 2022 at 7:36 PM Andi Vajda <os...@ovaltofu.org> wrote:

>
>   Hi,
>
> I was able to build PyLucene with Lucene 9.0 and have it pass all its
> tests.
> Now, I moved to branch_9x (to get access to the new collectRuntimeJars
> Gradle task) and I'm hitting an issue that seems to be related to the new
> work around java modules:
>
>    Exception in thread "main" java.lang.NoClassDefFoundError: module-info
> is
>    not a class because access_flag ACC_MODULE is set
>
> I now nothing about java modules so maybe this is trivial or non-sensical
> but all JCC is doing with the Lucene jars in order to build PyLucene is to
> load them, walk their class trees and, using reflection, generate wrappers
> for the publicly accessible methods and some extra ones as well, as listed
> in the JCC command line (at line 215 in PyLucene's Makefile here:
>    https://svn.apache.org/repos/asf/lucene/pylucene/trunk/Makefile
>
> Is there an easy way to disable the module feature ? (does this question
> even make sense ? is there a proper way to do what JCC is doing with
> modules
> enabled ?)
>
> Thanks !
>
> Andi..
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
>