You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Mike Oliver <Mi...@open4businessonline.com> on 2021/10/06 22:39:42 UTC

gradlew.bat cleanAll loadAll Error

I am on windows 10. I have JAVA_HOME set to my Java 11 and path includes
both java and gradle 7.2. also installed and gradle --version shows the 7.2
and java are found.

The OFBiz directory has a gradle subdirectory, settings.gradle,
gradlew.bat, init-gradle-wrapper.bat, common.gradle file, and gradlew file.

trying to run gradlew.bat cleanAll loadAll in that directory fails with

C:\apache-ofbiz-17.12.08\apache-ofbiz-17.12.08>gradlew.bat cleanAll loadAll
Error: Could not find or load main class
org.gradle.wrapper.GradleWrapperMain Caused by:
java.lang.ClassNotFoundException: org.gradle.wrapper.GradleWrapperMain

Trying

C:\apache-ofbiz-17.12.08\apache-ofbiz-17.12.08>init-gradle-wrapper.bat
'pwsh' is not recognized as an internal or external command, operable
program or batch file.

gradle wrapper --version 7.2

C:\apache-ofbiz-17.12.08\apache-ofbiz-17.12.08>gradle wrapper --version 7.2



Gradle 7.2

Build time: 2021-08-17 09:59:03 UTC Revision:
a773786b58bb28710e3dc96c4d1a7063628952ad

Kotlin: 1.5.21 Groovy: 3.0.8 Ant: Apache Ant(TM) version 1.10.9 compiled on
September 27 2020 JVM: 11.0.12 (Microsoft 11.0.12+7) OS: Windows 10 10.0
amd64

C:\apache-ofbiz-17.12.08\apache-ofbiz-17.12.08>

Still gets

C:\apache-ofbiz-17.12.08\apache-ofbiz-17.12.08>gradlew cleanAll loadAll
Error: Could not find or load main class
org.gradle.wrapper.GradleWrapperMain Caused by:
java.lang.ClassNotFoundException: org.gradle.wrapper.GradleWrapperMain

Don't know what else to try.

Re: gradlew.bat cleanAll loadAll Error

Posted by Mike Oliver <Mi...@open4businessonline.com>.
Thanks Jacues,

Installed OpenJDK 8 and everything was fine.

MO

On Sun, Oct 10, 2021, 5:07 PM Jacques Le Roux <ja...@les7arts.com>
wrote:

> Hi Mike,
>
> Check  and follow
> https://ci.apache.org/projects/ofbiz/site/stable/readme/html5/README.html
>
> HTH
>
> Le 10/10/2021 à 05:59, Mike Oliver a écrit :
> > Hi Jacques,
> >
> > I also tried changing to the oracle Java jdk and resetting JAVA_HOME and
> > path accordingly and re-running init-gradle-wrapper.bat
> >
> > No appreciable change except the java version
> >
> > On Thu, Oct 7, 2021, 5:22 PM Jacques Le Roux <
> jacques.le.roux@les7arts.com>
> > wrote:
> >
> >> Hi Mike,
> >>
> >> OFBiz uses Gradle 6.5. You must to set the wrapper with
> >> init-gradle-wrapper.bat
> >>
> >> Also this may help:
> >>
> https://lists.apache.org/thread.html/r413f103da2b22da4b59c0d35f1552d9c7603569956cd191e631aa281%40%3Cuser.ofbiz.apache.org%3E
> >>
> >> HTH
> >>
> >> Jacques
> >>
> >> Le 07/10/2021 à 00:39, Mike Oliver a écrit :
> >>> I am on windows 10. I have JAVA_HOME set to my Java 11 and path
> includes
> >>> both java and gradle 7.2. also installed and gradle --version shows the
> >> 7.2
> >>> and java are found.
> >>>
> >>> The OFBiz directory has a gradle subdirectory, settings.gradle,
> >>> gradlew.bat, init-gradle-wrapper.bat, common.gradle file, and gradlew
> >> file.
> >>> trying to run gradlew.bat cleanAll loadAll in that directory fails with
> >>>
> >>> C:\apache-ofbiz-17.12.08\apache-ofbiz-17.12.08>gradlew.bat cleanAll
> >> loadAll
> >>> Error: Could not find or load main class
> >>> org.gradle.wrapper.GradleWrapperMain Caused by:
> >>> java.lang.ClassNotFoundException: org.gradle.wrapper.GradleWrapperMain
> >>>
> >>> Trying
> >>>
> >>> C:\apache-ofbiz-17.12.08\apache-ofbiz-17.12.08>init-gradle-wrapper.bat
> >>> 'pwsh' is not recognized as an internal or external command, operable
> >>> program or batch file.
> >>>
> >>> gradle wrapper --version 7.2
> >>>
> >>> C:\apache-ofbiz-17.12.08\apache-ofbiz-17.12.08>gradle wrapper --version
> >> 7.2
> >>>
> >>>
> >>> Gradle 7.2
> >>>
> >>> Build time: 2021-08-17 09:59:03 UTC Revision:
> >>> a773786b58bb28710e3dc96c4d1a7063628952ad
> >>>
> >>> Kotlin: 1.5.21 Groovy: 3.0.8 Ant: Apache Ant(TM) version 1.10.9
> compiled
> >> on
> >>> September 27 2020 JVM: 11.0.12 (Microsoft 11.0.12+7) OS: Windows 10
> 10.0
> >>> amd64
> >>>
> >>> C:\apache-ofbiz-17.12.08\apache-ofbiz-17.12.08>
> >>>
> >>> Still gets
> >>>
> >>> C:\apache-ofbiz-17.12.08\apache-ofbiz-17.12.08>gradlew cleanAll loadAll
> >>> Error: Could not find or load main class
> >>> org.gradle.wrapper.GradleWrapperMain Caused by:
> >>> java.lang.ClassNotFoundException: org.gradle.wrapper.GradleWrapperMain
> >>>
> >>> Don't know what else to try.
> >>
>

