You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Prashant Saxena <an...@gmail.com> on 2024/10/20 08:50:21 UTC

lucene build failure on Windows using pylucene 9.7.0

 Hello,
OS : Windows 10
PyLucene : 9.7.0
JDK : 23.0

Although I can download the binary distribution of version 9.7.0, I have
decided to build it from scratch as
I am new to javascript and lucene. It will help me learn.

1. downloading and extracting pylucene
2. cd lucene-java-9.7.0
3. gradlew.bat assemble

Downloading https://services.gradle.org/distributions/gradle-7.6-bin.zip
...........10%............20%...........30%............40%............50%...........60%............70%............80%...........90%............100%

Welcome to Gradle 7.6!

Here are the highlights of this release:
 - Added support for Java 19.
 - Introduced `--rerun` flag for individual task rerun.
 - Improved dependency block for test suites to be strongly typed.
 - Added a pluggable system for Java toolchains provisioning.

For more details see https://docs.gradle.org/7.6/release-notes.html

Starting a Gradle Daemon (subsequent builds will be faster)

FAILURE: Build failed with an exception.

* What went wrong:
Could not open cp_settings generic class cache for settings file
'D:\projects\database\pylucene-9.7.0\lucene-java-9.7.0\settings.gradle'
(C:\Users\rudra\.gradle\caches\7.6\scripts\db9c3q2cn4ry8xtriod5nz7j3).
> BUG! exception in phase 'semantic analysis' in source unit
'_BuildScript_' Unsupported class file major version 67

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 28s

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

When building extensions using command inside pylucene-9.7.0\extensions >
gradle build.gradle

Starting a Gradle Daemon (subsequent builds will be faster)

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'extensions'.
> Could not open proj generic class cache for build file
'D:\projects\database\pylucene-9.7.0\extensions\build.gradle'
(C:\Users\rudra\.gradle\caches\7.6\scripts\56nwbjprgveuli1run17g3ivk).
   > BUG! exception in phase 'semantic analysis' in source unit
'_BuildScript_' Unsupported class file major version 67

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 13s

Re: lucene build failure on Windows using pylucene 9.7.0

Posted by Gautam Worah <wo...@gmail.com>.
Hi Prashant,

From your error it looks like the system is somehow trying to run code
compiled with Java 23 (major version 67) but is unable to.
Gradle 7.6 only has support for Java 19 and lower.
Java 23 support was added in Gradle 8.10+.

Try running it with JDK 19 or alternatively, the JDK recommended by
PyLucene 9.7?

Best,
Gautam Worah.


On Mon, Oct 21, 2024 at 9:06 AM Prashant Saxena <an...@gmail.com>
wrote:

>  Hello,
> OS : Windows 10
> PyLucene : 9.7.0
> JDK : 23.0
>
> Although I can download the binary distribution of version 9.7.0, I have
> decided to build it from scratch as
> I am new to javascript and lucene. It will help me learn.
>
> 1. downloading and extracting pylucene
> 2. cd lucene-java-9.7.0
> 3. gradlew.bat assemble
>
> Downloading https://services.gradle.org/distributions/gradle-7.6-bin.zip
>
> ...........10%............20%...........30%............40%............50%...........60%............70%............80%...........90%............100%
>
> Welcome to Gradle 7.6!
>
> Here are the highlights of this release:
>  - Added support for Java 19.
>  - Introduced `--rerun` flag for individual task rerun.
>  - Improved dependency block for test suites to be strongly typed.
>  - Added a pluggable system for Java toolchains provisioning.
>
> For more details see https://docs.gradle.org/7.6/release-notes.html
>
> Starting a Gradle Daemon (subsequent builds will be faster)
>
> FAILURE: Build failed with an exception.
>
> * What went wrong:
> Could not open cp_settings generic class cache for settings file
> 'D:\projects\database\pylucene-9.7.0\lucene-java-9.7.0\settings.gradle'
> (C:\Users\rudra\.gradle\caches\7.6\scripts\db9c3q2cn4ry8xtriod5nz7j3).
> > BUG! exception in phase 'semantic analysis' in source unit
> '_BuildScript_' Unsupported class file major version 67
>
> * Try:
> > Run with --stacktrace option to get the stack trace.
> > Run with --info or --debug option to get more log output.
> > Run with --scan to get full insights.
>
> * Get more help at https://help.gradle.org
>
> BUILD FAILED in 28s
>
>
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> When building extensions using command inside pylucene-9.7.0\extensions >
> gradle build.gradle
>
> Starting a Gradle Daemon (subsequent builds will be faster)
>
> FAILURE: Build failed with an exception.
>
> * What went wrong:
> A problem occurred configuring root project 'extensions'.
> > Could not open proj generic class cache for build file
> 'D:\projects\database\pylucene-9.7.0\extensions\build.gradle'
> (C:\Users\rudra\.gradle\caches\7.6\scripts\56nwbjprgveuli1run17g3ivk).
>    > BUG! exception in phase 'semantic analysis' in source unit
> '_BuildScript_' Unsupported class file major version 67
>
> * Try:
> > Run with --stacktrace option to get the stack trace.
> > Run with --info or --debug option to get more log output.
> > Run with --scan to get full insights.
>
> * Get more help at https://help.gradle.org
>
> BUILD FAILED in 13s
>