Tag Archives: Gulimall mall project

[Solved] renren-fast Startup Error: Error creating bean with name ‘scheduleJobController‘

When doing the gulimall mall project, start Ren fast to report an error in the background. The error information is as follows:

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'scheduleJobController': Unsatisfied dependency expressed through field 'scheduleJobService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scheduleJobService': Invocation of init method failed; nested exception is io.renren.common.exception.RRException: 获取定时任务CronTrigger出现异常
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:643)
	at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:116)
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1422)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:594)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323)

Cause analysis: beans cannot be created or loaded. The problem is generally in configuration

Solution steps:
1. Check dao tier, service tier, controller tier is annotated or not?

2. When the annotation of Dao tier, service tier and controller tier is complete, check whether the corresponding package is added to the package scanning for these annotations. If not, add it (generally check in the spring configuration file)

3. Check the corresponding YML and properties files, or check whether the database SQL is executed normally

The solution to this problem: delete the contents of the current database and re-execute the SQL file

[Solved] nacos Startup Error: Error creating bean with name ‘authFilterRegistration‘ defined in class path resource

Today, an error was suddenly reported when Nacos was started. The error information on the Nacos startup interface is as follows:

 Error creating bean with name 'authFilterRegistration' defined in class path resource
 [com/alibaba/nacos/core/auth/AuthConfig.class]: 
 Bean instantiation via factory method failed; 
 nested exception is org.springframework.beans.BeanInstantiationException:
 Failed to instantiate [org.springframework.boot.web.servlet.FilterRegistrationBean]:
 Factory method 'authFilterRegistration' threw exception;
 nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException:
 Error creating bean with name 'authFilter':
 Unsatisfied dependency expressed through field 'authManager';
 nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: 
 Error creating bean with name 'nacosAuthManager':
 Unsatisfied dependency expressed through field 'authenticationManager';
 nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException:
 Error creating bean with name 'nacosAuthConfig': 
 Unsatisfied dependency expressed through field 'userDetailsService';
 nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException:
 Error creating bean with name 'nacosUserDetailsServiceImpl':
 Unsatisfied dependency expressed through field 'userPersistService'; 
 nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException:
 Error creating bean with name 'externalUserPersistServiceImpl': 
 Unsatisfied dependency expressed through field 'persistService'; 
 nested exception is org.springframework.beans.factory.BeanCreationException: 
 Error creating bean with name 'externalStoragePersistServiceImpl': 
 Invocation of init method failed; nested exception is java.lang.RuntimeException:
 java.lang.RuntimeException: [db-load-error]load jdbc.properties error

Idea spooling error message:

[NACOS SocketTimeoutException httpGet] currentServerAddr:http://localhost:8848, err : connect timed out

Cause analysis: the project may not load Nacos related files correctly

Solution: delete the existing Nacos folder, decompress or download the Nacos compressed package again, and start startup.cmd. The problem is solved

If an error is reported, it may be that set mode = “” in the startup.cmd file is inappropriate

set BASE_DIR="%BASE_DIR:~0,-5%"

set CUSTOM_SEARCH_LOCATIONS=file:%BASE_DIR%/conf/

set MODE="cluster"
set FUNCTION_MODE="all"
set SERVER=nacos-server
set MODE_INDEX=-1
set FUNCTION_MODE_INDEX=-1
set SERVER_INDEX=-1
set EMBEDDED_STORAGE_INDEX=-1
set EMBEDDED_STORAGE=""

Solution: change set mode = "cluster" to set mode = "standalone".