Re: gradlew.bat cleanAll loadAll Error

Posted by Jacques Le Roux <ja...@les7arts.com>.
Hi Mike,

Check  and follow https://ci.apache.org/projects/ofbiz/site/stable/readme/html5/README.html

HTH

Le 10/10/2021 à 05:59, Mike Oliver a écrit :
> Hi Jacques,
>
> I also tried changing to the oracle Java jdk and resetting JAVA_HOME and
> path accordingly and re-running init-gradle-wrapper.bat
>
> No appreciable change except the java version
>
> On Thu, Oct 7, 2021, 5:22 PM Jacques Le Roux <ja...@les7arts.com>
> wrote:
>
>> Hi Mike,
>>
>> OFBiz uses Gradle 6.5. You must to set the wrapper with
>> init-gradle-wrapper.bat
>>
>> Also this may help:
>> https://lists.apache.org/thread.html/r413f103da2b22da4b59c0d35f1552d9c7603569956cd191e631aa281%40%3Cuser.ofbiz.apache.org%3E
>>
>> HTH
>>
>> Jacques
>>
>> Le 07/10/2021 à 00:39, Mike Oliver a écrit :
>>> I am on windows 10. I have JAVA_HOME set to my Java 11 and path includes
>>> both java and gradle 7.2. also installed and gradle --version shows the
>> 7.2
>>> and java are found.
>>>
>>> The OFBiz directory has a gradle subdirectory, settings.gradle,
>>> gradlew.bat, init-gradle-wrapper.bat, common.gradle file, and gradlew
>> file.
>>> trying to run gradlew.bat cleanAll loadAll in that directory fails with
>>>
>>> C:\apache-ofbiz-17.12.08\apache-ofbiz-17.12.08>gradlew.bat cleanAll
>> loadAll
>>> Error: Could not find or load main class
>>> org.gradle.wrapper.GradleWrapperMain Caused by:
>>> java.lang.ClassNotFoundException: org.gradle.wrapper.GradleWrapperMain
>>>
>>> Trying
>>>
>>> C:\apache-ofbiz-17.12.08\apache-ofbiz-17.12.08>init-gradle-wrapper.bat
>>> 'pwsh' is not recognized as an internal or external command, operable
>>> program or batch file.
>>>
>>> gradle wrapper --version 7.2
>>>
>>> C:\apache-ofbiz-17.12.08\apache-ofbiz-17.12.08>gradle wrapper --version
>> 7.2
>>>
>>>
>>> Gradle 7.2
>>>
>>> Build time: 2021-08-17 09:59:03 UTC Revision:
>>> a773786b58bb28710e3dc96c4d1a7063628952ad
>>>
>>> Kotlin: 1.5.21 Groovy: 3.0.8 Ant: Apache Ant(TM) version 1.10.9 compiled
>> on
>>> September 27 2020 JVM: 11.0.12 (Microsoft 11.0.12+7) OS: Windows 10 10.0
>>> amd64
>>>
>>> C:\apache-ofbiz-17.12.08\apache-ofbiz-17.12.08>
>>>
>>> Still gets
>>>
>>> C:\apache-ofbiz-17.12.08\apache-ofbiz-17.12.08>gradlew cleanAll loadAll
>>> Error: Could not find or load main class
>>> org.gradle.wrapper.GradleWrapperMain Caused by:
>>> java.lang.ClassNotFoundException: org.gradle.wrapper.GradleWrapperMain
>>>
>>> Don't know what else to try.
>>

