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
div>
Read More:
- es Failed to introspect Class [org.elasticsearch.client.RestHighLevelClient] from ClassLoader
- com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No serializer found for class
- The main class com.hp.springbootapplication cannot be found or loaded
- Method threw ‘java.lang.NullPointerException‘ exception. Cannot evaluate com.sun.proxy.xxx
- Unrecognized option: –add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED
- Exception in thread “main“ java.lang.ClassCastException: com.sun.proxy.$Proxy8 cannot be cast to XXX
- Unable to read Scheme Document ‘ http://www.springframework.org/schema/beans/spring-beans-4.1.xsd ‘ [How to Fix]
- Loading class `com.mysql.jdbc.Driver‘. This is deprecated. The new driver class is `com.mysql.cj.jdb
- As Error:Could not determine the class-path for interface com.android.builder.model.AndroidProject.
- [unity] Android package error java.lang.ClassNotFoundException Did not find class com.unity3d . player.MainActivity
- Org.springframework.beans.factory.xml.xmlbeandefinitionstoreexception: the wildcard matching is comprehensive, but the declaration of element XX: XX XX cannot be found
- Error: the main class usertest could not be found or loaded
- Idea startup project: main class not found or cannot be loaded
- Class ‘PHPWord_Writer_Word2003‘ not found
- [Solved] org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.zyh.springboot.
- The shell runs the class file and imports the jar package that the class depends on
- The main class could not be found or loaded when springboot started
- PHP:Fatal error: Class ‘COM’ not found in … How to deal with the problem
- Fatal error in PHP project: class’ redis’ not found
- PHP Fatal error: Uncaught Error: Class ‘\Elasticsearch\Serializers\SmartSerializer‘ not found in /h