Author Archives: Robins

How to Solve AspectJ error: error at ::0 can’t find referenced pointcut XXX

When using AspectJ to annotate aspects today, I encountered an error.

The cutpoint expression is unrecognizable-the detailed error message is as follows:

Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'xingoo' defined in class path resource [bean.xml]: Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: error at ::0 can't find referenced pointcut performance
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
    at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
    at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
    at com.spring.test.chap44.test.main(test.java:8)
Caused by: java.lang.IllegalArgumentException: error at ::0 can't find referenced pointcut performance
    at org.aspectj.weaver.tools.PointcutParser.parsePointcutExpression(PointcutParser.java:315)
    at org.springframework.aop.aspectj.AspectJExpressionPointcut.buildPointcutExpression(AspectJExpressionPointcut.java:195)
    at org.springframework.aop.aspectj.AspectJExpressionPointcut.checkReadyToMatch(AspectJExpressionPointcut.java:181)
    at org.springframework.aop.aspectj.AspectJExpressionPointcut.getClassFilter(AspectJExpressionPointcut.java:162)
    at org.springframework.aop.support.AopUtils.canApply(AopUtils.java:200)
    at org.springframework.aop.support.AopUtils.canApply(AopUtils.java:254)
    at org.springframework.aop.support.AopUtils.findAdvisorsThatCanApply(AopUtils.java:286)
    at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findAdvisorsThatCanApply(AbstractAdvisorAutoProxyCreator.java:117)
    at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findEligibleAdvisors(AbstractAdvisorAutoProxyCreator.java:87)
    at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.getAdvicesAndAdvisorsForBean(AbstractAdvisorAutoProxyCreator.java:68)
    at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.wrapIfNecessary(AbstractAutoProxyCreator.java:359)
    at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization(AbstractAutoProxyCreator.java:322)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:407)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1426)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
    ... 11 more

  I searched the Internet and found that the JDK does not match.

  The JDK1.7 I used originally matches aspectjrt.1.6 and aspectjweaver.1.6, so an error will be reported.

 

  If you want to use AspectJ to complete the annotation aspect, you need to pay attention to the following JDK and AspectJ matching:

  JDK1.6 —— aspectJ1.6

  JDK1.7 —— aspectJ1.7.3+

Idea connect mysql error Server returns invalid timezone. Go to’Advanced’ tab and set’serverTimezone’ property

the reason

For time zone issues, the MySQL driver defaults to UTC time zone.

solution

  1. Modify time zone
# set time zone mysql> set global time_zone = '+8:00';
Query OK, 0 rows affected (0.00 sec) 
# Set the time zone to East 8 mysql> set time_zone = '+8:00'; 
Query OK, 0 rows affected (0.00 sec) 
# Refresh permissions to make the settings take effect immediately mysql> flush privileges; 
Query OK, 0 rows affected (0.00 sec)
mysql> show variables like '%time_zone%';
 +------------------+--------+
 | Variable_name | Value |
 +------------------+--------+
 | system_time_zone | EST |
 | time_zone | +08:00 | 
 +------------------+--------+
 2 rows in set (0.00 sec)
  1. Add after the url:?serverTimezone=GMT%2B8

Navicat connected to Mysql error: Client does not support authentication protocol requested by server;

In the last article, I just wrote about installing Mysql, I want to use Navicat to connect, and then I get an error. Record the error here and solve it.

When Navicat connects to MySQL Server8.0 version, Client does not support authentication protocol requested by server appears; the solution is as follows:

The command is as follows:

1.use mysql;

2. alter user’root’@’localhost’ identified with mysql_native_password by’********’;

3. flush privileges;

AFTER THE GIT SOURCE CODE IS INSTALLED, AN ERROR IS REPORTED /USR/BIN/GIT: NO SUCH FILE OR DIRECTORY

phenomenon

After installing a git from the source code today, the following error was reported after executing the git command:

$ git - version
 -bash: /usr/bin/git: No such file or directory

Analysis process

