The following fragment of code gives error in netbeans IDE.
public abstract class IntegrationEntityDAO<E extends IntegrationEntity>
extends GenericDAOHibernate<E, Long> {
Error as follows:
constructor GenericDAOHibernate in class GenericDAOHibernate<E#2,PK> cannot be applied to given types;
public class IntegrationEntityDAO<E extends IntegrationEntity> extends GenericDAOHibernate<E, Long> implements IIntegrationEntityDAO<E> {
required: Class<E#1>
found: no arguments
reason: actual and formal argument lists differ in length
where E#1,E#2,PK are type-variables:
E#1 extends IntegrationEntity declared in class IntegrationEntityDAO
E#2 extends BaseEntity declared in class GenericDAOHibernate
PK extends Serializable declared in class GenericDAOHibernate
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
1 warning
How to resolve the issue
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sorry, I have resolved the issue. I missed the empty constructor in GenericDAOHibernate class. Now the class compiled after adding the empty constructor
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The following fragment of code gives error in netbeans IDE.
public abstract class IntegrationEntityDAO<E extends IntegrationEntity>
extends GenericDAOHibernate<E, Long> {
Error as follows:
constructor GenericDAOHibernate in class GenericDAOHibernate<E#2,PK> cannot be applied to given types;
public class IntegrationEntityDAO<E extends IntegrationEntity> extends GenericDAOHibernate<E, Long> implements IIntegrationEntityDAO<E> {
required: Class<E#1>
found: no arguments
reason: actual and formal argument lists differ in length
where E#1,E#2,PK are type-variables:
E#1 extends IntegrationEntity declared in class IntegrationEntityDAO
E#2 extends BaseEntity declared in class GenericDAOHibernate
PK extends Serializable declared in class GenericDAOHibernate
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
1 warning
How to resolve the issue
Sorry, I have resolved the issue. I missed the empty constructor in GenericDAOHibernate class. Now the class compiled after adding the empty constructor