Category Archives: Error

[Solved] nginx Error: directory index of “/home/www/hexo/” is forbidden

Note: Recently, when setting up hexo, I finished all the work. I found that nginx reported 403 Forbidden. I checked the log of nginx

Log information is recorded as follows:

*481 directory index of “/home/www/hexo/” is forbidden~~~~~~

Solution: go to the configuration file nginx.conf in the nginx conf directory Conf plus configure autoindex on; Automatic indexing

Restart ngxin

Uncaught SyntaxError: Unexpected end of JSON input [How to Solve]

#Error description

The following error occurred while debugging the program:

This is a dynamically generated list. When clicking the list to migrate to the display content screen, the screen cannot be displayed normally and an error is reported. However, it is worth noting that not all lists have problems during migration, but only one has problems.

# findings

The number of JSON string fields exceeds the maximum limit. The final solution is to decompose the fields into two fields (in fact, it is equivalent to surrender). It seems that it may be the problem of string conversion from the background server (PHP) to JSON.

In short, after reducing the string length of the field, the problem can be solved temporarily.

# investigation means

Deleting part of the data and finally being confirmed is the problem of the data range, rather than the problem of individual characters guessed before the investigation.

How to Solve Unity2020 using Unity.Mathematics Error

First of all, this is because your project does not have this package, so where do you download the package?

Of course, it was downloaded from package manager, but it was not found after opening. What’s the matter?

Unity modified some package manager strategies in 2020.1. Packages in the early development stage and inactive development cannot be directly searched (even if show preview package is opened, it cannot be found, nor in the list)

So I want to download com unity. mathematics

First, open package manager

Click add package from git URL

Then send com unity. Click “Mathematics” and press “enter” to download automatically

After downloading, you can use it

Another situation is that there is an error in your vs, but there is no error on the unity console:

The solution is to modify the API compatibility level. Why you modify it is not important. You can modify it to 4.X is modified again. After modification, your vs can return to normal, using unity Mathematics, no more errors will be reported

[Solved] Error running ‘index’: Cannot run program “C:\Users\testgu\AppData\Local\Programs\Python\Python39\python.exe” (in directory “D:\PYWorkspace\ycyzharry”): CreateProcess error=2, the system cannot find the specified file.

When running python, the following errors are reported:

Error running ‘index’: Cannot run program “C:\Users\testgu\AppData\Local\Programs\Python\Python39\python.exe” (in directory “D:\PYWorkspace\ycyzharry”): CreateProcess error=2, the system cannot find the specified file.

Solution:

Pychar found “file” -> “Settings” -> “Project:XXX” -> “Python interpreter”

Select the corresponding Python version and apply

[Solved] error C4430: missing type specifier – int assumed. Note: C++ does not support default-int

Error generating in VS2008: error c4430: missing type specifier – int assumed Note: C++ does not support default-int

This is because in VC6, if the specified return value type is not displayed, the compiler treats it as the default integer. However, VS2005 does not support default integers.

Solution:
open the project – project properties – configuration properties – C/C + + – command line, and add the /wd4430 option to the additional options.

[Solved] Caused by: java.lang.ClassNotFoundException: org.mybatis.logging.LoggerFactory

There was a problem integrating mybatis plus

java.lang.IllegalStateException: Failed to load ApplicationContext
 
    at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:125)
    at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:108)
    at org.springframework.test.context.web.ServletTestExecutionListener.setUpRequestContextIfNecessary(ServletTestExecutionListener.java:190)
    at org.springframework.test.context.web.ServletTestExecutionListener.prepareTestInstance(ServletTestExecutionListener.java:132)
    at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:246)
    at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:227)
    at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:289)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:291)
    at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:246)
    at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:97)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
    at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:190)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
    at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
    at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
    at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
    at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'courseServiceImpl': Unsatisfied dependency expressed through field 'baseMapper'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'courseMapper' defined in file [D:\大学任务\毕业项目\学成在线教育系统后端\xc_parent\xc-service-manage-course\target\classes\com\xuecheng\manage_course\mapper\CourseMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/baomidou/mybatisplus/autoconfigure/MybatisPlusAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is java.lang.NoClassDefFoundError: org/mybatis/logging/LoggerFactory
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:596)
    at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:90)
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:374)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1411)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:592)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515)
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:845)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:877)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549)
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:744)
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:391)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:312)
    at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:120)
    at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:99)
    at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:117)
    ... 24 more
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'courseMapper' defined in file [D:\大学任务\毕业项目\学成在线教育系统后端\xc_parent\xc-service-manage-course\target\classes\com\xuecheng\manage_course\mapper\CourseMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/baomidou/mybatisplus/autoconfigure/MybatisPlusAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is java.lang.NoClassDefFoundError: org/mybatis/logging/LoggerFactory
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:1515)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1395)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:592)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515)
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
    at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:277)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1251)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1171)
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:593)
    ... 42 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/baomidou/mybatisplus/autoconfigure/MybatisPlusAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is java.lang.NoClassDefFoundError: org/mybatis/logging/LoggerFactory
    at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:627)
    at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:607)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1321)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1160)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515)
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
    at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:277)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1251)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1171)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:1500)
    ... 53 more
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is java.lang.NoClassDefFoundError: org/mybatis/logging/LoggerFactory
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
    at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:622)
    ... 66 more
Caused by: java.lang.NoClassDefFoundError: org/mybatis/logging/LoggerFactory
    at com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean.<clinit>(MybatisSqlSessionFactoryBean.java:94)
    at com.baomidou.mybatisplus.autoconfigure.MybatisPlusAutoConfiguration.sqlSessionFactory(MybatisPlusAutoConfiguration.java:157)
    at com.baomidou.mybatisplus.autoconfigure.MybatisPlusAutoConfiguration$$EnhancerBySpringCGLIB$$9415221e.CGLIB$sqlSessionFactory$1(<generated>)
    at com.baomidou.mybatisplus.autoconfigure.MybatisPlusAutoConfiguration$$EnhancerBySpringCGLIB$$9415221e$$FastClassBySpringCGLIB$$8fe0e2d7.invoke(<generated>)
    at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244)
    at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:363)
    at com.baomidou.mybatisplus.autoconfigure.MybatisPlusAutoConfiguration$$EnhancerBySpringCGLIB$$9415221e.sqlSessionFactory(<generated>)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
    ... 67 more
Caused by: java.lang.ClassNotFoundException: org.mybatis.logging.LoggerFactory
    at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 79 more

The reason is

1. It may be due to mybatis. When importing mybatis plus, the dependency of mybatis is imported, so such an error will occur.

2. There may be a version mismatch. One is too low and the other is too high.

I can delete the dependencies related to PageHelper in POM

[Solved] OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: “/bin/bash”: stat /bin/bash: no such file or directory: unknown

Execute Docker commands:
docker exec -it 6620a3dc4d19 /bin/bash

Error Messages:
OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: “/bin/bash”: stat /bin/bash: no such file or directory: unknown

 

Solution:

docker exec -it 1e33b26152e1 /bin/sh

docker exec -it 1e33b26152e1 /bash

docker exec -it 1e33b26152e1 /sh

[Solved] Failed to convert property value of type ‘null‘ to required type ‘double‘ for property ‘balance‘

Online method

Solution:

Source code:

    private int id;
    private String name;
    private double balance;

Just replace int and double with integer and decimal wrapper classes integer and double

    private Integer id;
    private String name;
    private Double balance;

Finally, the get and set methods are regenerated and re-run

[Solved] Dubbo Error: No provider available for the service xxx from registry localhost:9090

Dubbo operates as follows:

One service provider, one service consumer, service provider configuration parameter Dubbo.application.Name = AA, service consumer configuration parameter dubbo.cloud.subscribed-service=bb. Start the service provider first, then start the service consumer, then call the consumer interface to prompt the exception.

Error content:

org.apache.dubbo.rpc.RpcException: Failed to invoke the method sayHello in the service xxx. No provider available for the service xxx from registry localhost:9090 on the consumer [ip] using the dubbo version 2.7.3. Please check if the providers have been started and registered.

Cause of problem: due to negligence, the service provider Dubbo application. The value of name is consistent with the service consumer configuration Dubbo cloud. The value of the subscribed service is written inconsistently, resulting in the consumer unable to find the service provider according to the configuration at startup.

Solution: Modify the parameter value of the service consumer Dubbo.cloud.subscribed-service to the service provider Dubbo.application.Name.

There are many reasons for this problem. There are also some reasons on the Internet that are caused by the inconsistency between the versions of Dubbo and spring cloud. If the parameter configuration is not abnormal but still reports an error, it is recommended to modify the versions of spring boot, spring cloud and Dubbo. The versions of spring boot, spring cloud and Dubbo should be compatible.