At first I thought it was a problem with the PATH path. Checking the PATH path found that it was normal, and it shouldn’t be the case when the command could not be found.

$ echo $PATH
 /usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/admin/ bin
$ abcd
- bash: ABCD: the Command not found
$ /usr/local/bin/git - version
git version 2.17 . 0

It can be seen that the git command is under the PATH path and should be installed normally, because the absolute path can be used normally

And the error that the command cannot be found should be command not found

As the root user, it is normal to execute git –version. At first, I thought it was the admin user who set some variables, which led to the fixed search under /usr/bin when executing the git command.

Later, I found out that there is no such parameter

Finally found the answer on stackoverflow, the link is as follows:

https://stackoverflow.com/questions/19698901/why-is-git-looking-in-the-wrong-directory-for-the-git-installation-os-x

It turns out that the old git path I uninstalled in advance is /usr/bin/git, and then the newly installed git is under /usr/local/bin, and the terminal session saves the original path. Reopen the new terminal to solve the problem.

Mybatis Plus update time error: Could not set property ‘updateTime’

background     

Encountered this problem for several hours, almost driven crazy. Record it.

Let me talk about the environment, MySQL database, the field name in the table is update_time, and the type is datetime. The corresponding variable in the Java entity class is updateTime of type java.util.Date.

After the environment account is completed, when I use the update statement to update the record, I keep getting an error saying that the type does not match. Post the error message:

  1 org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: Could not set property 'updateTime' of 'class com.sinosoft.secloud.admin.api.entity.CtgAppInfo' with value '2019-11-07T10:12:39.257' Cause: java.lang.IllegalArgumentException: argument type mismatch
  2     at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:77)
  3     at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:446)
  4     at com.sun.proxy.$Proxy187.update(Unknown Source)
  5     at org.mybatis.spring.SqlSessionTemplate.update(SqlSessionTemplate.java:294)
  6     at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:69)
  7     at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:61)
  8     at com.sun.proxy.$Proxy195.updateById(Unknown Source)
  9     at com.baomidou.mybatisplus.extension.service.impl.ServiceImpl.updateById(ServiceImpl.java:208)
 10     at com.baomidou.mybatisplus.extension.service.impl.ServiceImpl$$FastClassBySpringCGLIB$$76535273.invoke(<generated>)
 11     at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
 12     at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:684)
 13     at com.sinosoft.secloud.admin.service.impl.AppInfoServiceImpl$$EnhancerBySpringCGLIB$$2ee21674.updateById(<generated>)
 14     at com.sinosoft.secloud.admin.controller.AppInfoController.update(AppInfoController.java:96)
 15     at com.sinosoft.secloud.admin.controller.AppInfoController$$FastClassBySpringCGLIB$$4d69b343.invoke(<generated>)
 16     at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
 17     at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:749)
 18     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
 19     at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:88)
 20     at com.sinosoft.secloud.common.log.aspect.SysLogAspect.around(SysLogAspect.java:36)
 21     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 22     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 23     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 24     at java.lang.reflect.Method.invoke(Method.java:497)
 25     at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:644)
 26     at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:633)
 27     at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)
 28     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
 29     at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:93)
 30     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
 31     at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)
 32     at com.sinosoft.secloud.admin.controller.AppInfoController$$EnhancerBySpringCGLIB$$8e8549a.update(<generated>)
 33     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 34     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 35     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 36     at java.lang.reflect.Method.invoke(Method.java:497)
 37     at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:189)
 38     at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138)
 39     at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102)
 40     at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)
 41     at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:800)
 42     at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
 43     at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1038)
 44     at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:942)
 45     at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1005)
 46     at org.springframework.web.servlet.FrameworkServlet.doPut(FrameworkServlet.java:919)
 47     at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
 48     at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:882)
 49     at javax.servlet.http.HttpServlet.service(HttpServlet.java:750)
 50     at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)
 51     at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
 52     at org.springframework.boot.actuate.web.trace.servlet.HttpTraceFilter.doFilterInternal(HttpTraceFilter.java:90)
 53     at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
 54     at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
 55     at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
 56     at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:320)
 57     at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)
 58     at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)
 59     at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
 60     at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:119)
 61     at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
 62     at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)
 63     at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
 64     at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)
 65     at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
 66     at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170)
 67     at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
 68     at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
 69     at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
 70     at org.springframework.security.oauth2.provider.authentication.OAuth2AuthenticationProcessingFilter.doFilter(OAuth2AuthenticationProcessingFilter.java:176)
 71     at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
 72     at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116)
 73     at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
 74     at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:74)
 75     at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
 76     at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
 77     at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)
 78     at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
 79     at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)
 80     at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
 81     at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
 82     at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:215)
 83     at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178)
 84     at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357)
 85     at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270)
 86     at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
 87     at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
 88     at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
 89     at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
 90     at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
 91     at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
 92     at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:92)
 93     at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
 94     at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
 95     at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
 96     at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:93)
 97     at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
 98     at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
 99     at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
100     at org.springframework.cloud.sleuth.instrument.web.ExceptionLoggingFilter.doFilter(ExceptionLoggingFilter.java:50)
101     at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
102     at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
103     at brave.servlet.TracingFilter.doFilter(TracingFilter.java:86)
104     at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
105     at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
106     at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.filterAndRecordMetrics(WebMvcMetricsFilter.java:117)
107     at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:106)
108     at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
109     at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
110     at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
111     at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)
112     at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
113     at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
114     at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
115     at com.sinosoft.secloud.common.data.tenant.TenantContextHolderFilter.doFilter(TenantContextHolderFilter.java:41)
116     at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
117     at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
118     at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
119     at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
120     at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68)
121     at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
122     at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:132)
123     at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
124     at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
125     at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
126     at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
127     at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
128     at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
129     at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
130     at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
131     at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
132     at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)
133     at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)
134     at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)
135     at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)
136     at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
137     at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
138     at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)
139     at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
140     at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104)
141     at io.undertow.server.Connectors.executeRootHandler(Connectors.java:364)
142     at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830)
143     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
144     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
145     at java.lang.Thread.run(Thread.java:745)
146 Caused by: org.apache.ibatis.reflection.ReflectionException: Could not set property 'updateTime' of 'class com.sinosoft.secloud.admin.api.entity.CtgAppInfo' with value '2019-11-07T10:12:39.257' Cause: java.lang.IllegalArgumentException: argument type mismatch
147     at org.apache.ibatis.reflection.wrapper.BeanWrapper.setBeanProperty(BeanWrapper.java:185)
148     at org.apache.ibatis.reflection.wrapper.BeanWrapper.set(BeanWrapper.java:59)
149     at org.apache.ibatis.reflection.MetaObject.setValue(MetaObject.java:140)
150     at com.baomidou.mybatisplus.core.handlers.MetaObjectHandler.setFieldValByName(MetaObjectHandler.java:72)
151     at com.sinosoft.secloud.common.data.mybatis.ModelMetaObjectHandler.updateFill(ModelMetaObjectHandler.java:54)
152     at com.baomidou.mybatisplus.core.MybatisDefaultParameterHandler.populateKeys(MybatisDefaultParameterHandler.java:192)
153     at com.baomidou.mybatisplus.core.MybatisDefaultParameterHandler.processBatch(MybatisDefaultParameterHandler.java:120)
154     at com.baomidou.mybatisplus.core.MybatisDefaultParameterHandler.<init>(MybatisDefaultParameterHandler.java:51)
155     at com.baomidou.mybatisplus.core.MybatisXMLLanguageDriver.createParameterHandler(MybatisXMLLanguageDriver.java:34)
156     at com.baomidou.mybatisplus.core.MybatisXMLLanguageDriver.createParameterHandler(MybatisXMLLanguageDriver.java:28)
157     at org.apache.ibatis.session.Configuration.newParameterHandler(Configuration.java:550)
158     at org.apache.ibatis.executor.statement.BaseStatementHandler.<init>(BaseStatementHandler.java:69)
159     at org.apache.ibatis.executor.statement.PreparedStatementHandler.<init>(PreparedStatementHandler.java:41)
160     at org.apache.ibatis.executor.statement.RoutingStatementHandler.<init>(RoutingStatementHandler.java:46)
161     at org.apache.ibatis.session.Configuration.newStatementHandler(Configuration.java:563)
162     at org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.java:48)
163     at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:117)
164     at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:76)
165     at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:198)
166     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
167     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
168     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
169     at java.lang.reflect.Method.invoke(Method.java:497)
170     at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:433)
171     ... 142 common frames omitted
172 Caused by: java.lang.IllegalArgumentException: argument type mismatch
173     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
174     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
175     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
176     at java.lang.reflect.Method.invoke(Method.java:497)
177     at org.apache.ibatis.reflection.invoker.MethodInvoker.invoke(MethodInvoker.java:44)
178     at org.apache.ibatis.reflection.wrapper.BeanWrapper.setBeanProperty(BeanWrapper.java:180)
179     ... 165 common frames omitted