Re: gradlew.bat cleanAll loadAll Error

Posted by Mike Oliver <Mi...@open4businessonline.com>.
Hi Jacques,

I also tried changing to the oracle Java jdk and resetting JAVA_HOME and
path accordingly and re-running init-gradle-wrapper.bat

No appreciable change except the java version

On Thu, Oct 7, 2021, 5:22 PM Jacques Le Roux <ja...@les7arts.com>
wrote:

> Hi Mike,
>
> OFBiz uses Gradle 6.5. You must to set the wrapper with
> init-gradle-wrapper.bat
>
> Also this may help:
> https://lists.apache.org/thread.html/r413f103da2b22da4b59c0d35f1552d9c7603569956cd191e631aa281%40%3Cuser.ofbiz.apache.org%3E
>
> HTH
>
> Jacques
>
> Le 07/10/2021 à 00:39, Mike Oliver a écrit :
> > I am on windows 10. I have JAVA_HOME set to my Java 11 and path includes
> > both java and gradle 7.2. also installed and gradle --version shows the
> 7.2
> > and java are found.
> >
> > The OFBiz directory has a gradle subdirectory, settings.gradle,
> > gradlew.bat, init-gradle-wrapper.bat, common.gradle file, and gradlew
> file.
> >
> > trying to run gradlew.bat cleanAll loadAll in that directory fails with
> >
> > C:\apache-ofbiz-17.12.08\apache-ofbiz-17.12.08>gradlew.bat cleanAll
> loadAll
> > Error: Could not find or load main class
> > org.gradle.wrapper.GradleWrapperMain Caused by:
> > java.lang.ClassNotFoundException: org.gradle.wrapper.GradleWrapperMain
> >
> > Trying
> >
> > C:\apache-ofbiz-17.12.08\apache-ofbiz-17.12.08>init-gradle-wrapper.bat
> > 'pwsh' is not recognized as an internal or external command, operable
> > program or batch file.
> >
> > gradle wrapper --version 7.2
> >
> > C:\apache-ofbiz-17.12.08\apache-ofbiz-17.12.08>gradle wrapper --version
> 7.2
> >
> >
> >
> > Gradle 7.2
> >
> > Build time: 2021-08-17 09:59:03 UTC Revision:
> > a773786b58bb28710e3dc96c4d1a7063628952ad
> >
> > Kotlin: 1.5.21 Groovy: 3.0.8 Ant: Apache Ant(TM) version 1.10.9 compiled
> on
> > September 27 2020 JVM: 11.0.12 (Microsoft 11.0.12+7) OS: Windows 10 10.0
> > amd64
> >
> > C:\apache-ofbiz-17.12.08\apache-ofbiz-17.12.08>
> >
> > Still gets
> >
> > C:\apache-ofbiz-17.12.08\apache-ofbiz-17.12.08>gradlew cleanAll loadAll
> > Error: Could not find or load main class
> > org.gradle.wrapper.GradleWrapperMain Caused by:
> > java.lang.ClassNotFoundException: org.gradle.wrapper.GradleWrapperMain
> >
> > Don't know what else to try.
>
>

Re: gradlew.bat cleanAll loadAll Error

Posted by Mike Oliver <Mi...@open4businessonline.com>.
Hi Jacques,

Progress, but still not there yet.

Build failed

*What went wrong
Could not determine Java version from 11.0.12

My JAVA_HOME is
C:\Program Files\Microsoft\jdk-11.0.12.7-hotspot\

Thanks

On Thu, Oct 7, 2021, 5:22 PM Jacques Le Roux <ja...@les7arts.com>
wrote:

