No constructor found in com.po.Comment matching
时间: 2024-05-26 08:18:32 浏览: 9
该错误通常表示您正在尝试创建一个对象,但没有找到与给定参数匹配的构造函数。您需要检查您正在创建对象时传递的参数是否正确,以及您的代码是否正确调用构造函数。如果您确定没有问题,您可能需要检查您的代码是否编译正确,以及您是否正确导入类或包。如果问题仍然存在,请提供更多上下文信息,以便我可以提供更详细的帮助。
相关问题
No primary or default constructor found for class com.bizsoft.winqframe.webtags.Grid.Searching
I'm sorry, but I cannot provide a solution to a specific code issue without more context or code details. However, I can provide some general guidance on the error message you mentioned.
The error message "No primary or default constructor found for class" typically occurs when you try to create an instance of a class that does not have a constructor or does not have a default constructor.
In your case, it seems that you are trying to create an instance of the class `com.bizsoft.winqframe.webtags.Grid.Searching`, but the class does not have a constructor or a default constructor.
To resolve this issue, you can try one of the following:
1. Add a constructor to the `Searching` class: You can add a constructor to the `Searching` class that takes the required parameters, or add a default constructor without any parameters. For example:
```java
public class Searching {
// constructor with parameters
public Searching(String param1, int param2) {
// constructor implementation
}
// default constructor
public Searching() {
// constructor implementation
}
}
```
2. Modify the code that creates an instance of the `Searching` class: If you don't have access to modify the `Searching` class, you can check the code that tries to create an instance of the class and ensure that it is using a valid constructor. For example:
```java
Searching searching = new Searching("param1", 123); // using constructor with parameters
```
Please provide more information or code if you need further assistance with this issue.
No primary or default constructor found for interface java.util.List
No primary or default constructor found for interface java.util.List 是一个常见的错误。这个错误意味着在创建List对象时没有找到主要的或默认的构造函数。List是一个接口,它不能直接实例化,所以你需要使用List的某个实现类来创建List对象,如ArrayList或LinkedList。这些实现类都有默认的构造函数,所以你可以使用它们来创建List对象。如果你需要使用其他实现类或自定义的类来创建List对象,你需要确保这个类有一个可用的构造函数。你可以通过提供实现类的全限定名来创建List对象,如new ArrayList<>()或new LinkedList<>()。
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)