After repeated checks, there is nothing wrong with the types in the database and the Java entity classes, and the cache is also cleaned up, and they are all invalid. This has always been wrong. Then the time is not updated directly in the logic layer, only other fields are updated, the result is useless, and this error is still reported! So I suspected that there might be a problem with the Mybaits Plus framework. My colleague said that the update time might be automatically added, but I didn’t find a description on the official website for a long time. In the end, I figured out a solution by myself. The solution is attached below:


 

method one:

Modify the field name to something else, such as update_date or update_times

Method Two:

Keep the field name unchanged, change the field type in Java to java.time.LocalDateTime, and assign a value to LocalDateTime.now().

 

Vue error resolution: TypeError: Cannot read property’_t’ of undefined”

The front-end error report is as follows:
[Vue warn]: Error in render: “TypeError: Cannot read property’_t’ of undefined”

It is the compatibility problem between vue and i18n that multi-language configuration is used in the project. The solution is as follows:

Vue.use(iView) 

Replace with

Vue.use(iView, {
  i18n: function(path, options) {
    let value = i18n.t(path, options)
    if (value !== null && value !== undefined) {
      return value
    }
    return ''
  }
})

IDEA reports an error Could not reserve enough space for xxxxKB object heap processing

When IDEA is developing an android project, it reports an error when it starts.

Error:Android Gradle Build Target: org.gradle.tooling.GradleConnectionException: Could not execute build using Gradle installation ‘C:\Users\musarona\.gradle\wrapper\dists\gradle-2.14.1-all\8bnwg5hd3w55iofp58khbp6yv\gradle-2.14.1’.

Error:Failed to complete Gradle execution.

Cause:
Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at https://docs.gradle.org/2.14.1/userguide/gradle_daemon.html
Please read the following process output to find out more:
———————–
Error occurred during initialization of VM
Could not reserve enough space for 1572864KB object heap

The main idea of ​​this error is that IDEA cannot allocate memory space to the virtual machine. To solve this kind of problem is to adjust the memory configuration in idea.exe.vmoptions.

-XX:ReservedCodeCacheSize=240m

Change to

-XX:ReservedCodeCacheSize=480m

If you still have problems, you can adjust other options in idea.exe.vmoptions

-Xmx512m

-XX:MaxHeapSize=512m

Ok. Edit, the next day the project is not working, so I will report this error.

Adjusting the heap in the compiler to 2G will not work.

Be puzzled. Think about it as an error reported in gradle, gradle should have a configuration that needs to take up memory. When I opened it, I was shocked. The default jvm memory of gradle is 1536m, which corresponds to 1572864KB in the error message. Then change it to a smaller size, change it to 512m, restart the compilation and pass it once.

Error creating bean with name [How to Solve]

I ran into a bug today

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'skuController'


The solution:

1. Maybe the implementation class didn’t add @servcie annotation. After you add it, click start, and the error still exists. Heartbreak X1 2. It may be that @mapperscan (“com. XXX. Mapper”) is not added to the startup class. After you add it, click start, and the error still exists. Heartbreak x2 3. Maybe the Dao package in serviceimpl is not imported into @ Autowired. After you add it, click start, and the error still exists. How about heartbreak X3
is it endless fun to be immortal and die? In the end, you have listed three possibilities, but you still need a note:
@ enable autoconfiguration

@The main functions of enable autoconfiguration are as follows:

Enable automatic configuration of the spring application context and try to guess and configure the beans you may need. Automatic configuration classes are usually based on class paths and defined bean applications. For example, if you have
tomcat-embedded.jar in your classpath, you may want a Tomcat embedded servletcontainerfactory (unless you define your own embedded servletcontainerfactory
bean). When using springbootapplication, automatic configuration of the context is automatically enabled and this annotation is added, so there is no extra effect
autoconfiguration tries to be as intelligent as possible and will be backed up when you define more of your own configurations. You can always manually exclude () any configuration you don’t want to apply (if you can’t access them). You can also exclude them through spring.
autoconfigure. Exclude attributes. After the user-defined bean is registered, auto configuration is always applied. Packages of classes annotated with @
enable autoconfiguration, usually through @
spring boot application, have special significance and are often used as “default”. For example, it will be used to scan the @ entity class. It is generally recommended to place @
enable autoconfiguration in the root package (if you do not use @ springbootapplication) so that you can search all subpackages and classes conditionalonclass and @ conditionalonsingbean).

The above explanations about @ enableautoconfiguration are copied from other places by bloggers. If it’s a bit difficult to understand, you just need to know that it’s Bean’s automatic assembly tool. Maybe you will ask, why do I do this?Can’t I use @ import directly in my project?Of course, since it is automatic configuration, of course, you want the project to start and load.

 

How to Sove Error: listen EADDRINUSE: address already in use 127.0.0.1:8888

The above error occurred when I was packing. At this time, I ran two projects locally

The listening address is occupied.

Open the command panel Win + r = & gt; cmd

View the process ID corresponding to the port

netstat -nao | findstr 8888

View details about the process (can be omitted)

tasklist | findstr 13964

Mission of investigation and killing:

  Method 1:

taskkill /pid 13508
#Forced termination
taskkill/F /pid 13508

  Method 2:
Ctrl + Shift + ESC, call out the task manager

Vue Error: initialize failed: invalid dom [How to Solve]

An error occurred when ecarts component was introduced into Vue project: “error: initialize failed:invalid dom. ”

I found that I didn’t reach that level at all. The problem I encountered was that I didn’t quote correctly. I split up. Xiaobai grew up in tears and blood. He didn’t talk much nonsense. Write an article and record it.

The main reason is that I didn’t understand the reference method of ecarts component. Here is my solution

<div id="a" style="height:80vh;width:100%" ref="b"></div>

There are two ways, one is Ref

let mychart = this.$echarts.init(this.$refs.b)

A way of using ID

this.$echarts.init(document.getElementById("a"))

The following is the complete code of the ecart component that I quoted. I have highlighted the mistakes I made. I hope it can help you.

<template>
  <div id="a" style="height:80vh;width:100%" ref="b"></div>