> Hi Mike,
>
> OFBiz uses Gradle 6.5. You must to set the wrapper with
> init-gradle-wrapper.bat
>
> Also this may help:
> https://lists.apache.org/thread.html/r413f103da2b22da4b59c0d35f1552d9c7603569956cd191e631aa281%40%3Cuser.ofbiz.apache.org%3E
>
> HTH
>
> Jacques
>
> Le 07/10/2021 à 00:39, Mike Oliver a écrit :
> > I am on windows 10. I have JAVA_HOME set to my Java 11 and path includes
> > both java and gradle 7.2. also installed and gradle --version shows the
> 7.2
> > and java are found.
> >
> > The OFBiz directory has a gradle subdirectory, settings.gradle,
> > gradlew.bat, init-gradle-wrapper.bat, common.gradle file, and gradlew
> file.
> >
> > trying to run gradlew.bat cleanAll loadAll in that directory fails with
> >
> > C:\apache-ofbiz-17.12.08\apache-ofbiz-17.12.08>gradlew.bat cleanAll
> loadAll
> > Error: Could not find or load main class
> > org.gradle.wrapper.GradleWrapperMain Caused by:
> > java.lang.ClassNotFoundException: org.gradle.wrapper.GradleWrapperMain
> >
> > Trying
> >
> > C:\apache-ofbiz-17.12.08\apache-ofbiz-17.12.08>init-gradle-wrapper.bat
> > 'pwsh' is not recognized as an internal or external command, operable
> > program or batch file.
> >
> > gradle wrapper --version 7.2
> >
> > C:\apache-ofbiz-17.12.08\apache-ofbiz-17.12.08>gradle wrapper --version
> 7.2
> >
> >
> >
> > Gradle 7.2
> >
> > Build time: 2021-08-17 09:59:03 UTC Revision:
> > a773786b58bb28710e3dc96c4d1a7063628952ad
> >
> > Kotlin: 1.5.21 Groovy: 3.0.8 Ant: Apache Ant(TM) version 1.10.9 compiled
> on
> > September 27 2020 JVM: 11.0.12 (Microsoft 11.0.12+7) OS: Windows 10 10.0
> > amd64
> >
> > C:\apache-ofbiz-17.12.08\apache-ofbiz-17.12.08>
> >
> > Still gets
> >
> > C:\apache-ofbiz-17.12.08\apache-ofbiz-17.12.08>gradlew cleanAll loadAll
> > Error: Could not find or load main class
> > org.gradle.wrapper.GradleWrapperMain Caused by:
> > java.lang.ClassNotFoundException: org.gradle.wrapper.GradleWrapperMain
> >
> > Don't know what else to try.
>
>

Re: gradlew.bat cleanAll loadAll Error

Posted by Jacques Le Roux <ja...@les7arts.com>.
Hi Mike,

OFBiz uses Gradle 6.5. You must to set the wrapper with init-gradle-wrapper.bat

Also this may help: https://lists.apache.org/thread.html/r413f103da2b22da4b59c0d35f1552d9c7603569956cd191e631aa281%40%3Cuser.ofbiz.apache.org%3E

HTH

Jacques

Le 07/10/2021 à 00:39, Mike Oliver a écrit :
> I am on windows 10. I have JAVA_HOME set to my Java 11 and path includes
> both java and gradle 7.2. also installed and gradle --version shows the 7.2
> and java are found.
>
> The OFBiz directory has a gradle subdirectory, settings.gradle,
> gradlew.bat, init-gradle-wrapper.bat, common.gradle file, and gradlew file.
>
> trying to run gradlew.bat cleanAll loadAll in that directory fails with
>
> C:\apache-ofbiz-17.12.08\apache-ofbiz-17.12.08>gradlew.bat cleanAll loadAll
> Error: Could not find or load main class
> org.gradle.wrapper.GradleWrapperMain Caused by:
> java.lang.ClassNotFoundException: org.gradle.wrapper.GradleWrapperMain
>
> Trying
>
> C:\apache-ofbiz-17.12.08\apache-ofbiz-17.12.08>init-gradle-wrapper.bat
> 'pwsh' is not recognized as an internal or external command, operable
> program or batch file.
>
> gradle wrapper --version 7.2
>
> C:\apache-ofbiz-17.12.08\apache-ofbiz-17.12.08>gradle wrapper --version 7.2
>
>
>
> Gradle 7.2
>
> Build time: 2021-08-17 09:59:03 UTC Revision:
> a773786b58bb28710e3dc96c4d1a7063628952ad
>
> Kotlin: 1.5.21 Groovy: 3.0.8 Ant: Apache Ant(TM) version 1.10.9 compiled on
> September 27 2020 JVM: 11.0.12 (Microsoft 11.0.12+7) OS: Windows 10 10.0
> amd64
>
> C:\apache-ofbiz-17.12.08\apache-ofbiz-17.12.08>
>
> Still gets
>
> C:\apache-ofbiz-17.12.08\apache-ofbiz-17.12.08>gradlew cleanAll loadAll
> Error: Could not find or load main class
> org.gradle.wrapper.GradleWrapperMain Caused by:
> java.lang.ClassNotFoundException: org.gradle.wrapper.GradleWrapperMain
>
> Don't know what else to try.