What replaces FacesContextUtils in Spring 3? - spring

We just upgraded from Spring 2.5 to Spring 3.0.7. The class:
org.springframework.web.jsf.FacesContextUtils
doesn't appear exist in 3.0.7. We are trying to call:
FacesContextUtils.getWebApplicationContext(FacesContext.getCurrentInstance()).getBeansOfType(type);
Is there a replacement in Spring 3?

This class also exists in Spring 3.0.7, maybe you missed a jar or downloaded a different release?
You can use the following maven dependency:
<dependency>
<groupId>org.springframework</groupId>
<artifactId>org.springframework.web</artifactId>
<version>3.0.7.RELEASE</version>
</dependency>
You can also get the jar from the spring repo.
If this doesn't help you may update your question with the stacktrace of the error msg.

Related

Upgrading Spring boot version to version 3. Problem with javax.cache library

I'm trying to upgrade spring boot from 2.7.x to 3.0.1. The last thing I have left to upgrade is the library.
<dependency>
<groupId>javax.cache</groupId>
<artifactId>cache-api</artifactId>
<version>1.1.1</version>
</dependency>
Have any of you had a similar problem? I didn't see any information on how to do this in the guide.
Remove this dependency and use from spring boot starters.
This is already having Vulnerabilities from dependencies:CVE-2020-15250.MVN REPO CACHE 1.1.1

CamelConfiguration deprecated and removed

I'm using camel with this class in a non spring boot project :
org.apache.camel.spring.javaconfig.CamelConfiguration;
I'm in camel 3.14.1
When i want to update camel to 3.16.0 or more, this class was removed
I find solution to replace this class by using camel-spring-boot-starter but i'm not in spring-boot app...
For now i have force camel to 3.16.0 and force add this dependency:
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-spring-javaconfig</artifactId>
<version>3.14.1</version>
</dependency>
It work but i want to remove this... any solution?
Thanks

spring framework and webflux versions are incompatible

I have a old version spring-framework project. spring-framework version is 3.1.1.RELEASE. I need import webflux but versions are incompatible, so if i add these code in pom.xml:
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webflux</artifactId>
<version>${spring.version}</version>
</dependency>
not work because spring-webflux:3.1.1.RELEASE is not published in maven repo. How can i solve this problem?
Thanks,
It was added in Spring 5. I am afraid you need to update to Spring 5.

QueryDslPredicateExecutor working with spring boot version 1.4.2.RELEASE but not working with spring boot version 2.2.6.RELEASE

When I try to migrate my Spring Boot application from version 1.4.2.RELEASE to version 2.2.6.RELEASE I found that org.springframework.data.querydsl.QueryDslPredicateExecutor not found
Cannot resolve symbol QueryDslPredicateExecutor
i should add spring-data-commons version 1.12.8.RELEASE
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-commons</artifactId>
<version>1.12.8.RELEASE</version>
</dependency>
and then i found another probleme
GitHub repo: https://github.com/dali05/SpringBootMultipleMavenModules
thnaks
Please note that the name of the class over time has been changed, in that one 'D' has changed from its uppercase to a lowercase 'd', ie: QueryDslPredicateExecutor is now QuerydslPredicateExecutor. Probably this caused some headache for you as it did for me too.
Refer to the class in your source code as QuerydslPredicateExecutor and your source code will build again.

Moving from Spring Boot 2.0.0.M6 to 2.0.0.M7 - dependencies.dependency.version' for org.springframework.social:spring-social-security:jar is missing

I'm trying to upgrade my application from Spring Boot 2.0.0.M6 to 2.0.0.M7
After upgrading my Maven application I ran into the following errors:
For example the following dependency
<dependency>
<groupId>org.springframework.social</groupId>
<artifactId>spring-social-security</artifactId>
</dependency>
shows the following error:
Project build error: 'dependencies.dependency.version' for org.springframework.social:spring-social-security:jar is missing.
What am I doing wrong and how to fix it?
Dependency management and auto-configuration for Spring Social was removed from Spring Boot in 2.0 M7. The longer-term plan is for it to move into Spring Social itself but that has yet to happen.

Resources