You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "kz282 (via GitHub)" <gi...@apache.org> on 2024/12/14 10:01:45 UTC
[I] Exception opening a Spring Initializr project template [netbeans]
kz282 opened a new issue, #8054:
URL: https://github.com/apache/netbeans/issues/8054
### Apache NetBeans version
Apache NetBeans 24 release candidate
### What happened
I have created a Spring Boot project on Spring Initializr and opened it both with Netbeans 22 and 24.
Syntax highlight works, syntax check, autocomplete, class import suggestion and some of other features don't.
I can run maven "spring-boot:run" from the goals and it starts the application.
The issue:
When I open a class file from the project I experience issues with lots of Netbeans functionality. Syntax highlight works, syntax check, autocomplete, class import suggestion and some of other features don't. I get the following exception:
```
java.lang.IllegalArgumentException: version can neither be null, empty nor blank
at org.apache.maven.artifact.ArtifactUtils.notBlank(ArtifactUtils.java:95)
at org.apache.maven.artifact.ArtifactUtils.toSnapshotVersion(ArtifactUtils.java:53)
at org.apache.maven.artifact.DefaultArtifact.setBaseVersionInternal(DefaultArtifact.java:354)
at org.apache.maven.artifact.DefaultArtifact.selectVersion(DefaultArtifact.java:443)
at org.apache.maven.artifact.DefaultArtifact.selectVersionFromNewRangeIfAvailable(DefaultArtifact.java:434)
at org.apache.maven.artifact.DefaultArtifact.<init>(DefaultArtifact.java:126)
at org.apache.maven.artifact.DefaultArtifact.<init>(DefaultArtifact.java:88)
at org.netbeans.modules.maven.api.PluginPropertyUtils.getPluginPathProperty(PluginPropertyUtils.java:839)
at org.netbeans.modules.maven.classpath.AnnotationProcClassPathImpl.getCompileArtifacts(AnnotationProcClassPathImpl.java:91)
at org.netbeans.modules.maven.classpath.AnnotationProcClassPathImpl.createPath(AnnotationProcClassPathImpl.java:66)
at org.netbeans.modules.maven.classpath.AbstractProjectClassPathImpl.getPath(AbstractProjectClassPathImpl.java:153)
at org.netbeans.modules.maven.classpath.AbstractProjectClassPathImpl.getResources(AbstractProjectClassPathImpl.java:144)
at org.netbeans.api.java.classpath.ClassPath.entries(ClassPath.java:363)
at org.netbeans.modules.maven.classpath.ClassPathProviderImpl$AnnotationPathSelector.getActiveClassPath(ClassPathProviderImpl.java:685)
at org.netbeans.spi.java.classpath.support.MuxClassPathImplementation.getActiveClassPath(MuxClassPathImplementation.java:156)
at org.netbeans.spi.java.classpath.support.MuxClassPathImplementation.getResources(MuxClassPathImplementation.java:89)
at org.netbeans.api.java.classpath.ClassPath.entries(ClassPath.java:363)
at org.netbeans.api.java.classpath.ClassPath.getRoots(ClassPath.java:248)
at org.netbeans.modules.java.source.indexing.APTUtils.listenOnProcessorPath(APTUtils.java:343)
at org.netbeans.modules.java.source.indexing.APTUtils.listen(APTUtils.java:329)
at org.netbeans.modules.java.source.indexing.APTUtils.create(APTUtils.java:234)
at org.netbeans.modules.java.source.indexing.APTUtils.get(APTUtils.java:165)
at org.netbeans.modules.java.source.parsing.JavacParser.createJavacTask(JavacParser.java:897)
at org.netbeans.modules.java.source.parsing.CompilationInfoImpl.getJavacTask(CompilationInfoImpl.java:460)
at org.netbeans.modules.java.source.parsing.CompilationInfoImpl.getJavacTask(CompilationInfoImpl.java:438)
at org.netbeans.modules.java.source.parsing.JavacParser.getResult(JavacParser.java:531)
at org.netbeans.modules.java.source.parsing.JavacParser.getResult(JavacParser.java:140)
at org.netbeans.modules.parsing.impl.TaskProcessor.callGetResult(TaskProcessor.java:608)
at org.netbeans.modules.parsing.impl.SourceCache.getResult(SourceCache.java:241)
at org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.run(TaskProcessor.java:775)
at org.openide.util.lookup.Lookups.executeWith(Lookups.java:288)
at org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.execute(TaskProcessor.java:702)
[catch] at org.netbeans.modules.parsing.impl.TaskProcessor$CompilationJob.run(TaskProcessor.java:663)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
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)
```
### Language / Project Type / NetBeans Component
Java Maven Web application project from Spring Initializr sources
### How to reproduce
Please create a Spring Boot project on Spring Initializr with the following settings:
Project: Maven
Language: Java
Spring Boot: 3.3.6
Packaging: War
Java: 17
Add a single dependency for Proof of Error: Lombok.
Download the project and open it either in Netbeans 22 or 24.
### Did this work correctly in an earlier version?
No / Don't know
### Operating System
Windows 11
### JDK
Oracle JDK 17.0.11+7-LTS-207
### Apache NetBeans packaging
Apache NetBeans provided installer
### Anything else
The issue is 100% reproducible every time I open a source file from the downloaded project template.
```
java.lang.IllegalArgumentException: version can neither be null, empty nor blank
at org.apache.maven.artifact.ArtifactUtils.notBlank(ArtifactUtils.java:95)
at org.apache.maven.artifact.ArtifactUtils.toSnapshotVersion(ArtifactUtils.java:53)
at org.apache.maven.artifact.DefaultArtifact.setBaseVersionInternal(DefaultArtifact.java:354)
at org.apache.maven.artifact.DefaultArtifact.selectVersion(DefaultArtifact.java:443)
at org.apache.maven.artifact.DefaultArtifact.selectVersionFromNewRangeIfAvailable(DefaultArtifact.java:434)
at org.apache.maven.artifact.DefaultArtifact.<init>(DefaultArtifact.java:126)
at org.apache.maven.artifact.DefaultArtifact.<init>(DefaultArtifact.java:88)
at org.netbeans.modules.maven.api.PluginPropertyUtils.getPluginPathProperty(PluginPropertyUtils.java:839)
at org.netbeans.modules.maven.classpath.AnnotationProcClassPathImpl.getCompileArtifacts(AnnotationProcClassPathImpl.java:91)
at org.netbeans.modules.maven.classpath.AnnotationProcClassPathImpl.createPath(AnnotationProcClassPathImpl.java:66)
at org.netbeans.modules.maven.classpath.AbstractProjectClassPathImpl.getPath(AbstractProjectClassPathImpl.java:153)
at org.netbeans.modules.maven.classpath.AbstractProjectClassPathImpl.getResources(AbstractProjectClassPathImpl.java:144)
at org.netbeans.api.java.classpath.ClassPath.entries(ClassPath.java:363)
at org.netbeans.modules.maven.classpath.ClassPathProviderImpl$AnnotationPathSelector.getActiveClassPath(ClassPathProviderImpl.java:685)
at org.netbeans.spi.java.classpath.support.MuxClassPathImplementation.getActiveClassPath(MuxClassPathImplementation.java:156)
at org.netbeans.spi.java.classpath.support.MuxClassPathImplementation.getResources(MuxClassPathImplementation.java:89)
at org.netbeans.api.java.classpath.ClassPath.entries(ClassPath.java:363)
at org.netbeans.api.java.classpath.ClassPath.getRoots(ClassPath.java:248)
at org.netbeans.modules.java.source.indexing.APTUtils.listenOnProcessorPath(APTUtils.java:343)
at org.netbeans.modules.java.source.indexing.APTUtils.listen(APTUtils.java:329)
at org.netbeans.modules.java.source.indexing.APTUtils.create(APTUtils.java:234)
at org.netbeans.modules.java.source.indexing.APTUtils.get(APTUtils.java:165)
at org.netbeans.modules.java.source.parsing.JavacParser.createJavacTask(JavacParser.java:897)
at org.netbeans.modules.java.source.parsing.CompilationInfoImpl.getJavacTask(CompilationInfoImpl.java:460)
at org.netbeans.modules.java.source.parsing.CompilationInfoImpl.getJavacTask(CompilationInfoImpl.java:438)
at org.netbeans.modules.java.source.parsing.JavacParser.getResult(JavacParser.java:531)
at org.netbeans.modules.java.source.parsing.JavacParser.getResult(JavacParser.java:140)
at org.netbeans.modules.parsing.impl.TaskProcessor.callGetResult(TaskProcessor.java:608)
at org.netbeans.modules.parsing.impl.SourceCache.getResult(SourceCache.java:241)
at org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.run(TaskProcessor.java:775)
at org.openide.util.lookup.Lookups.executeWith(Lookups.java:288)
at org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.execute(TaskProcessor.java:702)
[catch] at org.netbeans.modules.parsing.impl.TaskProcessor$CompilationJob.run(TaskProcessor.java:663)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
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)
```
### Are you willing to submit a pull request?
No
--
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: notifications-unsubscribe@netbeans.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [I] Exception opening a Spring Initializr project template [netbeans]
Posted by "matthiasblaesing (via GitHub)" <gi...@apache.org>.
matthiasblaesing commented on issue #8054:
URL: https://github.com/apache/netbeans/issues/8054#issuecomment-2543691309
The classpath resolution code is missing quering the DependencyManagment for the plugin version that is correctedin #8057. Please test the nightly build [Checks page](https://github.com/apache/netbeans/pull/8057/checks) [direct link](https://github.com/apache/netbeans/suites/32072296742/artifacts/2321761897).
--
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: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [I] Exception opening a Spring Initializr project template [netbeans]
Posted by "matthiasblaesing (via GitHub)" <gi...@apache.org>.
matthiasblaesing closed issue #8054: Exception opening a Spring Initializr project template
URL: https://github.com/apache/netbeans/issues/8054
--
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: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [I] Exception opening a Spring Initializr project template [netbeans]
Posted by "neilcsmith-net (via GitHub)" <gi...@apache.org>.
neilcsmith-net commented on issue #8054:
URL: https://github.com/apache/netbeans/issues/8054#issuecomment-2543037998
> Add a single dependency for Proof of Error: Lombok.
Something tells me that's your problem. Make sure the version of Lombok is compatible with JDK 23 (the compiler used inside the IDE) and see if the problem goes away.
--
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: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [I] Exception opening a Spring Initializr project template [netbeans]
Posted by "neilcsmith-net (via GitHub)" <gi...@apache.org>.
neilcsmith-net commented on issue #8054:
URL: https://github.com/apache/netbeans/issues/8054#issuecomment-2543745371
Thanks @matthiasblaesing Had just started looking at that having reached the same realisation. Mention of Lombok made me just assume that was the usual issue at first! :shrug:
--
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: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [I] Exception opening a Spring Initializr project template [netbeans]
Posted by "neilcsmith-net (via GitHub)" <gi...@apache.org>.
neilcsmith-net commented on issue #8054:
URL: https://github.com/apache/netbeans/issues/8054#issuecomment-2543046430
> My project is running on JDK 17 and I have not installed JDK 23.
The javac compiler used inside NetBeans is from JDK 23.
--
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: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [I] Exception opening a Spring Initializr project template [netbeans]
Posted by "kz282 (via GitHub)" <gi...@apache.org>.
kz282 commented on issue #8054:
URL: https://github.com/apache/netbeans/issues/8054#issuecomment-2543045266
Probably a duplicate of #8041
--
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: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [I] Exception opening a Spring Initializr project template [netbeans]
Posted by "kz282 (via GitHub)" <gi...@apache.org>.
kz282 commented on issue #8054:
URL: https://github.com/apache/netbeans/issues/8054#issuecomment-2543077789
I have found something interesting while editing the pom.xml.
I have deleted the Netbeans cache before each try.
The lombok version does not need to be set explicitly. Spring Boot 3.3.5 depends on lombok 1.18.34, but it works the same:
```
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
<!--<version>1.18.36</version>-->
</dependency>
```
The maven-compiler-plugin configuration of the generated pom.xml breaks the IDE:
```
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<!-- This configuration breaks the IDE. It is in the Spring Initializr template when Lombok is selected. No version information inside
<configuration>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</path>
</annotationProcessorPaths>
</configuration> -->
</plugin>
```
If I specify the lombok version inside the plugin / configuration / annotationProcessorPaths / path, all IDE feature are working properly. Setting this version field to 1.18.34 works too.
```
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.36</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
```
--
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: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [I] Exception opening a Spring Initializr project template [netbeans]
Posted by "kz282 (via GitHub)" <gi...@apache.org>.
kz282 commented on issue #8054:
URL: https://github.com/apache/netbeans/issues/8054#issuecomment-2543041700
My project is running on JDK 17 and I have not installed JDK 23.
Spring Boot 3.3.6 depends on lombok 1.18.36.
According to lombok changelog lombok v1.18.36 is supported on JDK23.
--
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: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [I] Exception opening a Spring Initializr project template [netbeans]
Posted by "kz282 (via GitHub)" <gi...@apache.org>.
kz282 commented on issue #8054:
URL: https://github.com/apache/netbeans/issues/8054#issuecomment-2543038044
[netbeanstest2.zip](https://github.com/user-attachments/files/18135332/netbeanstest2.zip)
[ServletInitializer.dump.log](https://github.com/user-attachments/files/18135343/ServletInitializer.dump.log)
--
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: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists