mbien commented on issue #9053:
URL: https://github.com/apache/netbeans/issues/9053#issuecomment-3616330423

   > OK Michael here it is. My username is Mark! 
   
   Hi Mark! :)
   
   your user name is indeed `Mark!` ! (`C:\Users\Mark!`) which is fascinating 
since it ends with an `!`. I didn't even know that windows allowed special 
characters in user names.
   
   Since I didn't want to impersonate you I created a user called `Mike!` and 
could reproduce the issue.
   
   the full exception is:
   
   ```
   org.gradle.tooling.GradleConnectionException: Could not execute build using 
connection to Gradle distribution 
'https://services.gradle.org/distributions/gradle-9.2.1-bin.zip'.
        at 
org.gradle.tooling.internal.consumer.ConnectionExceptionTransformer.transform(ConnectionExceptionTransformer.java:73)
        at 
org.gradle.tooling.internal.consumer.ResultHandlerAdapter.onFailure(ResultHandlerAdapter.java:42)
        at 
org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(DefaultAsyncConsumerActionExecutor.java:68)
        at 
org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
        at 
org.gradle.internal.concurrent.AbstractManagedExecutor$1.run(AbstractManagedExecutor.java:48)
        at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1090)
        at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:614)
        at java.base/java.lang.Thread.run(Thread.java:1474)
        at 
org.gradle.tooling.internal.consumer.BlockingResultHandler.getResult(BlockingResultHandler.java:46)
        at 
org.gradle.tooling.internal.consumer.DefaultBuildLauncher.run(DefaultBuildLauncher.java:82)
        at 
org.netbeans.modules.gradle.spi.newproject.TemplateOperation$InitStep.execute(TemplateOperation.java:385)
        at 
org.netbeans.modules.gradle.spi.newproject.TemplateOperation.run(TemplateOperation.java:127)
        at 
org.netbeans.modules.gradle.spi.newproject.BaseGradleWizardIterator.instantiate(BaseGradleWizardIterator.java:76)
        at 
org.netbeans.modules.ide.ergonomics.newproject.FeatureOnDemandWizardIterator.instantiate(FeatureOnDemandWizardIterator.java:172)
        at 
org.openide.loaders.TemplateWizard$InstantiatingIteratorBridge.instantiate(TemplateWizard.java:1046)
        at 
org.openide.loaders.TemplateWizard.handleInstantiate(TemplateWizard.java:602)
        at 
org.netbeans.modules.project.ui.NewProjectWizard.handleInstantiate(NewProjectWizard.java:51)
        at 
org.openide.loaders.TemplateWizard.instantiateNewObjects(TemplateWizard.java:436)
        at 
org.openide.loaders.TemplateWizardIterImpl.instantiate(TemplateWizardIterImpl.java:228)
        at 
org.openide.loaders.TemplateWizardIteratorWrapper$ProgressInstantiatingIterator.instantiate(TemplateWizardIteratorWrapper.java:155)
        at 
org.openide.WizardDescriptor.callInstantiateOpen(WizardDescriptor.java:1587)
        at 
org.openide.WizardDescriptor.callInstantiate(WizardDescriptor.java:1531)
        at org.openide.WizardDescriptor.access$2300(WizardDescriptor.java:67)
        at 
org.openide.WizardDescriptor$Listener$2$1.run(WizardDescriptor.java:2218)
        at 
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1403)
        at 
org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
        at org.openide.util.lookup.Lookups.executeWith(Lookups.java:287)
        at 
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2018)
   Caused by: 
org.gradle.internal.impldep.com.google.common.util.concurrent.UncheckedExecutionException:
 org.gradle.tooling.GradleConnectionException: Could not create an instance of 
Tooling API implementation using the specified Gradle distribution 
'https://services.gradle.org/distributions/gradle-9.2.1-bin.zip'.
        at 
org.gradle.internal.impldep.com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2074)
        at 
org.gradle.internal.impldep.com.google.common.cache.LocalCache.get(LocalCache.java:3986)
        at 
org.gradle.internal.impldep.com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4855)
        at 
org.gradle.tooling.internal.consumer.loader.CachingToolingImplementationLoader.create(CachingToolingImplementationLoader.java:50)
        at 
org.gradle.tooling.internal.consumer.loader.SynchronizedToolingImplementationLoader.create(SynchronizedToolingImplementationLoader.java:44)
        at 
org.gradle.tooling.internal.consumer.connection.LazyConsumerActionExecutor.onStartAction(LazyConsumerActionExecutor.java:160)
        at 
org.gradle.tooling.internal.consumer.connection.LazyConsumerActionExecutor.run(LazyConsumerActionExecutor.java:142)
        at 
org.gradle.tooling.internal.consumer.connection.CancellableConsumerActionExecutor.run(CancellableConsumerActionExecutor.java:45)
        at 
org.gradle.tooling.internal.consumer.connection.ProgressLoggingConsumerActionExecutor.run(ProgressLoggingConsumerActionExecutor.java:61)
        at 
org.gradle.tooling.internal.consumer.connection.RethrowingErrorsConsumerActionExecutor.run(RethrowingErrorsConsumerActionExecutor.java:38)
        at 
org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(DefaultAsyncConsumerActionExecutor.java:66)
        at 
org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
        at 
org.gradle.internal.concurrent.AbstractManagedExecutor$1.run(AbstractManagedExecutor.java:48)
        at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1090)
        at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:614)
        at java.base/java.lang.Thread.run(Thread.java:1474)
   Caused by: org.gradle.tooling.GradleConnectionException: Could not create an 
instance of Tooling API implementation using the specified Gradle distribution 
'https://services.gradle.org/distributions/gradle-9.2.1-bin.zip'.
        at 
org.gradle.tooling.internal.consumer.loader.DefaultToolingImplementationLoader.create(DefaultToolingImplementationLoader.java:101)
        at 
org.gradle.tooling.internal.consumer.loader.CachingToolingImplementationLoader$ConsumerConnectionCreator.call(CachingToolingImplementationLoader.java:83)
        at 
org.gradle.tooling.internal.consumer.loader.CachingToolingImplementationLoader$ConsumerConnectionCreator.call(CachingToolingImplementationLoader.java:65)
        at 
org.gradle.internal.impldep.com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4860)
        at 
org.gradle.internal.impldep.com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3551)
        at 
org.gradle.internal.impldep.com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2302)
        at 
org.gradle.internal.impldep.com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2177)
        at 
org.gradle.internal.impldep.com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2068)
        ... 15 more
   Caused by: org.gradle.internal.service.ServiceLookupException: Could not 
determine implementation class for service 
'org.gradle.tooling.internal.protocol.ConnectionVersion4' specified in resource 
'jar:file:/C:/Users/Mike!/.gradle/wrapper/dists/gradle-9.2.1-bin/2t0n5ozlw9xmuyvbp7dnzaxug/gradle-9.2.1/lib/gradle-tooling-api-provider-9.2.1.jar!/META-INF/services/org.gradle.tooling.internal.protocol.ConnectionVersion4'.
        at 
org.gradle.internal.service.DefaultServiceLocator.findServiceImplementations(DefaultServiceLocator.java:131)
        at 
org.gradle.internal.service.DefaultServiceLocator.implementationsOf(DefaultServiceLocator.java:96)
        at 
org.gradle.internal.service.DefaultServiceLocator.findFactoriesForServiceType(DefaultServiceLocator.java:105)
        at 
org.gradle.internal.service.DefaultServiceLocator.findFactory(DefaultServiceLocator.java:84)
        at 
org.gradle.tooling.internal.consumer.loader.DefaultToolingImplementationLoader.create(DefaultToolingImplementationLoader.java:77)
        ... 22 more
   Caused by: java.nio.file.NoSuchFileException: C:\Users\Mike
        at 
java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:85)
        at 
java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
        at 
java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
        at 
java.base/sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(WindowsFileAttributeViews.java:52)
        at 
java.base/sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(WindowsFileAttributeViews.java:38)
        at 
java.base/sun.nio.fs.WindowsFileSystemProvider.readAttributes(WindowsFileSystemProvider.java:195)
        at java.base/java.nio.file.Files.readAttributes(Files.java:1702)
        at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1493)
        at 
java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:704)
        at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:204)
        at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:150)
        at java.base/java.util.jar.JarFile.<init>(JarFile.java:333)
        at 
java.base/sun.net.www.protocol.jar.URLJarFile.<init>(URLJarFile.java:70)
        at 
java.base/sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:56)
        at 
java.base/sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:202)
        at 
java.base/sun.net.www.protocol.jar.JarFileFactory.getOrCreate(JarFileFactory.java:95)
        at 
java.base/sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:123)
        at 
java.base/sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:167)
        at 
org.gradle.internal.service.DefaultServiceLocator.extractImplementationClassNames(DefaultServiceLocator.java:159)
        at 
org.gradle.internal.service.DefaultServiceLocator.findServiceImplementations(DefaultServiceLocator.java:126)
        ... 26 more
   
   ```
   
   this is actually coming directly from gradle which is not able to deal with 
the path:
   
   ```
   Caused by: org.gradle.internal.service.ServiceLookupException: Could not 
determine implementation class for service 
'org.gradle.tooling.internal.protocol.ConnectionVersion4' specified in resource 
'jar:file:/C:/Users/Mike!/.gradle/wrapper/dists/gradle-9.2.1-bin/2t0n5ozlw9xmuyvbp7dnzaxug/gradle-9.2.1/lib/gradle-tooling-api-provider-9.2.1.jar!/META-INF/services/org.gradle.tooling.internal.protocol.ConnectionVersion4'.
   
   ```
   
   This explains why the exception is not in the log file, since it is not 
NetBeans what is failing.
   
   
   @lkishalmi However, I tried setting the gradle distribution to a path 
without an `!`, unfortunately NB kept using the default path during project 
initialization:
   
   <img width="735" height="300" alt="Image" 
src="https://github.com/user-attachments/assets/c9e1f700-b6f8-4595-adf2-8b17f983a8bb";
 />
   
   so there might be no easy workaround available atm outside of creating a 
user name without special characters.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to