You are not logged in.
hi, for some reasons gradle does not work, need help.
java.lang.IllegalArgumentException: Cannot find JAR 'asm-9.1.jar' required by module 'gradle-base-services' using classpath or distribution directory '/usr/share/java/gradle'
at org.gradle.api.internal.classpath.DefaultModuleRegistry.findDependencyJar(DefaultModuleRegistry.java:358)
at org.gradle.api.internal.classpath.DefaultModuleRegistry.findDependencyJars(DefaultModuleRegistry.java:220)
at org.gradle.api.internal.classpath.DefaultModuleRegistry.module(DefaultModuleRegistry.java:210)
at org.gradle.api.internal.classpath.DefaultModuleRegistry.loadOptionalModule(DefaultModuleRegistry.java:190)
at org.gradle.api.internal.classpath.DefaultModuleRegistry.loadModule(DefaultModuleRegistry.java:174)
at org.gradle.api.internal.classpath.DefaultModuleRegistry.getModule(DefaultModuleRegistry.java:154)
at org.gradle.api.internal.classpath.DefaultModuleRegistry.getModules(DefaultModuleRegistry.java:228)
at org.gradle.api.internal.classpath.DefaultModuleRegistry.access$100(DefaultModuleRegistry.java:50)
at org.gradle.api.internal.classpath.DefaultModuleRegistry$DefaultModule.getRequiredModules(DefaultModuleRegistry.java:393)
at org.gradle.api.internal.classpath.DefaultModuleRegistry$DefaultModule.collectRequiredModules(DefaultModuleRegistry.java:431)
at org.gradle.api.internal.classpath.DefaultModuleRegistry$DefaultModule.getAllRequiredModules(DefaultModuleRegistry.java:414)
at org.gradle.api.internal.classpath.DefaultModuleRegistry$DefaultModule.getAllRequiredModulesClasspath(DefaultModuleRegistry.java:421)
at org.gradle.api.internal.DefaultClassPathProvider.findClassPath(DefaultClassPathProvider.java:31)
at org.gradle.api.internal.DefaultClassPathRegistry.getClassPath(DefaultClassPathRegistry.java:35)
at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:49)
at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:37)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.gradle.launcher.GradleMain.main(GradleMain.java:34)Last edited by ihitmani (2025-06-02 22:02:06)
Offline
Perhaps a smidge of context?
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
off-topic
As a Java-dev it turns my guts insight-out seeing this completely wrong reflections call just to call on start-up method from another. I hope noone using gradle writes code that's as ugly as this start-up code itself. If you even think about reflections you certainly don't need them as you try to do what should not be done!
For anyone who want's to know how to propetly work with dynamic loadables like "plug-ins": Have a look at the ServiceLoader api - it's designed for exactly such use cases.
Offline
Perhaps a smidge of context?
sure, usually I use maven,but I received new project based on gradle. I had gradle installed on my machine. When I tried to use it from console, it failed to start. Maven works just fine, but gradle. System is up to date.
Last edited by ihitmani (2024-06-02 08:30:23)
Offline
usr/share/java/gradle/lib/asm-9.7.jar
usr/share/java/gradle/lib/asm-commons-9.7.jar
usr/share/java/gradle/lib/asm-tree-9.7.jarGradle version in extra repo is 8.8 and has only asm 9.7 .
Output of
pacman -Qikk gradle ?
What command are you running that gives that output ?
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
usr/share/java/gradle/lib/asm-9.7.jar usr/share/java/gradle/lib/asm-commons-9.7.jar usr/share/java/gradle/lib/asm-tree-9.7.jarGradle version in extra repo is 8.8 and has only asm 9.7 .
Output ofpacman -Qikk gradle?
What command are you running that gives that output ?
I run "gradle" in console, and have that output
pacman -Qikk gradle
Name : gradle
Version : 8.8-1
Description : Powerful build system for the JVM
Architecture : any
URL : https://gradle.org/
Licenses : Apache
Groups : None
Provides : None
Depends On : java-environment<=21 bash which coreutils findutils sed
Optional Deps : gradle-doc: gradle documentation
gradle-src: gradle sources
Required By : None
Optional For : None
Conflicts With : None
Replaces : None
Installed Size : 145.79 MiB
Packager : Frederik Schwan <freswa@archlinux.org>
Build Date : Sat 01 Jun 2024 11:19:47 AM EEST
Install Date : Sat 01 Jun 2024 07:36:11 PM EEST
Install Reason : Explicitly installed
Install Script : No
Validated By : Signature
warning: gradle: /usr/bin (Permissions mismatch)
warning: gradle: /usr/share (UID mismatch)
warning: gradle: /usr/share/java (UID mismatch)
warning: gradle: /usr/share/java/gradle (UID mismatch)
warning: gradle: /usr/share/java/gradle/lib (UID mismatch)
warning: gradle: /usr/share/java/gradle/lib/plugins (UID mismatch)
gradle: 284 total files, 6 altered filesLast edited by ihitmani (2024-06-03 07:04:10)
Offline
please post the outputs of
$ archlinux-java status
$ command -V gradle
$ command -v gradle
$ stat /usr/bin
$ stat /usr/bin/gradle
$ stat /usr/share/java/gradle/lib/pluginsDisliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
archlinux-java status
Available Java environments:
java-11-openjdk
java-17-openjdk (default)
java-22-openjdk
java-8-openjdk
command -V gradle
gradle is /usr/bin/gradle
command -v gradle
/usr/bin/gradle
stat /usr/bin
File: /usr/bin
Size: 135168 Blocks: 272 IO Block: 4096 directory
Device: 259,7 Inode: 59768837 Links: 7
Access: (4755/drwsr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2024-06-03 09:48:25.120991310 +0300
Modify: 2024-06-01 19:36:17.211698138 +0300
Change: 2024-06-01 19:36:17.211698138 +0300
Birth: 2022-06-28 19:31:27.519887367 +0300
stat /usr/bin/gradle
File: /usr/bin/gradle -> /usr/share/java/gradle/bin/gradle
Size: 33 Blocks: 0 IO Block: 4096 symbolic link
Device: 259,7 Inode: 59768895 Links: 1
Access: (0777/lrwxrwxrwx) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2024-06-03 10:02:39.015766594 +0300
Modify: 2024-06-01 11:19:47.000000000 +0300
Change: 2024-06-01 19:36:11.171638852 +0300
Birth: 2024-06-01 19:36:11.171638852 +0300
stat /usr/share/java/gradle/lib/plugins
File: /usr/share/java/gradle/lib/plugins
Size: 12288 Blocks: 24 IO Block: 4096 directory
Device: 259,7 Inode: 1712931 Links: 2
Access: (0755/drwxr-xr-x) Uid: ( 1000/ v) Gid: ( 0/ root)
Access: 2024-06-01 19:38:18.196665927 +0300
Modify: 2024-06-01 19:36:11.391641042 +0300
Change: 2024-06-01 19:36:11.391641042 +0300
Birth: 2022-06-28 19:36:41.216542868 +0300Offline
hmm, those outputs look normal to me.
The change time is probably when you updated gradle to latest version (8.8) .
Delete or move away ~/.gradle , then rerun gradle from console .
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
hmm, those outputs look normal to me.
The change time is probably when you updated gradle to latest version (8.8) .Delete or move away ~/.gradle , then rerun gradle from console .
Already tried to delete this folder, this method does not work
Offline
Is there a gradle build present in the folder you are running the command from ?
If yes, run gradle from a folder without any gradle files present.
(create a new empty one if needed )
Does that give the same error ?
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
Is there a gradle build present in the folder you are running the command from ?
If yes, run gradle from a folder without any gradle files present.
(create a new empty one if needed )
Does that give the same error ?
Tried, it did not help. I run it from empty filder
Last edited by ihitmani (2024-06-04 10:17:54)
Offline
ASM 9.1 was the first version with jdk 17 support, maybe that is related .
With root rights run archlinux-java set java-22-openjdk .
run gradle and post full output.
(there should be more then just the error message).
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
ASM 9.1 was the first version with jdk 17 support, maybe that is related .
With root rights run archlinux-java set java-22-openjdk .
run gradle and post full output.
(there should be more then just the error message).
nothing changed, message the same
Offline
java often has issues with wayland.
Are you using X or wayland ?
Which WM/DE/compositor ?
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
java often has issues with wayland.
Are you using X or wayland ?
Which WM/DE/compositor ?
I use X and xfce
Offline
Run
$ gradle --info > gradle-info-log.txt 2>&1
$ gradle --debug > gradle-debug-log.txt 2>&1Check both files , if they don't give more information :
Let's try to figure out if the issue is systemwide or in user config.
create a new linux user (for testing) . configure as little as possible and run gradle as that user.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
Run
$ gradle --info > gradle-info-log.txt 2>&1 $ gradle --debug > gradle-debug-log.txt 2>&1Check both files , if they don't give more information :
Let's try to figure out if the issue is systemwide or in user config.
create a new linux user (for testing) . configure as little as possible and run gradle as that user.
I created user "tgradle" assign groups users and wheel, set password. I changed user with commmand su userName. It shows the same message under mentioned user with different home dir. Any other ideas ?
Offline
logging out as your normal user and logging in as the new user is preferred method , as su gives a mixed environment .
I hope you did add --login to the su invocation ?
If not, try with another fresh user.
Did gradle-info-log.txt and gradle-debug-log.txt from your normal user give more info then just the error message ?
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
logging out as your normal user and logging in as the new user is preferred method , as su gives a mixed environment .
I hope you did add --login to the su invocation ?
If not, try with another fresh user.Did gradle-info-log.txt and gradle-debug-log.txt from your normal user give more info then just the error message ?
just tried(tty), does not work, message the same
Last edited by ihitmani (2024-06-05 10:23:32)
Offline
one more attempt :
Post the outputs of
$ /usr/share/java/gradle/bin/gradle -v
$ gradle -vDisliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
one more attempt :
Post the outputs of
$ /usr/share/java/gradle/bin/gradle -v $ gradle -v
nothing work. Just to note, maybe it is related, when I update system, I have this warnings from pacman:
(1/1) reinstalling gradle [########################################################] 100%
warning: directory permissions differ on /usr/bin/
filesystem: 4755 package: 755
/usr/share/java/gradle/bin/gradle -v
java.lang.IllegalArgumentException: Cannot find JAR 'asm-9.1.jar' required by module 'gradle-base-services' using classpath or distribution directory '/usr/share/java/gradle'
gradle -v
java.lang.IllegalArgumentException: Cannot find JAR 'asm-9.1.jar' required by module 'gradle-base-services' using classpath or distribution directory '/usr/share/java/gradle'Last edited by ihitmani (2024-06-05 12:35:18)
Offline
Looked again at the outputs in #8 and I was wrong : they do look weird .
/usr/bin has 4755 permissions . the 4 corresponds to the setuid-bit which has no effect on directories at all !
Default permissioin for /usr/bin should be 0755 .
stat /usr/share/java/gradle/lib/plugins
Access: (0755/drwxr-xr-x) Uid: ( 1000/ v) Gid: ( 0/ root)folders in /usr/share have no business being owned by users !
post the outputs of
$ stat /usr/bin /usr/share /usr/share/java /usr/share/java/gradle /usr/share/java/gradle/lib /usr/share/java/gradle/lib/plugin
# pacman -Qkk | grep -v ', 0 altered files'(the second one must be run with root rights to reduce number of messages .
Especially the 2nd output could still be long , see https://wiki.archlinux.org/title/List_o … ted_client for methods to upload text outputs to public storage.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
Looked again at the outputs in #8 and I was wrong : they do look weird .
/usr/bin has 4755 permissions . the 4 corresponds to the setuid-bit which has no effect on directories at all !
Default permissioin for /usr/bin should be 0755 .stat /usr/share/java/gradle/lib/plugins Access: (0755/drwxr-xr-x) Uid: ( 1000/ v) Gid: ( 0/ root)folders in /usr/share have no business being owned by users !
post the outputs of
$ stat /usr/bin /usr/share /usr/share/java /usr/share/java/gradle /usr/share/java/gradle/lib /usr/share/java/gradle/lib/plugin # pacman -Qkk | grep -v ', 0 altered files'(the second one must be run with root rights to reduce number of messages .
Especially the 2nd output could still be long , see https://wiki.archlinux.org/title/List_o … ted_client for methods to upload text outputs to public storage.
stat /usr/bin /usr/share /usr/share/java /usr/share/java/gradle /usr/share/java/gradle/lib /usr/share/java/gradle/lib/plugin
File: /usr/bin
Size: 135168 Blocks: 272 IO Block: 4096 directory
Device: 259,7 Inode: 59768837 Links: 7
Access: (4755/drwsr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2024-06-06 15:00:45.798288720 +0300
Modify: 2024-06-06 15:00:45.798288720 +0300
Change: 2024-06-06 15:00:45.798288720 +0300
Birth: 2022-06-28 19:31:27.519887367 +0300
File: /usr/share
Size: 12288 Blocks: 24 IO Block: 4096 directory
Device: 259,7 Inode: 59768843 Links: 272
Access: (0755/drwxr-xr-x) Uid: ( 1000/ v) Gid: ( 0/ root)
Access: 2024-06-06 14:59:43.232039138 +0300
Modify: 2024-06-01 19:36:17.208364774 +0300
Change: 2024-06-01 19:36:17.208364774 +0300
Birth: 2022-06-28 19:31:27.519887367 +0300
File: /usr/share/java
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 259,7 Inode: 1181108 Links: 7
Access: (0755/drwxr-xr-x) Uid: ( 1000/ v) Gid: ( 0/ root)
Access: 2024-06-06 14:59:43.232039138 +0300
Modify: 2024-05-25 11:52:50.924199498 +0300
Change: 2024-05-25 11:52:50.924199498 +0300
Birth: 2022-06-28 19:35:24.269878939 +0300
File: /usr/share/java/gradle
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 259,7 Inode: 1712926 Links: 5
Access: (0755/drwxr-xr-x) Uid: ( 1000/ v) Gid: ( 0/ root)
Access: 2024-06-06 15:00:45.798288720 +0300
Modify: 2024-06-06 15:00:45.798288720 +0300
Change: 2024-06-06 15:00:45.798288720 +0300
Birth: 2022-06-28 19:36:41.216542868 +0300
File: /usr/share/java/gradle/lib
Size: 12288 Blocks: 24 IO Block: 4096 directory
Device: 259,7 Inode: 1712930 Links: 4
Access: (0755/drwxr-xr-x) Uid: ( 1000/ v) Gid: ( 0/ root)
Access: 2024-06-06 15:00:45.798288720 +0300
Modify: 2024-06-06 15:00:46.034953820 +0300
Change: 2024-06-06 15:00:46.034953820 +0300
Birth: 2022-06-28 19:36:41.216542868 +0300
stat: cannot statx '/usr/share/java/gradle/lib/plugin': No such file or directoryhere it is second command:
https://drive.google.com/file/d/1mxPV03 … sp=sharing
Offline
Maybe I missed it: Have you tried to uninstall gradle by pacman -R gradle and clean everything left behind? Maybe some earlier update failed and the issue is caused by inconsistencies.
Offline