Author Archives: Robins

Idea project prompt: symbol not found or package does not have a solution

Problem Description:

When the code of the pull company is running locally, the following error is found. Idea prompts java: no symbol is found

Cause analysis:

Baidu found a lot of solutions, but did not see the positive solution…

If the symbol is not found, it means that the current JDK version does not recognize some symbols in the project. Just replace the JDK version that adapts to the current project.

Solution:

Click file --- & gt; Project structure


the project is ready to run:

‘dependencies.dependency.version‘ for org.springframework.cloud:spring-cloud-starter-openfeign:jar

‘dependencies.dependency.version’ for org.springframework. cloud:spring-cloud-starter-openfeign :jar is missing. @ line 29, column 21

The error is as follows:

terms of settlement:

Delete local Maven warehouse (Maven)_ repository)

Or adjust the location of the local Maven warehouse, pull the project again, and then build it with Maven.

 
 

Tomcat — failed to start, flash back

Tomcat server failed to start

Reason: the project was configured before, but the project folder was accidentally deleted later. As a result, when the project was started, an error was flashed back.

Solution: open the server.xml configuration file in the conf folder of Tomcat installation directory and delete it

<Context path="" docBase="..." reloadable="true"/>

This is just one line of code.

Class file for com.sun.beans.introspect.propertyinfo not found

  The following error occurred when executing Maven install:

  Find the error in the code:

	
	PropertyDescriptor pd = null;
	try { 
             pd = new PropertyDescriptor(fields[j].getName(),entity.getClass()); 
         }catch (IntrospectionException e1) {
               e1.printStackTrace(); 
     }
     Method getMethod = pd.getReadMethod();

It turns out that we are creating a propertydescriptor   This is to get the get method of the entity class to read the value in the object. We find the construction method of this class

Previously, we encountered that the com.sun jar could not be loaded. For example, the previous Base64 was also under com.sun, and it could not be loaded every time it was started

How to solve: introduce this class:

import org.springframework.beans.BeanUtils;

	PropertyDescriptor pd = null;
	/*
	 * try {
     *      pd = new  PropertyDescriptor(fields[j].getName(),entity.getClass()); 
     *     }catch (IntrospectionException e1) {
     *       e1.printStackTrace();
     *      }
	 */
					 
     pd=BeanUtils.getPropertyDescriptor(entity.getClass(),fields[j].getName()); 
	 Method getMethod = pd.getReadMethod();

Hope to help you

 
 

java.lang.NoClassDefFoundError: org/junit/platform/launcher/TestExecutionListener

You can specify all versions

       <dependency>
           <groupId>org.junit.jupiter</groupId>
           <artifactId>junit-jupiter-engine</artifactId>
           <version>5.7.1</version>
           <scope>test</scope>
       </dependency>
       <dependency>
           <groupId>org.junit.jupiter</groupId>
           <artifactId>junit-jupiter-params</artifactId>
           <version>5.7.1</version>
           <scope>test</scope>
       </dependency>
       <dependency>
           <groupId>org.junit.platform</groupId>
           <artifactId>junit-platform-launcher</artifactId>
           <version>1.6.1</version>
           <scope>test</scope>
       </dependency>

Blas loading error in MATLAB, unable to find the specified module

Two methods can be used for personal test:
method 1
① delete my computer – properties – advanced system settings – environment variables – Blas_ VERSION ;
② right click matlab properties to set compatibility, Windows Vista (service Pack1)getenv('BLAS_VERSION')

Invalid path found

② Running in MATLAB

setenv('BLAS_VERSION','')

Note:
the second method is temporary, which needs to be set every time MATLAB is opened, otherwise an error will still be reported.

python got an unexpected keyword argument

 
The following exception is simulated:

 

def add(x,y):
   return x+y

print(add(bbb=3))

report errors:

TypeError: add() got an unexpected keyword argument ‘bbb’
 
reason:

The add function has no parameter BBB and passes an unknown parameter BBB

 
resolvent:

def add(x,y,*args,**kwargs):
   return x+y

print(add(bbb=3))

This is not a mistake

def add(**kwargs):
   return 4

print(add(pre=4,bbb=3))