Problem while creating a new spring boot project - java

In the help.md file it's telling me that JVM was changed from 11 to 17
this is what the help.md file looks like
The following was discovered as part of building this project:
* The JVM level was changed from '11' to '17', review the [JDK Version Range](https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-Versions#jdk-version-range) on the wiki for more details.
and here is an example of later problems
And even if i change the project structure manually to java 11 sdk
i have issues with versions next .

This problem is occurring in the newer version of Spring Boot. So when creating project using Spring Initializr or Spring Starter Project select the older version of Spring Boot (like 3.0.1 or 2.7.7).
This should solve the problem.

Related

How to package convert to lib or jar in spring boot?

I upgraded the project to Java 17, Spring Boot 2.7.4 version. And I migrated from Couchbase SDK 2 to SDK 3. After that, I faced an issue with package com.couchbase.client.java.query.dsl. It was not supported, so I added to the project package com.couchbase.client.java.query.dsl manually. After that, issues are fixed. Now, I have a problem, my test case coverage is down. Do you have any idea to fixed it or do you know convert package com.couchbase.client.java.query.dsl to lib file or jar file?
What would be the best possible options?

Spring Initializr gradle project fails unknown property 'compileConfigurationName'

I am trying to set up a new Spring Boot gradle project, with Spring Initializr. This was giving issues, so to test, I have stripped down to the most basic possible starter – no dependencies.
I set a Gradle project (it sets gradle 7.0.2) and Java 16. Download and import. Set the build JDK appropriately. At this point, everything should be good. But a build fails with the error…
groovy.lang.MissingPropertyException: Could not get unknown property 'compileConfigurationName' for source set 'main' of type org.gradle.api.internal.tasks.DefaultSourceSet.
From what I've been able to find, it looks like compileConfigurationName was deprecated in gradle 6 and removed in 7 (and that compileClasspathConfigurationName should be used instead).
What more in the downloaded starter do I need to fiddle with to get this to work? (Yes, I could drop to JDK 11 and gradle 6.8.3, but I would rather start from the more up-to-date…)
If you are using NetBeans - see this ticket here:
https://issues.apache.org/jira/browse/NETBEANS-5582
"Gradle 7.0 is not supported in NetBeans 12.3".
If I run this project in VS code no issues.

Spring Boot: Cannot change version of project facet to 3.1

I am working on a Spring Boot web application and facing some problem with Project Facets. By default, the java compiler version is 1.6 and project facet is 2.3 but am working on Java 8. When I try to change jre library to 1.8 in java build path and try changing Dynamic Web Module to 3.1, i get this error:
Cannot change version of project facet Dynamic Web Module to 3.1. MyApplication line 1 Maven Java EE Configuration Problem
This problem is occuring after I did JSP configuration in Spring Boot application and removed web.xml which was of no use. The content of my application.properties is:
#JSP Settings
spring.mvc.view.prefix=/WEB-INF/jsp/
spring.mvc.view.suffix=.jsp
How do I solve this problem?
you can try this..
vim /.settings/org.eclipse.wst.common.project.facet.core.xml
change jst.web property to 3.1
i refer from here..
https://www.admfactory.com/how-to-fix-cannot-change-version-of-project-facet-dynamic-web-module-to-3-1-error-in-eclipse/

How to attach different versions of same source file

Eclipse Mars Release (4.5.0)
I have a few projects in the same namespace and two of them use different versions of the same library (percisely, spring 4.0.x and spring 4.2.x, update is not finished yet.)
Now when debugging a project that uses Spring 4.2.1 eclipse erronously navigates me to sources of Spring 4.0.x (as in the picture below)
There is no instruction at the 629 line in Spring 4.0.x, but here is one in Spring 4.2.1.
Question: How to tell eclise that I want to debug a project with the particular version of sources?

ApacheCXF 3.1.4 and Spring 4.2.4 compatability

I am trying to upgrade my libraries: ApacheCXF 2.7.7 --> 3.1.4. Spring 2.5.5 --> 4.2.4.
My Hudson build keeps failing because it cannot find packages/classes, org.springframework.context.ApplicationContext, for example. The classpath in cxf-manifest.jar, as part of ApacheCXF, refers specifically to Spring 4.1.7 jars.
I've tried loading both Spring 4.1.7 and 4.2.4 versions, but no joy. (Is loading multiple lib versions even possible?).
I've tried removing cxf-manifest.jar from the classpath/buildpath. Eclipse is happy with that and it finds the desired classes in the Spring 4.2.4 jars, but Hudson is still not happy.
I've considered moving to Spring 4.1.7, but I don't see the point of upgrading partially.
Is ApacheCXF 3.1.4 specifically incompatible with Spring 4.2.4? And how would I get Hudson to be happy with the upgraded libraries?
Turns out that I forgot to add the specific directory containing the Spring jars to my build.xml script.
ApacheCXF 3.1.4 IS compatible with Spring 4.2.4
Edit: Apparently I was wrong.

Categories

Resources