</template>
<script>
mounted() {
      this.init()

  },
 
  methods: {
      init(){
          let mychart = this.$echarts.init(this.$refs.b)
          // let mychart = this.$charts.init(document.getElementById("a"))
          //Here, I am the problem here, did not understand the whole id and ref relationship
          let optionline = {
              backgroundColor: '#f0f0f0',
    title: {
        text: 'Folding Line Chart',
        textStyle: {
            align: 'center',
            color: '#99CCFF',
            fontSize: 20,
        },
        top: '5%',
        left: 'center',
    },
    tooltip: {
        trigger: 'axis',
        axisPointer: {
            lineStyle: {
                color: {
                    type: 'linear',
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [{
                        offset: 0,
                        color: 'rgba(0, 255, 233,0)'
                    }, {
                        offset: 0.5,
                        color: 'rgba(255, 255, 255,1)',
                    }, {
                        offset: 1,
                        color: 'rgba(0, 255, 233,0)'
                    }],
                    global: false
                }
            },
        },
    },
    grid: {
        top: '15%',
        left: '5%',
        right: '5%',
        bottom: '15%',
        // containLabel: true
    },
    xAxis: [{
        type: 'category',
        axisLine: {
            show: true
        },
        splitArea: {
            // show: true,
            color: '#f00',
            lineStyle: {
                color: '#f00'
            },
        },
        axisLabel: {
            color: '#fff'
        },
        splitLine: {
            show: false
        },
        boundaryGap: false,
        data: ['A', 'B', 'C', 'D', 'E', 'F'],

    }],

    yAxis: [{
        type: 'value',
        min: 0,
        // max: 140,
        splitNumber: 4,
        splitLine: {
            show: true,
            lineStyle: {
                color: 'rgba(255,255,255,0.1)'
            }
        },
        axisLine: {
            show: false,
        },
        axisLabel: {
            show: false,
            margin: 20,
            textStyle: {
                color: '#d1e6eb',

            },
        },
        axisTick: {
            show: false,
        },
    }],
    series: [{
            name: 'Total registration',
            type: 'line',
            // smooth: true, // whether smooth
            showAllSymbol: true,
            // symbol: 'image://./static/images/guang-circle.png',
            symbol: 'circle',
            symbolSize: 25,
            lineStyle: {
                normal: {
                    color: "#6c50f3",
                    shadowColor: 'rgba(0, 0, 0, .3)',
                    shadowBlur: 0,
                    shadowOffsetY: 5,
                    shadowOffsetX: 5,
                },
            },
            label: {
                show: true,
                position: 'top',
                textStyle: {
                    color: '#6c50f3',
                }
            },
            itemStyle: {
                color: "#6c50f3",
                borderColor: "#fff",
                borderWidth: 3,
                shadowColor: 'rgba(0, 0, 0, .3)',
                shadowBlur: 0,
                shadowOffsetY: 2,
                shadowOffsetX: 2,
            },
            tooltip: {
                show: false
            },
            areaStyle: {
                normal: {
                    color: this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                            offset: 0,
                            color: 'rgba(108,80,243,0.3)'
                        },
                        {
                            offset: 1,
                            color: 'rgba(108,80,243,0)'
                        }
                    ], false),
                    shadowColor: 'rgba(108,80,243, 0.9)',
                    shadowBlur: 20
                }
            },
            data: [502.84, 205.97, 332.79, 281.55, 398.35, 214.02, ]
        },
        {
            name: 'Total registration',
            type: 'line',
            // smooth: true, // whether smooth
            showAllSymbol: true,
            // symbol: 'image://./static/images/guang-circle.png',
            symbol: 'circle',
            symbolSize: 25,
            lineStyle: {
                normal: {
                    color: "#00ca95",
                    shadowColor: 'rgba(0, 0, 0, .3)',
                    shadowBlur: 0,
                    shadowOffsetY: 5,
                    shadowOffsetX: 5,
                },
            },
            label: {
                show: true,
                position: 'top',
                textStyle: {
                    color: '#00ca95',
                }
            },

            itemStyle: {
                color: "#00ca95",
                borderColor: "#fff",
                borderWidth: 3,
                shadowColor: 'rgba(0, 0, 0, .3)',
                shadowBlur: 0,
                shadowOffsetY: 2,
                shadowOffsetX: 2,
            },
            tooltip: {
                show: false
            },
            areaStyle: {
                normal: {
                    color: this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                            offset: 0,
                            color: 'rgba(0,202,149,0.3)'
                        },
                        {
                            offset: 1,
                            color: 'rgba(0,202,149,0)'
                        }
                    ], false),
                    shadowColor: 'rgba(0,202,149, 0.9)',
                    shadowBlur: 20
                }
            },
            data: [281.55, 398.35, 214.02, 179.55, 289.57, 356.14, ],
        },
    ]
          }
          mychart.setOption(optionline)
      }
  }
</script>